MCP: catch noteOff to see note-on+velocity=zero messages; more GUI tweaks
[ardour.git] / gtk2_ardour / keyeditor.cc
index bafa0a4f6c99b4f4c4c40c8c6b0c293ad5074ecc..0d2cd989423cb0571eecfc75e6954a505b504da6 100644 (file)
@@ -193,9 +193,7 @@ KeyEditor::on_key_release_event (GdkEventKey* ev)
                        goto out;
                }
 
-               cerr << "real lkeyval: " << ev->keyval << endl;
                 Gtkmm2ext::possibly_translate_keyval_to_make_legal_accelerator (ev->keyval);
-               cerr << "using keyval = " << ev->keyval << endl;
 
 
                bool result = AccelMap::change_entry (path,
@@ -203,8 +201,6 @@ KeyEditor::on_key_release_event (GdkEventKey* ev)
                                                      ModifierType (Keyboard::RelevantModifierKeyMask & ev->state),
                                                      true);
 
-               cerr << "New binding to " << ev->keyval << " worked: " << result << endl;
-
                if (result) {
                        AccelKey key;
                        (*i)[columns.binding] = ActionManager::get_key_representation (path, key);
@@ -250,6 +246,20 @@ KeyEditor::populate ()
                        continue;
                }
 
+               //kinda kludgy way to avoid displaying menu items as mappable
+               if ( parts[1] == _("Main_menu") )
+                       continue;
+               if ( parts[1] == _("JACK") )
+                       continue;
+               if ( parts[1] == _("redirectmenu") )
+                       continue;
+               if ( parts[1] == _("Editor_menus") )
+                       continue;
+               if ( parts[1] == _("RegionList") )
+                       continue;
+               if ( parts[1] == _("ProcessorMenu") )
+                       continue;
+
                if ((r = nodes.find (parts[1])) == nodes.end()) {
 
                        /* top level is missing */
@@ -283,24 +293,7 @@ KeyEditor::populate ()
                if (*k == ActionManager::unbound_string) {
                        row[columns.binding] = string();
                } else {
-
-#ifdef GTKOSX
-                       string label = (*k);
-                       
-                       /* Gtk/Quartz maps:
-                          NSAlternate/NSOption key to Mod1
-                          NSCommand key to Mod2
-                       */
-
-//                     replace_all (label, "<Primary>", _("Command-"));
-//                     replace_all (label, "<Alt>", _("Option-"));
-//                     replace_all (label, "<Shift>", _("Shift-"));
-//                     replace_all (label, "<Control>", _("Control-"));
-
-                       row[columns.binding] = label;
-#else
                        row[columns.binding] = (*k);
-#endif
                }
        }
 }