diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2012-01-27 19:05:03 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2012-01-27 19:05:03 +0000 |
commit | f56bbe2799d3312707de61858af472dbd37388e3 (patch) | |
tree | 05b78cc36570b18b61bbb1c2a6d53df9c3342cbc /libs | |
parent | ea655d711c03f9d41425b952b1b0648ebcf2a21f (diff) |
fix inconsistent display on selection clocks when in join-object-range mode, and fix restore of that mode from session state via new ActionManager::set_toggle_action()
git-svn-id: svn://localhost/ardour2/branches/3.0@11366 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs')
-rw-r--r-- | libs/gtkmm2ext/actions.cc | 12 | ||||
-rw-r--r-- | libs/gtkmm2ext/gtkmm2ext/actions.h | 1 |
2 files changed, 13 insertions, 0 deletions
diff --git a/libs/gtkmm2ext/actions.cc b/libs/gtkmm2ext/actions.cc index c9aae4568b..02e99f23e9 100644 --- a/libs/gtkmm2ext/actions.cc +++ b/libs/gtkmm2ext/actions.cc @@ -353,3 +353,15 @@ ActionManager::do_action (const char* group, const char*action) } } +void +ActionManager::set_toggle_action (const char* group, const char*action, bool yn) +{ + Glib::RefPtr<Gtk::Action> act = ActionManager::get_action (group, action); + if (act) { + Glib::RefPtr<Gtk::ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic (act); + if (tact) { + tact->set_active (yn); + } + } +} + diff --git a/libs/gtkmm2ext/gtkmm2ext/actions.h b/libs/gtkmm2ext/gtkmm2ext/actions.h index d9082ffbff..0c53e9c10d 100644 --- a/libs/gtkmm2ext/gtkmm2ext/actions.h +++ b/libs/gtkmm2ext/gtkmm2ext/actions.h @@ -44,6 +44,7 @@ namespace ActionManager { extern Glib::RefPtr<Gtk::Action> get_action (const char* group, const char* name); extern Glib::RefPtr<Gtk::Action> get_action (const char* path); extern void do_action (const char* group, const char* name); + extern void set_toggle_action (const char* group, const char* name, bool); extern void add_action_group (Glib::RefPtr<Gtk::ActionGroup>); |