From 49dcb26a2133e5067a1e63b2a5633444c08bb85a Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 14 Feb 2010 01:27:46 +0000 Subject: Remove voice specific control setting. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2445 a436a847-0d15-0410-975c-d299462d15a1 --- src/gui/ControlPanel.cpp | 77 +++--------------------------------------------- src/gui/ControlPanel.hpp | 10 ------- src/gui/PatchView.cpp | 2 +- src/gui/ingen_gui.glade | 69 ------------------------------------------- 4 files changed, 5 insertions(+), 153 deletions(-) (limited to 'src/gui') diff --git a/src/gui/ControlPanel.cpp b/src/gui/ControlPanel.cpp index 63361c45..eda1adc0 100644 --- a/src/gui/ControlPanel.cpp +++ b/src/gui/ControlPanel.cpp @@ -37,16 +37,6 @@ ControlPanel::ControlPanel(BaseObjectType* cobject, const Glib::RefPtrget_widget("control_panel_controls_box", _control_box); - xml->get_widget("control_panel_voice_controls_box", _voice_control_box); - xml->get_widget("control_panel_all_voices_radio", _all_voices_radio); - xml->get_widget("control_panel_specific_voice_radio", _specific_voice_radio); - xml->get_widget("control_panel_voice_spinbutton", _voice_spinbutton); - - _all_voices_radio->signal_toggled().connect( - sigc::mem_fun(this, &ControlPanel::all_voices_selected)); - - _specific_voice_radio->signal_toggled().connect( - sigc::mem_fun(this, &ControlPanel::specific_voice_selected)); show_all(); } @@ -65,24 +55,10 @@ ControlPanel::init(SharedPtr node, uint32_t poly) assert(node != NULL); assert(poly > 0); - if (node->polyphonic()) { - _voice_spinbutton->set_range(0, poly - 1); - _voice_control_box->show(); - } else { - _voice_control_box->hide(); - } - for (NodeModel::Ports::const_iterator i = node->ports().begin(); i != node->ports().end(); ++i) { add_port(*i); } - node->signal_property.connect( - sigc::mem_fun(this, &ControlPanel::property_changed)); - - if (node->parent()) - node->signal_property.connect( - sigc::mem_fun(this, &ControlPanel::parent_property_changed)); - _callback_enabled = true; } @@ -153,11 +129,6 @@ ControlPanel::add_port(SharedPtr pm) _control_box->size_request(controls_size); _ideal_size.first = controls_size.width; _ideal_size.second = controls_size.height; - - Gtk::Requisition voice_size; - _voice_control_box->size_request(voice_size); - _ideal_size.first += voice_size.width; - _ideal_size.second += voice_size.height; } @@ -185,50 +156,10 @@ void ControlPanel::value_changed_atom(SharedPtr port, const Raul::Atom& val) { if (_callback_enabled) { - if (_all_voices_radio->get_active()) { - App::instance().engine()->set_property(port->path(), - App::instance().uris().ingen_value, - val); - port->value(val); - } else { - int voice = _voice_spinbutton->get_value_as_int(); - App::instance().engine()->set_voice_value(port->path(), voice, val); - port->value(val); - } - } -} - - -void -ControlPanel::all_voices_selected() -{ - _voice_spinbutton->property_sensitive() = false; -} - - -void -ControlPanel::specific_voice_selected() -{ - _voice_spinbutton->property_sensitive() = true; -} - - -void -ControlPanel::parent_property_changed(const Raul::URI& predicate, const Raul::Atom& value) -{ - if (predicate == App::instance().uris().ingen_polyphony && value.type() == Atom::INT) - _voice_spinbutton->set_range(0, value.get_int32() - 1); -} - - -void -ControlPanel::property_changed(const Raul::URI& predicate, const Raul::Atom& value) -{ - if (predicate == App::instance().uris().ingen_polyphony && value.type() == Atom::BOOL) { - if (value.get_bool()) - _voice_control_box->show(); - else - _voice_control_box->hide(); + App::instance().engine()->set_property(port->path(), + App::instance().uris().ingen_value, + val); + port->value(val); } } diff --git a/src/gui/ControlPanel.hpp b/src/gui/ControlPanel.hpp index 402ffe13..8683bb58 100644 --- a/src/gui/ControlPanel.hpp +++ b/src/gui/ControlPanel.hpp @@ -73,22 +73,12 @@ public: } private: - void all_voices_selected(); - void specific_voice_selected(); - - void property_changed(const Raul::URI& predicate, const Raul::Atom& value); - void parent_property_changed(const Raul::URI& predicate, const Raul::Atom& value); - bool _callback_enabled; std::pair _ideal_size; std::vector _controls; Gtk::VBox* _control_box; - Gtk::Box* _voice_control_box; - Gtk::RadioButton* _all_voices_radio; - Gtk::RadioButton* _specific_voice_radio; - Gtk::SpinButton* _voice_spinbutton; }; diff --git a/src/gui/PatchView.cpp b/src/gui/PatchView.cpp index 434d455c..b8cc83a1 100644 --- a/src/gui/PatchView.cpp +++ b/src/gui/PatchView.cpp @@ -197,7 +197,7 @@ PatchView::process_toggled() void PatchView::poly_changed() { - App::instance().engine()->set_property(_patch->meta().uri(), + App::instance().engine()->set_property(_patch->path(), App::instance().uris().ingen_polyphony, _poly_spin->get_value_as_int()); } diff --git a/src/gui/ingen_gui.glade b/src/gui/ingen_gui.glade index 85058105..9178a7fe 100644 --- a/src/gui/ingen_gui.glade +++ b/src/gui/ingen_gui.glade @@ -1332,75 +1332,6 @@ 0 - - - True - True - - - All Voices - True - True - False - Apply changed controls to all voices - True - True - - - False - False - 0 - - - - - True - 5 - - - Specific Voice: - True - True - False - Apply changed controls to one voice only - True - True - control_panel_all_voices_radio - - - False - False - 0 - - - - - True - False - True - Voice control changes are applied to - 1 1 100 1 10 0 - 1 - True - - - 1 - - - - - False - False - 1 - - - - - False - 5 - 1 - - -- cgit v1.2.1