From d08a0b44024604192d2c4fdfb10b7faf8e183b12 Mon Sep 17 00:00:00 2001 From: paul Date: Tue, 10 Aug 2010 21:27:19 +0000 Subject: [PATCH] part 2 of the OMG-make-radio-buttons-and-actions-work-properly commit for the step editor git-svn-id: http://subversion.ardour.org/svn/ardour2/ardour2/branches/3.0@7588 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/gtkmm2ext/bindings.cc | 8 ++++++-- 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 0ee96b0bc..af709b49b 100644 --- a/libs/gtkmm2ext/bindings.cc +++ b/libs/gtkmm2ext/bindings.cc @@ -299,13 +299,17 @@ ActionMap::register_action (const char* path, RefPtr ActionMap::register_radio_action (const char* path, Gtk::RadioAction::Group& rgroup, - const char* name, const char* label, sigc::slot sl) + const char* name, const char* label, + sigc::slot sl, + int value) { string fullpath; RefPtr act = RadioAction::create (rgroup, name, label); + RefPtr ract = RefPtr::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 0ece4a740..6959dc82e 100644 --- a/libs/gtkmm2ext/gtkmm2ext/bindings.h +++ b/libs/gtkmm2ext/gtkmm2ext/bindings.h @@ -55,7 +55,9 @@ class ActionMap { Glib::RefPtr register_action (const char* path, const char* name, const char* label, sigc::slot sl); Glib::RefPtr register_radio_action (const char* path, Gtk::RadioAction::Group&, - const char* name, const char* label, sigc::slot sl); + const char* name, const char* label, + sigc::slot sl, + int value); Glib::RefPtr register_toggle_action (const char*path, const char* name, const char* label, sigc::slot sl); -- 2.11.4.GIT