diff options
Diffstat (limited to 'src/gui/Controls.cpp')
-rw-r--r-- | src/gui/Controls.cpp | 36 |
1 files changed, 9 insertions, 27 deletions
diff --git a/src/gui/Controls.cpp b/src/gui/Controls.cpp index 39c18a88..6ab9081a 100644 --- a/src/gui/Controls.cpp +++ b/src/gui/Controls.cpp @@ -42,6 +42,7 @@ Control::Control(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& : Gtk::VBox(cobject) , _control_panel(NULL) , _enable_signal(false) + , _name_label(NULL) { Glib::RefPtr<Gnome::Glade::Xml> menu_xml = GladeFactory::new_glade_reference("port_control_menu"); menu_xml->get_widget("port_control_menu", _menu); @@ -74,6 +75,14 @@ Control::init(ControlPanel* panel, SharedPtr<PortModel> pm) void +Control::set_name(const string& name) +{ + const string name_markup = string("<span weight=\"bold\">") + name + "</span>"; + _name_label->set_markup(name_markup); +} + + +void Control::menu_properties() { Glib::RefPtr<Gnome::Glade::Xml> xml = GladeFactory::new_glade_reference(); @@ -213,15 +222,6 @@ SliderControl::set_range(float min, float max) void -SliderControl::set_name(const string& name) -{ - string name_label = "<span weight=\"bold\">"; - name_label += name + "</span>"; - _name_label->set_markup(name_label); -} - - -void SliderControl::enable() { _slider->property_sensitive() = true; @@ -410,15 +410,6 @@ ToggleControl::init(ControlPanel* panel, SharedPtr<PortModel> pm) void -ToggleControl::set_name(const string& name) -{ - string name_label = "<span weight=\"bold\">"; - name_label += name + "</span>"; - _name_label->set_markup(name_label); -} - - -void ToggleControl::set_value(const Atom& val) { bool enable = false; @@ -500,15 +491,6 @@ StringControl::init(ControlPanel* panel, SharedPtr<PortModel> pm) void -StringControl::set_name(const string& name) -{ - string name_label = "<span weight=\"bold\">"; - name_label += name + "</span>"; - _name_label->set_markup(name_label); -} - - -void StringControl::set_value(const Atom& val) { _enable_signal = false; |