summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/Controls.cpp4
-rw-r--r--src/gui/PatchCanvas.cpp12
-rw-r--r--src/gui/PatchPropertiesWindow.cpp23
-rw-r--r--src/gui/PatchPropertiesWindow.hpp1
-rw-r--r--src/gui/Port.cpp6
-rw-r--r--src/gui/PortPropertiesWindow.cpp12
-rw-r--r--src/gui/ingen_gui.glade42
7 files changed, 69 insertions, 31 deletions
diff --git a/src/gui/Controls.cpp b/src/gui/Controls.cpp
index 456439ea..27de1259 100644
--- a/src/gui/Controls.cpp
+++ b/src/gui/Controls.cpp
@@ -191,9 +191,9 @@ SliderControl::set_value(const Atom& atom)
void
SliderControl::port_variable_change(const string& key, const Atom& value)
{
- if ( (key == "ingen:minimum") && value.type() == Atom::FLOAT)
+ if ( (key == "lv2:minimum") && value.type() == Atom::FLOAT)
set_range(value.get_float(), _slider->get_adjustment()->get_upper());
- else if ( (key == "ingen:maximum") && value.type() == Atom::FLOAT)
+ else if ( (key == "lv2:maximum") && value.type() == Atom::FLOAT)
set_range(_slider->get_adjustment()->get_lower(), value.get_float());
}
diff --git a/src/gui/PatchCanvas.cpp b/src/gui/PatchCanvas.cpp
index 91c8a926..107cdaa8 100644
--- a/src/gui/PatchCanvas.cpp
+++ b/src/gui/PatchCanvas.cpp
@@ -87,16 +87,16 @@ PatchCanvas::PatchCanvas(SharedPtr<PatchModel> patch, int width, int height)
// Add port menu items
_menu_add_audio_input->signal_activate().connect(
sigc::bind(sigc::mem_fun(this, &PatchCanvas::menu_add_port),
- "audio_input", "ingen:AudioPort", false));
+ "audio_input", "lv2:AudioPort", false));
_menu_add_audio_output->signal_activate().connect(
sigc::bind(sigc::mem_fun(this, &PatchCanvas::menu_add_port),
- "audio_output", "ingen:AudioPort", true));
+ "audio_output", "lv2:AudioPort", true));
_menu_add_control_input->signal_activate().connect(
sigc::bind(sigc::mem_fun(this, &PatchCanvas::menu_add_port),
- "control_input", "ingen:ControlPort", false));
+ "control_input", "lv2:ControlPort", false));
_menu_add_control_output->signal_activate().connect(
sigc::bind(sigc::mem_fun(this, &PatchCanvas::menu_add_port),
- "control_output", "ingen:ControlPort", true));
+ "control_output", "lv2:ControlPort", true));
_menu_add_midi_input->signal_activate().connect(
sigc::bind(sigc::mem_fun(this, &PatchCanvas::menu_add_port),
"midi_input", "ingen:MIDIPort", false));
@@ -111,10 +111,10 @@ PatchCanvas::PatchCanvas(SharedPtr<PatchModel> patch, int width, int height)
"osc_output", "ingen:OSCPort", true));
_menu_add_event_input->signal_activate().connect(
sigc::bind(sigc::mem_fun(this, &PatchCanvas::menu_add_port),
- "event_input", "ingen:EventPort", false));
+ "event_input", "lv2ev:EventPort", false));
_menu_add_event_output->signal_activate().connect(
sigc::bind(sigc::mem_fun(this, &PatchCanvas::menu_add_port),
- "event_output", "ingen:EventPort", true));
+ "event_output", "lv2ev:EventPort", true));
// Add control menu items
/*_menu_add_number_control->signal_activate().connect(
diff --git a/src/gui/PatchPropertiesWindow.cpp b/src/gui/PatchPropertiesWindow.cpp
index f4003d31..caf81452 100644
--- a/src/gui/PatchPropertiesWindow.cpp
+++ b/src/gui/PatchPropertiesWindow.cpp
@@ -30,6 +30,7 @@ namespace GUI {
PatchPropertiesWindow::PatchPropertiesWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& glade_xml)
: Gtk::Window(cobject)
{
+ glade_xml->get_widget("properties_name_entry", _name_entry);
glade_xml->get_widget("properties_author_entry", _author_entry);
glade_xml->get_widget("properties_description_textview", _textview);
glade_xml->get_widget("properties_cancel_button", _cancel_button);
@@ -51,11 +52,15 @@ PatchPropertiesWindow::set_patch(SharedPtr<PatchModel> patch_model)
property_title() = patch_model->path() + " Properties";
_patch_model = patch_model;
- const Atom& author_atom = _patch_model->get_variable("dc:creator");
+ const Atom& name_atom = _patch_model->get_property("doap:name");
+ _name_entry->set_text(
+ (name_atom.type() == Atom::STRING) ? name_atom.get_string() : "" );
+
+ const Atom& author_atom = _patch_model->get_property("dc:creator");
_author_entry->set_text(
(author_atom.type() == Atom::STRING) ? author_atom.get_string() : "" );
- const Atom& desc_atom = _patch_model->get_variable("dc:description");
+ const Atom& desc_atom = _patch_model->get_property("dc:description");
_textview->get_buffer()->set_text(
(desc_atom.type() == Atom::STRING) ? desc_atom.get_string() : "" );
}
@@ -64,11 +69,15 @@ PatchPropertiesWindow::set_patch(SharedPtr<PatchModel> patch_model)
void
PatchPropertiesWindow::cancel_clicked()
{
- const Atom& author_atom = _patch_model->get_variable("dc:creator");
+ const Atom& name_atom = _patch_model->get_property("doap:name");
+ _name_entry->set_text(
+ (name_atom.type() == Atom::STRING) ? name_atom.get_string() : "" );
+
+ const Atom& author_atom = _patch_model->get_property("dc:creator");
_author_entry->set_text(
(author_atom.type() == Atom::STRING) ? author_atom.get_string() : "" );
- const Atom& desc_atom = _patch_model->get_variable("dc:description");
+ const Atom& desc_atom = _patch_model->get_property("dc:description");
_textview->get_buffer()->set_text(
(desc_atom.type() == Atom::STRING) ? desc_atom.get_string() : "" );
@@ -79,9 +88,11 @@ PatchPropertiesWindow::cancel_clicked()
void
PatchPropertiesWindow::ok_clicked()
{
- App::instance().engine()->set_variable(_patch_model->path(), "dc:creator",
+ App::instance().engine()->set_property(_patch_model->path(), "doap:name",
+ Atom(_name_entry->get_text()));
+ App::instance().engine()->set_property(_patch_model->path(), "dc:creator",
Atom(_author_entry->get_text()));
- App::instance().engine()->set_variable(_patch_model->path(), "dc:description",
+ App::instance().engine()->set_property(_patch_model->path(), "dc:description",
Atom(_textview->get_buffer()->get_text()));
hide();
}
diff --git a/src/gui/PatchPropertiesWindow.hpp b/src/gui/PatchPropertiesWindow.hpp
index 0f60b147..59d27389 100644
--- a/src/gui/PatchPropertiesWindow.hpp
+++ b/src/gui/PatchPropertiesWindow.hpp
@@ -51,6 +51,7 @@ public:
private:
SharedPtr<PatchModel> _patch_model;
+ Gtk::Entry* _name_entry;
Gtk::Entry* _author_entry;
Gtk::TextView* _textview;
Gtk::Button* _cancel_button;
diff --git a/src/gui/Port.cpp b/src/gui/Port.cpp
index 38db6d25..efca1a54 100644
--- a/src/gui/Port.cpp
+++ b/src/gui/Port.cpp
@@ -138,11 +138,11 @@ Port::set_control(float value, bool signal)
void
Port::variable_changed(const string& key, const Atom& value)
{
- if ( (key == "ingen:minimum") && value.type() == Atom::FLOAT)
+ if ( (key == "lv2:minimum") && value.type() == Atom::FLOAT)
set_control_min(value.get_float());
- else if ( (key == "ingen:maximum") && value.type() == Atom::FLOAT)
+ else if ( (key == "lv2:maximum") && value.type() == Atom::FLOAT)
set_control_max(value.get_float());
- else if ( (key == "ingen:toggled") && value.type() == Atom::BOOL)
+ else if ( (key == "lv2:toggled") && value.type() == Atom::BOOL)
set_toggled(value.get_bool());
}
diff --git a/src/gui/PortPropertiesWindow.cpp b/src/gui/PortPropertiesWindow.cpp
index ddab5715..d2a1041c 100644
--- a/src/gui/PortPropertiesWindow.cpp
+++ b/src/gui/PortPropertiesWindow.cpp
@@ -94,9 +94,9 @@ PortPropertiesWindow::variable_change(const string& key, const Atom& value)
{
_enable_signal = false;
- if ( (key == "ingen:minimum") && value.type() == Atom::FLOAT)
+ if ( (key == "lv2:minimum") && value.type() == Atom::FLOAT)
_min_spinner->set_value(value.get_float());
- else if ( (key == "ingen:maximum") && value.type() == Atom::FLOAT)
+ else if ( (key == "lv2:maximum") && value.type() == Atom::FLOAT)
_max_spinner->set_value(value.get_float());
_enable_signal = true;
@@ -115,7 +115,7 @@ PortPropertiesWindow::min_changed()
}
if (_enable_signal)
- App::instance().engine()->set_variable(_port_model->path(), "ingen:minimum", min);
+ App::instance().engine()->set_variable(_port_model->path(), "lv2:minimum", min);
}
@@ -131,15 +131,15 @@ PortPropertiesWindow::max_changed()
}
if (_enable_signal)
- App::instance().engine()->set_variable(_port_model->path(), "ingen:maximum", max);
+ App::instance().engine()->set_variable(_port_model->path(), "lv2:maximum", max);
}
void
PortPropertiesWindow::cancel()
{
- App::instance().engine()->set_variable(_port_model->path(), "ingen:minimum", _initial_min);
- App::instance().engine()->set_variable(_port_model->path(), "ingen:maximum", _initial_max);
+ App::instance().engine()->set_variable(_port_model->path(), "lv2:minimum", _initial_min);
+ App::instance().engine()->set_variable(_port_model->path(), "lv2:maximum", _initial_max);
hide();
}
diff --git a/src/gui/ingen_gui.glade b/src/gui/ingen_gui.glade
index a86a4b4a..892e0cab 100644
--- a/src/gui/ingen_gui.glade
+++ b/src/gui/ingen_gui.glade
@@ -1935,17 +1935,30 @@
<property name="visible">True</property>
<property name="spacing">6</property>
<child>
- <widget class="GtkHBox" id="hbox51">
+ <widget class="GtkTable" id="table2">
<property name="visible">True</property>
- <property name="spacing">5</property>
+ <property name="n_rows">2</property>
+ <property name="n_columns">2</property>
+ <property name="column_spacing">8</property>
+ <property name="row_spacing">8</property>
<child>
- <widget class="GtkLabel" id="label93">
+ <widget class="GtkLabel" id="label1">
<property name="visible">True</property>
- <property name="label" translatable="yes">Author:</property>
+ <property name="label" translatable="yes">Name:</property>
</widget>
<packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkEntry" id="properties_name_entry">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="invisible_char">*</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
</packing>
</child>
<child>
@@ -1955,13 +1968,26 @@
<property name="invisible_char">*</property>
</widget>
<packing>
- <property name="position">1</property>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label93">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Author:</property>
+ </widget>
+ <packing>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
</packing>
</child>
</widget>
<packing>
<property name="expand">False</property>
- <property name="fill">False</property>
</packing>
</child>
<child>