summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2010-02-14 01:27:46 +0000
committerDavid Robillard <d@drobilla.net>2010-02-14 01:27:46 +0000
commit49dcb26a2133e5067a1e63b2a5633444c08bb85a (patch)
treeabf99ee05c65c581029e9139ec8de004f35c450d /src/gui
parent16cc07ce3c37ca663ec40c2dcea3302de69966b1 (diff)
downloadingen-49dcb26a2133e5067a1e63b2a5633444c08bb85a.tar.gz
ingen-49dcb26a2133e5067a1e63b2a5633444c08bb85a.tar.bz2
ingen-49dcb26a2133e5067a1e63b2a5633444c08bb85a.zip
Remove voice specific control setting.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2445 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/ControlPanel.cpp77
-rw-r--r--src/gui/ControlPanel.hpp10
-rw-r--r--src/gui/PatchView.cpp2
-rw-r--r--src/gui/ingen_gui.glade69
4 files changed, 5 insertions, 153 deletions
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::RefPtr<Gnome::Gl
, _callback_enabled(true)
{
xml->get_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<NodeModel> 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<PortModel> 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<PortModel> 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<int,int> _ideal_size;
std::vector<Control*> _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 @@
<property name="position">0</property>
</packing>
</child>
- <child>
- <widget class="GtkHBox" id="control_panel_voice_controls_box">
- <property name="visible">True</property>
- <property name="homogeneous">True</property>
- <child>
- <widget class="GtkRadioButton" id="control_panel_all_voices_radio">
- <property name="label" translatable="yes">All Voices</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="tooltip" translatable="yes">Apply changed controls to all voices</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <widget class="GtkHBox" id="hbox32">
- <property name="visible">True</property>
- <property name="spacing">5</property>
- <child>
- <widget class="GtkRadioButton" id="control_panel_specific_voice_radio">
- <property name="label" translatable="yes">Specific Voice:</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="tooltip" translatable="yes">Apply changed controls to one voice only</property>
- <property name="use_underline">True</property>
- <property name="draw_indicator">True</property>
- <property name="group">control_panel_all_voices_radio</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <widget class="GtkSpinButton" id="control_panel_voice_spinbutton">
- <property name="visible">True</property>
- <property name="sensitive">False</property>
- <property name="can_focus">True</property>
- <property name="tooltip" translatable="yes">Voice control changes are applied to</property>
- <property name="adjustment">1 1 100 1 10 0</property>
- <property name="climb_rate">1</property>
- <property name="numeric">True</property>
- </widget>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="padding">5</property>
- <property name="position">1</property>
- </packing>
- </child>
</widget>
</child>
<child>