part 2 of the OMG-make-radio-buttons-and-actions-work-properly commit for the step...
authorPaul Davis <paul@linuxaudiosystems.com>
Tue, 10 Aug 2010 21:27:19 +0000 (21:27 +0000)
committerPaul Davis <paul@linuxaudiosystems.com>
Tue, 10 Aug 2010 21:27:19 +0000 (21:27 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@7588 d708f5d6-7413-0410-9779-e7cbd77b26cf

libs/gtkmm2ext/bindings.cc
libs/gtkmm2ext/gtkmm2ext/bindings.h

index 0ee96b0bca5f1c3d84fbaab15f528503ac6ad349..af709b49b6c737d026be25c1aa3f6aaef9d83ae0 100644 (file)
@@ -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 += '/';
index 0ece4a74046deda048fba511fceb484993f24d03..6959dc82e191d14cb8da2daf8fe7bc25117bbe84 100644 (file)
@@ -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);