MCP: somewhat functional (?) full keybinding GUI
authorPaul Davis <paul@linuxaudiosystems.com>
Tue, 17 Apr 2012 21:36:48 +0000 (21:36 +0000)
committerPaul Davis <paul@linuxaudiosystems.com>
Tue, 17 Apr 2012 21:36:48 +0000 (21:36 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@11999 d708f5d6-7413-0410-9779-e7cbd77b26cf

libs/gtkmm2ext/actions.cc
libs/surfaces/mackie/gui.cc
libs/surfaces/mackie/surface.cc
mcp/paul-nucleus.profile

index 3fc9def399974f20484b42b6429f0b77662e1784..74533f96a4b087393164fcfbeeb857fdb707a00c 100644 (file)
@@ -250,23 +250,29 @@ ActionManager::get_action (const char* path)
                return RefPtr<Action>();
        }
 
-       char copy[strlen(path)+1];
-
-       if (*path == '/') {
-               const char* cslash = strchr (path, '/');
-               if (!cslash) {
-                       return RefPtr<Action> ();
-               }       
-               strcpy (copy, cslash+1);
-       } else {
-               strcpy (copy, path);
+       /* Skip <Actions>/ in path */
+
+       int len = strlen (path);
+
+       if (len < 3) {
+               /* shortest possible path: "a/b" */
+               return RefPtr<Action>();
        }
 
+       if (len > 10 && !strncmp (path, "<Actions>/", 10 )) {
+               path = path+10;
+       } else if (path[0] == '/') {
+               path++;
+       }
+
+       char copy[len+1];
+       strcpy (copy, path);
        char* slash = strchr (copy, '/');
        if (!slash) {
                return RefPtr<Action> ();
        }
        *slash = '\0';
+
        return get_action (copy, ++slash);
        
 }
index 0ed07276a67125d81453436dd666aad059b57800..acb4779b7f6928e6d21e39f7d2b953cb8d25701c 100644 (file)
@@ -280,9 +280,7 @@ MackieControlProtocolGUI::refresh_function_key_editor ()
                if (action.empty()) {
                        row[function_key_columns.plain] = defstring;
                } else {
-                       std::cerr << "action = " << action << '\n';
                        act = ActionManager::get_action (action.c_str());
-                       std::cerr << " action = " << act << endl;
                        if (act) {
                                row[function_key_columns.plain] = act->get_label();
                        } else {
@@ -373,6 +371,7 @@ MackieControlProtocolGUI::action_changed (const Glib::ustring &sPath, const Glib
                if (act) {
                        (*row).set_value (col.index(), text);
                }
+                       
        }
 }
 
index 52323ee8a666163f619042653b465ccd69e4419f..f1f308209cde0c770ac84ba28613145ef487b821 100644 (file)
@@ -199,8 +199,6 @@ Surface::init_strips (uint32_t n)
                
                snprintf (name, sizeof (name), "strip_%d", (8* _number) + i);
 
-               std::cerr << "*** Surface " << _number << " Setup strips for index " << i << endl;
-
                Strip* strip = new Strip (*this, name, i, strip_buttons);
                
                groups[name] = strip;
index 43e6b52284b0f17ba3e9829b8fd46f93abda114d..68fe09bca35daf36227cd338f05167fcacbd8e1c 100644 (file)
@@ -4,6 +4,6 @@
   <MasterOn value="14"/>
   <MonitorOn value="15"/>
   <Buttons>
-    <Button name="f1" plain="Editor/goto-visual-view-1"/>
+    <Button name="f1" plain="Editor/goto-visual-state-1"/>
   </Buttons>
 </MackieDeviceProfile>