summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2016-05-14 15:06:24 +0200
committerRobin Gareus <robin@gareus.org>2016-05-14 15:16:23 +0200
commit4d74b5e42074300c77d48e0c327218387f0ec361 (patch)
tree90a40e10f9a007583f19eaa201b96d53a7981fe7
parent15722b957c3fef2cc833b2b258a502409c7fbbc2 (diff)
action script GUI details (sensitivity + tooltip)
-rw-r--r--gtk2_ardour/ardour_ui_dependents.cc1
-rw-r--r--gtk2_ardour/editor.cc2
-rw-r--r--gtk2_ardour/editor_actions.cc4
3 files changed, 4 insertions, 3 deletions
diff --git a/gtk2_ardour/ardour_ui_dependents.cc b/gtk2_ardour/ardour_ui_dependents.cc
index 1453732a11..3aad35ac06 100644
--- a/gtk2_ardour/ardour_ui_dependents.cc
+++ b/gtk2_ardour/ardour_ui_dependents.cc
@@ -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);
diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc
index 49b5b5491e..14021d7e45 100644
--- a/gtk2_ardour/editor.cc
+++ b/gtk2_ardour/editor.cc
@@ -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);
diff --git a/gtk2_ardour/editor_actions.cc b/gtk2_ardour/editor_actions.cc
index 39587d33e3..ed928067dc 100644
--- a/gtk2_ardour/editor_actions.cc
+++ b/gtk2_ardour/editor_actions.cc
@@ -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);
}