summaryrefslogtreecommitdiff
path: root/libs/gtkmm2ext/actions.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2012-06-07 21:51:25 +0000
committerCarl Hetherington <carl@carlh.net>2012-06-07 21:51:25 +0000
commitf13119d2e111e7f295330560478ed6090f27a1f6 (patch)
tree5633bdce7394d6a3bb82600fe6103ffd881790a3 /libs/gtkmm2ext/actions.cc
parent688d8cca990c81d038f036f4f78f5667849bcf20 (diff)
Slightly grubby hack to fix up the state of the Window->Mixer menu item when the mixer is opened on starting Ardour (#4808).
git-svn-id: svn://localhost/ardour2/branches/3.0@12599 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/gtkmm2ext/actions.cc')
-rw-r--r--libs/gtkmm2ext/actions.cc14
1 files changed, 13 insertions, 1 deletions
diff --git a/libs/gtkmm2ext/actions.cc b/libs/gtkmm2ext/actions.cc
index 74533f96a4..84a738f278 100644
--- a/libs/gtkmm2ext/actions.cc
+++ b/libs/gtkmm2ext/actions.cc
@@ -345,8 +345,20 @@ ActionManager::set_sensitive (vector<RefPtr<Action> >& actions, bool state)
}
void
+ActionManager::check_toggleaction (string n)
+{
+ set_toggleaction_state (n, true);
+}
+
+void
ActionManager::uncheck_toggleaction (string n)
{
+ set_toggleaction_state (n, false);
+}
+
+void
+ActionManager::set_toggleaction_state (string n, bool s)
+{
char const * name = n.c_str ();
const char *last_slash = strrchr (name, '/');
@@ -369,7 +381,7 @@ ActionManager::uncheck_toggleaction (string n)
RefPtr<Action> act = get_action (group_name, action_name);
if (act) {
RefPtr<ToggleAction> tact = RefPtr<ToggleAction>::cast_dynamic(act);
- tact->set_active (false);
+ tact->set_active (s);
} else {
error << string_compose (_("Unknown action name: %1"), name) << endmsg;
}