From 71970fb8811a2889b0b98b357e5a9615862f611f Mon Sep 17 00:00:00 2001 From: Paul Davis 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: svn://localhost/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 0ee96b0bca..af709b49b6 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 0ece4a7404..6959dc82e1 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);