diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2010-08-10 21:27:19 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2010-08-10 21:27:19 +0000 |
commit | 71970fb8811a2889b0b98b357e5a9615862f611f (patch) | |
tree | b01d8a9819401b65779089e14c4053db56a189ad /libs/gtkmm2ext | |
parent | a448f2827cd5f0d5db77bb9a7c6adbe15e497abd (diff) |
part 2 of the OMG-make-radio-buttons-and-actions-work-properly commit for the step editor
git-svn-id: svn://localhost/ardour2/branches/3.0@7588 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/gtkmm2ext')
-rw-r--r-- | libs/gtkmm2ext/bindings.cc | 8 | ||||
-rw-r--r-- | libs/gtkmm2ext/gtkmm2ext/bindings.h | 4 |
2 files changed, 9 insertions, 3 deletions
diff --git a/libs/gtkmm2ext/bindings.cc b/libs/gtkmm2ext/bindings.cc index 0ee96b0bca..af709b49b6 100644 --- a/libs/gtkmm2ext/bindings.cc +++ b/libs/gtkmm2ext/bindings.cc @@ -299,13 +299,17 @@ ActionMap::register_action (const char* path, RefPtr<Action> ActionMap::register_radio_action (const char* path, Gtk::RadioAction::Group& rgroup, - const char* name, const char* label, sigc::slot<void> sl) + const char* name, const char* label, + sigc::slot<void,GtkAction*> sl, + int value) { string fullpath; RefPtr<Action> act = RadioAction::create (rgroup, name, label); + RefPtr<RadioAction> ract = RefPtr<RadioAction>::cast_dynamic(act); + ract->property_value() = value; - act->signal_activate().connect (sl); + act->signal_activate().connect (sigc::bind (sl, act->gobj())); fullpath = path; fullpath += '/'; diff --git a/libs/gtkmm2ext/gtkmm2ext/bindings.h b/libs/gtkmm2ext/gtkmm2ext/bindings.h index 0ece4a7404..6959dc82e1 100644 --- a/libs/gtkmm2ext/gtkmm2ext/bindings.h +++ b/libs/gtkmm2ext/gtkmm2ext/bindings.h @@ -55,7 +55,9 @@ class ActionMap { Glib::RefPtr<Gtk::Action> register_action (const char* path, const char* name, const char* label, sigc::slot<void> sl); Glib::RefPtr<Gtk::Action> register_radio_action (const char* path, Gtk::RadioAction::Group&, - const char* name, const char* label, sigc::slot<void> sl); + const char* name, const char* label, + sigc::slot<void,GtkAction*> sl, + int value); Glib::RefPtr<Gtk::Action> register_toggle_action (const char*path, const char* name, const char* label, sigc::slot<void> sl); |