major design changes: use glib event loop for MIDI thread/UI; rework design of BaseUI...
[ardour.git] / libs / gtkmm2ext / gtkmm2ext / stateful_button.h
index c86402e54e7b5841a488071da4c3fe8fe9683f05..1ba8ddf6f50bd67d69682f5cbd0ceb43d503485a 100644 (file)
@@ -42,7 +42,7 @@ class StateButton
        bool _is_realized;
 
        virtual std::string get_widget_name() const = 0;
-       virtual void set_widget_name (std::string) = 0;
+       virtual void set_widget_name (const std::string&) = 0;
        virtual int get_widget_state() = 0;
 };
 
@@ -59,7 +59,7 @@ class StatefulToggleButton : public StateButton, public Gtk::ToggleButton
        void on_toggled ();
 
        std::string get_widget_name() const { return get_name(); }
-       void set_widget_name (std::string name) { set_name (name); get_child()->set_name (name); }
+       void set_widget_name (const std::string& name);
        int get_widget_state() { return get_state(); }
 };
 
@@ -74,7 +74,7 @@ class StatefulButton : public StateButton, public Gtk::Button
        void on_realize ();
 
        std::string get_widget_name() const { return get_name(); }
-       void set_widget_name (std::string name) { set_name (name); get_child()->set_name (name); }
+       void set_widget_name (const std::string& name);
        int get_widget_state() { return get_state(); }
 };