MCP: more button tracing, more config stuff
authorPaul Davis <paul@linuxaudiosystems.com>
Fri, 13 Apr 2012 19:17:28 +0000 (19:17 +0000)
committerPaul Davis <paul@linuxaudiosystems.com>
Fri, 13 Apr 2012 19:17:28 +0000 (19:17 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@11963 d708f5d6-7413-0410-9779-e7cbd77b26cf

libs/surfaces/mackie/gui.cc
libs/surfaces/mackie/mackie_control_protocol.cc

index 7fb93db687640d5998f86552f365a4ca55217d14..bcc74ee99c5eb84447bb2d4ee5d918ece3818b77 100644 (file)
@@ -126,25 +126,34 @@ MackieControlProtocolGUI::rebuild_function_key_editor ()
        CellRendererCombo* action_renderer = manage (new CellRendererCombo);
        action_renderer->property_model() = available_action_model;
        action_renderer->property_editable() = true;
-       action_renderer->property_text_column() = 0;
+       action_renderer->property_text_column() = 1;
+       action_renderer->property_has_entry() = false;
 
-       TreeViewColumn* plain_column = manage (new TreeViewColumn (_("Plain"), *action_renderer));
-       function_key_editor.append_column (*plain_column);
+       TreeViewColumn* col;
+
+       col = manage (new TreeViewColumn (_("Plain"), *action_renderer));
+       col->add_attribute (action_renderer->property_text(), function_key_columns.plain);
+       function_key_editor.append_column (*col);
        
-       TreeViewColumn* shift_column = manage (new TreeViewColumn (_("Shift"), *action_renderer));
-       function_key_editor.append_column (*shift_column);
+       col = manage (new TreeViewColumn (_("Shift"), *action_renderer));
+       col->add_attribute (action_renderer->property_text(), function_key_columns.shift);
+       function_key_editor.append_column (*col);
 
-       TreeViewColumn* control_column = manage (new TreeViewColumn (_("Control"), *action_renderer));
-       function_key_editor.append_column (*control_column);
+       col = manage (new TreeViewColumn (_("Control"), *action_renderer));
+       col->add_attribute (action_renderer->property_text(), function_key_columns.control);
+       function_key_editor.append_column (*col);
 
-       TreeViewColumn* option_column = manage (new TreeViewColumn (_("Option"), *action_renderer));
-       function_key_editor.append_column (*option_column);
+       col = manage (new TreeViewColumn (_("Option"), *action_renderer));
+       col->add_attribute (action_renderer->property_text(), function_key_columns.option);
+       function_key_editor.append_column (*col);
 
-       TreeViewColumn* cmdalt_column = manage (new TreeViewColumn (_("Cmd/Alt"), *action_renderer));
-       function_key_editor.append_column (*cmdalt_column);
+       col = manage (new TreeViewColumn (_("Cmd/Alt"), *action_renderer));
+       col->add_attribute (action_renderer->property_text(), function_key_columns.cmdalt);
+       function_key_editor.append_column (*col);
 
-       TreeViewColumn* shiftcontrol_column = manage (new TreeViewColumn (_("Shift+Control"), *action_renderer));
-       function_key_editor.append_column (*shiftcontrol_column);
+       col = manage (new TreeViewColumn (_("Shift+Control"), *action_renderer));
+       col->add_attribute (action_renderer->property_text(), function_key_columns.shiftcontrol);
+       function_key_editor.append_column (*col);
 
        /* now fill with data */
 
index e03a146d2ea2c8201ed0d5f619b8672657c6f7e4..810098959750fcb09a878a78a87268ffa1153381 100644 (file)
@@ -1262,6 +1262,9 @@ MackieControlProtocol::down_controls (AutomationType p)
                return controls;
        }
        
+       DEBUG_TRACE (DEBUG::MackieControl, string_compose ("looking for down buttons for %1, got %2\n",
+                                                          p, m->second.size()));
+
        pull_route_range (m->second, routes);
        
        switch (p) {
@@ -1311,10 +1314,13 @@ MackieControlProtocol::pull_route_range (list<uint32_t>& down, RouteList& select
        uint32_t last = down.back ();
        
        uint32_t first_surface = first>>8;
-       uint32_t first_strip = first&0x8;
+       uint32_t first_strip = first&0xf;
 
        uint32_t last_surface = last>>8;
-       uint32_t last_strip = last&0x8;
+       uint32_t last_strip = last&0xf;
+
+       DEBUG_TRACE (DEBUG::MackieControl, string_compose ("PRR %5 in list %1.%2 - %3.%4\n", first_surface, first_strip, last_surface, last_strip,
+                                                          down.size()));
        
        for (Surfaces::const_iterator s = surfaces.begin(); s != surfaces.end(); ++s) {
                
@@ -1335,6 +1341,9 @@ MackieControlProtocol::pull_route_range (list<uint32_t>& down, RouteList& select
                                ls = (*s)->n_strips ();
                        }
 
+                       DEBUG_TRACE (DEBUG::MackieControl, string_compose ("adding strips for surface %1 (%2 .. %3)\n",
+                                                                          (*s)->number(), fs, ls));
+
                        for (uint32_t n = fs; n < ls; ++n) {
                                boost::shared_ptr<Route> r = (*s)->nth_strip (n)->route();
                                if (r) {