action script GUI details (sensitivity + tooltip)
authorRobin Gareus <robin@gareus.org>
Sat, 14 May 2016 13:06:24 +0000 (15:06 +0200)
committerRobin Gareus <robin@gareus.org>
Sat, 14 May 2016 13:16:23 +0000 (15:16 +0200)
gtk2_ardour/ardour_ui_dependents.cc
gtk2_ardour/editor.cc
gtk2_ardour/editor_actions.cc

index 1453732a113e059f4cb0832cc410e0edd0f2d48f..3aad35ac06bb4835a62e9a068c1cbcc5e9a809e6 100644 (file)
@@ -309,6 +309,7 @@ ARDOUR_UI::setup_windows ()
                assert (act);
                action_script_call_btn[i].set_text (string_compose ("%1", i+1));
                action_script_call_btn[i].set_related_action (act);
+               action_script_call_btn[i].set_sensitive (act->get_sensitive ());
                const int row = i % 3;
                const int col = i / 3;
                action_script_table.attach (action_script_call_btn[i], col, col + 1, row, row + 1, EXPAND, EXPAND, 1, 1);
index 49b5b5491e49b51128696b6ab4cc4ab0a47f5d8f..14021d7e459c1267f0ed35344ba94015197099cd 100644 (file)
@@ -5740,7 +5740,7 @@ Editor::set_script_action_name (int i, const std::string& n)
        assert (act);
        if (n.empty ()) {
                act->set_label (string_compose (_("Unset #%1"), i + 1));
-               act->set_tooltip (_("(no action bound"));
+               act->set_tooltip (_("no action bound"));
                act->set_sensitive (false);
        } else {
                act->set_label (n);
index 39587d33e3b268ff403260ec07a50b161f8ff179..ed928067dc4e79709ad8b23057b35110d73a2e59 100644 (file)
@@ -478,8 +478,8 @@ Editor::register_actions ()
        for (int i = 1; i <= 9; ++i) {
                string const a = string_compose (X_("script-action-%1"), i);
                string const n = string_compose (_("Unset #%1"), i);
-               act = reg_sens (editor_actions, a.c_str(), n.c_str(), sigc::bind (sigc::mem_fun (*this, &Editor::trigger_script), i - 1));
-               act->set_tooltip (_("(no action bound"));
+               act = myactions.register_action (editor_actions, a.c_str(), n.c_str(), sigc::bind (sigc::mem_fun (*this, &Editor::trigger_script), i - 1));
+               act->set_tooltip (_("no action bound"));
                act->set_sensitive (false);
        }