summaryrefslogtreecommitdiffstats
path: root/src/gui/Controls.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/Controls.cpp')
-rw-r--r--src/gui/Controls.cpp68
1 files changed, 18 insertions, 50 deletions
diff --git a/src/gui/Controls.cpp b/src/gui/Controls.cpp
index 6e2fd6be..8564fbed 100644
--- a/src/gui/Controls.cpp
+++ b/src/gui/Controls.cpp
@@ -76,6 +76,24 @@ Control::init(ControlPanel* panel, SharedPtr<PortModel> pm)
void
+Control::enable()
+{
+ for (Gtk::Box_Helpers::BoxList::const_iterator i = children().begin();
+ i != children().end(); ++i)
+ i->get_widget()->set_sensitive(true);
+}
+
+
+void
+Control::disable()
+{
+ for (Gtk::Box_Helpers::BoxList::const_iterator i = children().begin();
+ i != children().end(); ++i)
+ i->get_widget()->set_sensitive(false);
+}
+
+
+void
Control::set_name(const string& name)
{
const string name_markup = string("<span weight=\"bold\">") + name + "</span>";
@@ -223,24 +241,6 @@ SliderControl::set_range(float min, float max)
void
-SliderControl::enable()
-{
- _slider->property_sensitive() = true;
- _value_spinner->property_sensitive() = true;
- _name_label->property_sensitive() = true;
-}
-
-
-void
-SliderControl::disable()
-{
- _slider->property_sensitive() = false;
- _value_spinner->property_sensitive() = false;
- _name_label->property_sensitive() = false;
-}
-
-
-void
SliderControl::update_value_from_slider()
{
if (_enable_signal) {
@@ -353,22 +353,6 @@ ToggleControl::set_value(const Atom& val)
void
-ToggleControl::enable()
-{
- _checkbutton->property_sensitive() = true;
- _name_label->property_sensitive() = true;
-}
-
-
-void
-ToggleControl::disable()
-{
- _checkbutton->property_sensitive() = false;
- _name_label->property_sensitive() = false;
-}
-
-
-void
ToggleControl::toggled()
{
if (_enable_signal) {
@@ -422,22 +406,6 @@ StringControl::set_value(const Atom& val)
void
-StringControl::enable()
-{
- _entry->property_sensitive() = true;
- _name_label->property_sensitive() = true;
-}
-
-
-void
-StringControl::disable()
-{
- _entry->property_sensitive() = false;
- _name_label->property_sensitive() = false;
-}
-
-
-void
StringControl::activated()
{
if (_enable_signal)