MCP: gui changes; more debugging for button bnding lookup
authorPaul Davis <paul@linuxaudiosystems.com>
Wed, 18 Apr 2012 12:20:28 +0000 (12:20 +0000)
committerPaul Davis <paul@linuxaudiosystems.com>
Wed, 18 Apr 2012 12:20:28 +0000 (12:20 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@12002 d708f5d6-7413-0410-9779-e7cbd77b26cf

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

index 7bcd7681e132cc695d6a62004e79d6a5fdb1a429..6321495c59c7ee66620071a3db11ab41b3119b33 100644 (file)
@@ -74,9 +74,6 @@ MackieControlProtocolGUI::MackieControlProtocolGUI (MackieControlProtocol& p)
        table->attach (*manage (new Gtk::Label (_("Device Type:"))), 0, 1, 0, 1, AttachOptions(FILL|EXPAND), AttachOptions(0));
        table->attach (_surface_combo, 1, 2, 0, 1, AttachOptions(FILL|EXPAND), AttachOptions(0));
 
-       table->attach (*manage (new Gtk::Label (_("Profile/Settings:"))), 0, 1, 1, 2, AttachOptions(FILL|EXPAND), AttachOptions(0));
-       table->attach (_profile_combo, 1, 2, 1, 2, AttachOptions(FILL|EXPAND), AttachOptions(0));
-
        vector<string> surfaces;
        
        for (std::map<std::string,DeviceInfo>::iterator i = DeviceInfo::device_info.begin(); i != DeviceInfo::device_info.end(); ++i) {
@@ -97,18 +94,33 @@ MackieControlProtocolGUI::MackieControlProtocolGUI (MackieControlProtocol& p)
        _profile_combo.set_active_text (p.device_profile().name());
        _profile_combo.signal_changed().connect (sigc::mem_fun (*this, &MackieControlProtocolGUI::profile_combo_changed));
 
-       append_page (*table, _("Device Selection"));
+       append_page (*table, _("Device Setup"));
        table->show_all();
 
        /* function key editor */
 
-       append_page (function_key_scroller, _("Function Keys"));
+       VBox* fkey_packer = manage (new VBox);
+       HBox* profile_packer = manage (new HBox);
+
+
+       Label* l = manage (new Gtk::Label (_("Profile/Settings:")));
+       profile_packer->pack_start (*l, false, false);
+       profile_packer->pack_start (_profile_combo, true, true);
+       profile_packer->set_spacing (12);
+       profile_packer->set_border_width (12);
+
+       fkey_packer->pack_start (*profile_packer, false, false);
+       fkey_packer->pack_start (function_key_scroller, true, true);
+       fkey_packer->set_spacing (12);
+       function_key_scroller.set_size_request (700,700);
+       function_key_scroller.property_shadow_type() = Gtk::SHADOW_NONE;
        function_key_scroller.add (function_key_editor);
+       append_page (*fkey_packer, _("Function Keys"));
        
        build_available_action_menu ();
        build_function_key_editor ();
        refresh_function_key_editor ();
-       function_key_scroller.show_all();
+       fkey_packer->show_all();
 }
 
 CellRendererCombo*
index e75d1824e2f2afb8551340f1d90bc1ec2a10294b..d1416d6e9f0bfc278ee87f44d452037f3722a5a8 100644 (file)
@@ -1041,6 +1041,9 @@ MackieControlProtocol::handle_button_event (Surface& surface, Button& button, Bu
        
        string action = _device_profile.get_button_action (button.bid(), _modifier_state);
        
+       DEBUG_TRACE (DEBUG::MackieControl, string_compose ("Looked up action for button %1 with modifier %2, got [%3]\n",
+                                                          button.bid(), _modifier_state, action));
+
        if (!action.empty()) {
                /* if there is a bound action for this button, and this is a press event,
                   carry out the action. If its a release event, do nothing since we 
@@ -1048,6 +1051,7 @@ MackieControlProtocol::handle_button_event (Surface& surface, Button& button, Bu
                   occur either.
                */
                if (bs == press) {
+                       DEBUG_TRACE (DEBUG::MackieControl, string_compose ("executing action %1\n", action));
                        access_action (action);
                }
                return;