summaryrefslogtreecommitdiffstats
path: root/src/libs/gui
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-10-08 17:59:56 +0000
committerDavid Robillard <d@drobilla.net>2007-10-08 17:59:56 +0000
commit91ca84684151a67b8e3e1e859b3167e9f687d4d4 (patch)
tree1751b6e4949b47d1880b4c569b6192fef392bfaf /src/libs/gui
parent507d9ffa4771978b6964b4c4b261ee923ba7e324 (diff)
downloadingen-91ca84684151a67b8e3e1e859b3167e9f687d4d4.tar.gz
ingen-91ca84684151a67b8e3e1e859b3167e9f687d4d4.tar.bz2
ingen-91ca84684151a67b8e3e1e859b3167e9f687d4d4.zip
s/MetadataMap/Variables/ etc.
Removed ancient/unused Controller.hpp. git-svn-id: http://svn.drobilla.net/lad/ingen@852 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/gui')
-rw-r--r--src/libs/gui/App.hpp2
-rw-r--r--src/libs/gui/Configuration.hpp2
-rw-r--r--src/libs/gui/ConnectWindow.hpp1
-rw-r--r--src/libs/gui/LoadPatchWindow.cpp2
-rw-r--r--src/libs/gui/LoadPatchWindow.hpp4
-rw-r--r--src/libs/gui/LoadPluginWindow.cpp6
-rw-r--r--src/libs/gui/LoadPluginWindow.hpp4
-rw-r--r--src/libs/gui/LoadRemotePatchWindow.cpp2
-rw-r--r--src/libs/gui/LoadRemotePatchWindow.hpp4
-rw-r--r--src/libs/gui/LoadSubpatchWindow.cpp2
-rw-r--r--src/libs/gui/LoadSubpatchWindow.hpp4
-rw-r--r--src/libs/gui/NewSubpatchWindow.cpp6
-rw-r--r--src/libs/gui/NewSubpatchWindow.hpp4
-rw-r--r--src/libs/gui/NodeModule.cpp16
-rw-r--r--src/libs/gui/NodeModule.hpp2
-rw-r--r--src/libs/gui/ObjectMenu.hpp1
-rw-r--r--src/libs/gui/PatchCanvas.cpp26
-rw-r--r--src/libs/gui/PatchCanvas.hpp2
-rw-r--r--src/libs/gui/PatchPortModule.cpp20
-rw-r--r--src/libs/gui/PatchPortModule.hpp2
-rw-r--r--src/libs/gui/PatchPropertiesWindow.cpp12
-rw-r--r--src/libs/gui/PatchWindow.cpp2
-rw-r--r--src/libs/gui/Port.cpp4
-rw-r--r--src/libs/gui/Port.hpp2
-rw-r--r--src/libs/gui/PortPropertiesWindow.cpp14
-rw-r--r--src/libs/gui/PortPropertiesWindow.hpp2
-rw-r--r--src/libs/gui/ThreadedLoader.cpp12
-rw-r--r--src/libs/gui/ThreadedLoader.hpp12
-rw-r--r--src/libs/gui/UploadPatchWindow.cpp12
-rw-r--r--src/libs/gui/WindowFactory.cpp10
-rw-r--r--src/libs/gui/WindowFactory.hpp10
31 files changed, 100 insertions, 104 deletions
diff --git a/src/libs/gui/App.hpp b/src/libs/gui/App.hpp
index 196bdd96..956ac9bd 100644
--- a/src/libs/gui/App.hpp
+++ b/src/libs/gui/App.hpp
@@ -146,7 +146,7 @@ protected:
ActivityPorts _activity_ports;
/** Used to avoid feedback loops with (eg) process checkbutton
- * FIXME: Maybe this should be globally implemented at the Controller level,
+ * FIXME: This should probably be implemented globally:
* disable all command sending while handling events to avoid feedback
* issues with widget event callbacks? This same pattern is duplicated
* too much... */
diff --git a/src/libs/gui/Configuration.hpp b/src/libs/gui/Configuration.hpp
index ab96cc80..0a3f94db 100644
--- a/src/libs/gui/Configuration.hpp
+++ b/src/libs/gui/Configuration.hpp
@@ -29,8 +29,6 @@ struct Coord { double x; double y; };
namespace Ingen {
namespace GUI {
-class Controller;
-
/** Singleton state manager for the entire app.
*
diff --git a/src/libs/gui/ConnectWindow.hpp b/src/libs/gui/ConnectWindow.hpp
index 086da446..315ae0b2 100644
--- a/src/libs/gui/ConnectWindow.hpp
+++ b/src/libs/gui/ConnectWindow.hpp
@@ -37,7 +37,6 @@ namespace Ingen {
namespace GUI {
class App;
-class Controller;
/** The initially visible "Connect to engine" window.
diff --git a/src/libs/gui/LoadPatchWindow.cpp b/src/libs/gui/LoadPatchWindow.cpp
index 672ff940..9c31c64c 100644
--- a/src/libs/gui/LoadPatchWindow.cpp
+++ b/src/libs/gui/LoadPatchWindow.cpp
@@ -68,7 +68,7 @@ LoadPatchWindow::LoadPatchWindow(BaseObjectType* cobject, const Glib::RefPtr<Gno
void
-LoadPatchWindow::present(SharedPtr<PatchModel> patch, GraphObject::MetadataMap data)
+LoadPatchWindow::present(SharedPtr<PatchModel> patch, GraphObject::Variables data)
{
set_patch(patch);
_initial_data = data;
diff --git a/src/libs/gui/LoadPatchWindow.hpp b/src/libs/gui/LoadPatchWindow.hpp
index 9a4cf210..4f4ff30c 100644
--- a/src/libs/gui/LoadPatchWindow.hpp
+++ b/src/libs/gui/LoadPatchWindow.hpp
@@ -51,7 +51,7 @@ public:
void set_replace() { _replace = true; }
void set_merge() { _replace = false; }
- void present(SharedPtr<PatchModel> patch, GraphObject::MetadataMap data);
+ void present(SharedPtr<PatchModel> patch, GraphObject::Variables data);
protected:
void on_show();
@@ -62,7 +62,7 @@ private:
void ok_clicked();
void cancel_clicked();
- GraphObject::MetadataMap _initial_data;
+ GraphObject::Variables _initial_data;
SharedPtr<PatchModel> _patch;
bool _replace;
diff --git a/src/libs/gui/LoadPluginWindow.cpp b/src/libs/gui/LoadPluginWindow.cpp
index 2c9161c3..cc488210 100644
--- a/src/libs/gui/LoadPluginWindow.cpp
+++ b/src/libs/gui/LoadPluginWindow.cpp
@@ -109,7 +109,7 @@ LoadPluginWindow::LoadPluginWindow(BaseObjectType* cobject, const Glib::RefPtr<G
void
-LoadPluginWindow::present(SharedPtr<PatchModel> patch, GraphObject::MetadataMap data)
+LoadPluginWindow::present(SharedPtr<PatchModel> patch, GraphObject::Variables data)
{
set_patch(patch);
_initial_data = data;
@@ -341,8 +341,8 @@ LoadPluginWindow::add_clicked()
} else {
Path path = _patch->path().base() + Path::nameify(name);
App::instance().engine()->create_node(path, plugin->uri(), polyphonic);
- for (GraphObject::MetadataMap::const_iterator i = _initial_data.begin(); i != _initial_data.end(); ++i)
- App::instance().engine()->set_metadata(path, i->first, i->second);
+ for (GraphObject::Variables::const_iterator i = _initial_data.begin(); i != _initial_data.end(); ++i)
+ App::instance().engine()->set_variable(path, i->first, i->second);
++_plugin_name_offset;
_node_name_entry->set_text(generate_module_name(_plugin_name_offset));
diff --git a/src/libs/gui/LoadPluginWindow.hpp b/src/libs/gui/LoadPluginWindow.hpp
index c0b668ba..4ab4b0e7 100644
--- a/src/libs/gui/LoadPluginWindow.hpp
+++ b/src/libs/gui/LoadPluginWindow.hpp
@@ -96,7 +96,7 @@ public:
void add_plugin(SharedPtr<PluginModel> plugin);
bool has_shown() const { return _has_shown; }
- void present(SharedPtr<PatchModel> patch, GraphObject::MetadataMap data);
+ void present(SharedPtr<PatchModel> patch, GraphObject::Variables data);
protected:
void on_show();
@@ -117,7 +117,7 @@ private:
void plugin_selection_changed();
string generate_module_name(int offset = 0);
- GraphObject::MetadataMap _initial_data;
+ GraphObject::Variables _initial_data;
SharedPtr<PatchModel> _patch;
diff --git a/src/libs/gui/LoadRemotePatchWindow.cpp b/src/libs/gui/LoadRemotePatchWindow.cpp
index c6020ead..4c529d40 100644
--- a/src/libs/gui/LoadRemotePatchWindow.cpp
+++ b/src/libs/gui/LoadRemotePatchWindow.cpp
@@ -60,7 +60,7 @@ LoadRemotePatchWindow::LoadRemotePatchWindow(BaseObjectType* cobject, const Glib
void
-LoadRemotePatchWindow::present(SharedPtr<PatchModel> patch, GraphObject::MetadataMap data)
+LoadRemotePatchWindow::present(SharedPtr<PatchModel> patch, GraphObject::Variables data)
{
_liststore->clear();
diff --git a/src/libs/gui/LoadRemotePatchWindow.hpp b/src/libs/gui/LoadRemotePatchWindow.hpp
index 59b037d2..ca0ca814 100644
--- a/src/libs/gui/LoadRemotePatchWindow.hpp
+++ b/src/libs/gui/LoadRemotePatchWindow.hpp
@@ -63,7 +63,7 @@ public:
void set_replace() { _replace = true; }
void set_merge() { _replace = false; }
- void present(SharedPtr<PatchModel> patch, GraphObject::MetadataMap data);
+ void present(SharedPtr<PatchModel> patch, GraphObject::Variables data);
private:
void patch_activated(const Gtk::TreeModel::Path& path, Gtk::TreeViewColumn* col);
@@ -72,7 +72,7 @@ private:
void open_clicked();
void cancel_clicked();
- GraphObject::MetadataMap _initial_data;
+ GraphObject::Variables _initial_data;
SharedPtr<PatchModel> _patch;
bool _replace;
diff --git a/src/libs/gui/LoadSubpatchWindow.cpp b/src/libs/gui/LoadSubpatchWindow.cpp
index e230720a..2fdbf094 100644
--- a/src/libs/gui/LoadSubpatchWindow.cpp
+++ b/src/libs/gui/LoadSubpatchWindow.cpp
@@ -71,7 +71,7 @@ LoadSubpatchWindow::LoadSubpatchWindow(BaseObjectType* cobject, const Glib::RefP
void
-LoadSubpatchWindow::present(SharedPtr<PatchModel> patch, GraphObject::MetadataMap data)
+LoadSubpatchWindow::present(SharedPtr<PatchModel> patch, GraphObject::Variables data)
{
set_patch(patch);
_initial_data = data;
diff --git a/src/libs/gui/LoadSubpatchWindow.hpp b/src/libs/gui/LoadSubpatchWindow.hpp
index 89600895..ee8a5a16 100644
--- a/src/libs/gui/LoadSubpatchWindow.hpp
+++ b/src/libs/gui/LoadSubpatchWindow.hpp
@@ -44,7 +44,7 @@ public:
void set_patch(SharedPtr<PatchModel> patch);
- void present(SharedPtr<PatchModel> patch, GraphObject::MetadataMap data);
+ void present(SharedPtr<PatchModel> patch, GraphObject::Variables data);
protected:
void on_show();
@@ -58,7 +58,7 @@ private:
void ok_clicked();
void cancel_clicked();
- GraphObject::MetadataMap _initial_data;
+ GraphObject::Variables _initial_data;
SharedPtr<PatchModel> _patch;
diff --git a/src/libs/gui/NewSubpatchWindow.cpp b/src/libs/gui/NewSubpatchWindow.cpp
index 54a0abb9..69c8471e 100644
--- a/src/libs/gui/NewSubpatchWindow.cpp
+++ b/src/libs/gui/NewSubpatchWindow.cpp
@@ -43,7 +43,7 @@ NewSubpatchWindow::NewSubpatchWindow(BaseObjectType* cobject, const Glib::RefPtr
}
void
-NewSubpatchWindow::present(SharedPtr<PatchModel> patch, GraphObject::MetadataMap data)
+NewSubpatchWindow::present(SharedPtr<PatchModel> patch, GraphObject::Variables data)
{
set_patch(patch);
_initial_data = data;
@@ -91,8 +91,8 @@ NewSubpatchWindow::ok_clicked()
const uint32_t poly = _poly_spinbutton->get_value_as_int();
App::instance().engine()->create_patch(path, poly);
- for (GraphObject::MetadataMap::const_iterator i = _initial_data.begin(); i != _initial_data.end(); ++i)
- App::instance().engine()->set_metadata(path, i->first, i->second);
+ for (GraphObject::Variables::const_iterator i = _initial_data.begin(); i != _initial_data.end(); ++i)
+ App::instance().engine()->set_variable(path, i->first, i->second);
App::instance().engine()->enable_patch(path);
diff --git a/src/libs/gui/NewSubpatchWindow.hpp b/src/libs/gui/NewSubpatchWindow.hpp
index d8fbde88..00fb6a3b 100644
--- a/src/libs/gui/NewSubpatchWindow.hpp
+++ b/src/libs/gui/NewSubpatchWindow.hpp
@@ -44,14 +44,14 @@ public:
void set_patch(SharedPtr<PatchModel> patch);
- void present(SharedPtr<PatchModel> patch, GraphObject::MetadataMap data);
+ void present(SharedPtr<PatchModel> patch, GraphObject::Variables data);
private:
void name_changed();
void ok_clicked();
void cancel_clicked();
- GraphObject::MetadataMap _initial_data;
+ GraphObject::Variables _initial_data;
SharedPtr<PatchModel> _patch;
Gtk::Entry* _name_entry;
diff --git a/src/libs/gui/NodeModule.cpp b/src/libs/gui/NodeModule.cpp
index b4309dfa..a0ca3992 100644
--- a/src/libs/gui/NodeModule.cpp
+++ b/src/libs/gui/NodeModule.cpp
@@ -49,7 +49,7 @@ NodeModule::NodeModule(boost::shared_ptr<PatchCanvas> canvas, SharedPtr<NodeMode
node->signal_new_port.connect(sigc::bind(sigc::mem_fun(this, &NodeModule::add_port), true));
node->signal_removed_port.connect(sigc::mem_fun(this, &NodeModule::remove_port));
- node->signal_metadata.connect(sigc::mem_fun(this, &NodeModule::set_metadata));
+ node->signal_variable.connect(sigc::mem_fun(this, &NodeModule::set_variable));
node->signal_polyphonic.connect(sigc::mem_fun(this, &NodeModule::set_stacked_border));
node->signal_renamed.connect(sigc::mem_fun(this, &NodeModule::rename));
@@ -92,8 +92,8 @@ NodeModule::create(boost::shared_ptr<PatchCanvas> canvas, SharedPtr<NodeModel> n
else
ret = boost::shared_ptr<NodeModule>(new NodeModule(canvas, node));
- for (GraphObject::MetadataMap::const_iterator m = node->metadata().begin(); m != node->metadata().end(); ++m)
- ret->set_metadata(m->first, m->second);
+ for (GraphObject::Variables::const_iterator m = node->variables().begin(); m != node->variables().end(); ++m)
+ ret->set_variable(m->first, m->second);
for (PortModelList::const_iterator p = node->ports().begin(); p != node->ports().end(); ++p) {
ret->add_port(*p, false);
@@ -342,19 +342,19 @@ NodeModule::store_location()
const float x = static_cast<float>(property_x());
const float y = static_cast<float>(property_y());
- const Atom& existing_x = _node->get_metadata("ingenuity:canvas-x");
- const Atom& existing_y = _node->get_metadata("ingenuity:canvas-y");
+ const Atom& existing_x = _node->get_variable("ingenuity:canvas-x");
+ const Atom& existing_y = _node->get_variable("ingenuity:canvas-y");
if (existing_x.type() != Atom::FLOAT || existing_y.type() != Atom::FLOAT
|| existing_x.get_float() != x || existing_y.get_float() != y) {
- App::instance().engine()->set_metadata(_node->path(), "ingenuity:canvas-x", Atom(x));
- App::instance().engine()->set_metadata(_node->path(), "ingenuity:canvas-y", Atom(y));
+ App::instance().engine()->set_variable(_node->path(), "ingenuity:canvas-x", Atom(x));
+ App::instance().engine()->set_variable(_node->path(), "ingenuity:canvas-y", Atom(y));
}
}
void
-NodeModule::set_metadata(const string& key, const Atom& value)
+NodeModule::set_variable(const string& key, const Atom& value)
{
if (key == "ingenuity:canvas-x" && value.type() == Atom::FLOAT)
move_to(value.get_float(), property_y());
diff --git a/src/libs/gui/NodeModule.hpp b/src/libs/gui/NodeModule.hpp
index 32e9220d..dcfd97dd 100644
--- a/src/libs/gui/NodeModule.hpp
+++ b/src/libs/gui/NodeModule.hpp
@@ -71,7 +71,7 @@ protected:
bool popup_gui();
void rename();
- void set_metadata(const std::string& key, const Atom& value);
+ void set_variable(const std::string& key, const Atom& value);
void add_port(SharedPtr<PortModel> port, bool resize=true);
void remove_port(SharedPtr<PortModel> port);
diff --git a/src/libs/gui/ObjectMenu.hpp b/src/libs/gui/ObjectMenu.hpp
index 1acc278f..ab9eb30e 100644
--- a/src/libs/gui/ObjectMenu.hpp
+++ b/src/libs/gui/ObjectMenu.hpp
@@ -29,7 +29,6 @@ using Ingen::Client::ObjectModel;
namespace Ingen {
namespace GUI {
-class Controller;
class ObjectControlWindow;
class ObjectPropertiesWindow;
class PatchCanvas;
diff --git a/src/libs/gui/PatchCanvas.cpp b/src/libs/gui/PatchCanvas.cpp
index 07301aa4..3f0e2716 100644
--- a/src/libs/gui/PatchCanvas.cpp
+++ b/src/libs/gui/PatchCanvas.cpp
@@ -357,9 +357,9 @@ PatchCanvas::connect(boost::shared_ptr<FlowCanvas::Connectable> src_port,
SharedPtr<PluginModel> pm(new PluginModel(PluginModel::Internal, "", "midi_control_in", ""));
SharedPtr<NodeModel> nm(new NodeModel(pm, _patch->path().base()
+ src->name() + "-" + dst->name(), false));
- nm->set_metadata("canvas-x", Atom((float)
+ nm->set_variable("canvas-x", Atom((float)
(dst->module()->property_x() - dst->module()->width() - 20)));
- nm->set_metadata("canvas-y", Atom((float)
+ nm->set_variable("canvas-y", Atom((float)
(dst->module()->property_y())));
App::instance().engine()->create_node_from_model(nm.get());
App::instance().engine()->connect(src->model()->path(), nm->path() + "/MIDI_In");
@@ -369,9 +369,9 @@ PatchCanvas::connect(boost::shared_ptr<FlowCanvas::Connectable> src_port,
// Set control node range to port's user range
App::instance().engine()->set_port_value_queued(nm->path().base() + "Min",
- dst->model()->get_metadata("user-min").get_float());
+ dst->model()->get_variable("user-min").get_float());
App::instance().engine()->set_port_value_queued(nm->path().base() + "Max",
- dst->model()->get_metadata("user-max").get_float());
+ dst->model()->get_variable("user-max").get_float());
#endif
} else {
App::instance().engine()->connect(src->model()->path(), dst->model()->path());
@@ -510,7 +510,7 @@ PatchCanvas::menu_add_control(ControlType type)
{
// FIXME: bundleify
- GraphObject::MetadataMap data = get_initial_data();
+ GraphObject::Variables data = get_initial_data();
float x = data["ingenuity:canvas-x"].get_float();
float y = data["ingenuity:canvas-y"].get_float();
@@ -526,9 +526,9 @@ PatchCanvas::menu_add_port(const string& name, const string& type, bool is_outpu
// FIXME: bundleify
const Path& path = _patch->path().base() + generate_port_name(name);
App::instance().engine()->create_port(path, type, is_output);
- GraphObject::MetadataMap data = get_initial_data();
- for (GraphObject::MetadataMap::const_iterator i = data.begin(); i != data.end(); ++i)
- App::instance().engine()->set_metadata(path, i->first, i->second);
+ GraphObject::Variables data = get_initial_data();
+ for (GraphObject::Variables::const_iterator i = data.begin(); i != data.end(); ++i)
+ App::instance().engine()->set_variable(path, i->first, i->second);
}
@@ -538,9 +538,9 @@ PatchCanvas::load_plugin(SharedPtr<PluginModel> plugin)
const Path& path = _patch->path().base() + plugin->default_node_name(_patch);
// FIXME: polyphony?
App::instance().engine()->create_node(path, plugin->uri(), false);
- GraphObject::MetadataMap data = get_initial_data();
- for (GraphObject::MetadataMap::const_iterator i = data.begin(); i != data.end(); ++i)
- App::instance().engine()->set_metadata(path, i->first, i->second);
+ GraphObject::Variables data = get_initial_data();
+ for (GraphObject::Variables::const_iterator i = data.begin(); i != data.end(); ++i)
+ App::instance().engine()->set_variable(path, i->first, i->second);
}
@@ -557,10 +557,10 @@ PatchCanvas::get_new_module_location(double& x, double& y)
}
-GraphObject::MetadataMap
+GraphObject::Variables
PatchCanvas::get_initial_data()
{
- GraphObject::MetadataMap result;
+ GraphObject::Variables result;
result["ingenuity:canvas-x"] = Atom((float)_last_click_x);
result["ingenuity:canvas-y"] = Atom((float)_last_click_y);
diff --git a/src/libs/gui/PatchCanvas.hpp b/src/libs/gui/PatchCanvas.hpp
index 95b7fc70..fdd7cb34 100644
--- a/src/libs/gui/PatchCanvas.hpp
+++ b/src/libs/gui/PatchCanvas.hpp
@@ -100,7 +100,7 @@ private:
SLV2PluginClass plugin_class, SLV2PluginClasses classes);
#endif
- GraphObject::MetadataMap get_initial_data();
+ GraphObject::Variables get_initial_data();
bool canvas_event(GdkEvent* event);
diff --git a/src/libs/gui/PatchPortModule.cpp b/src/libs/gui/PatchPortModule.cpp
index 2c5581f8..de0ed445 100644
--- a/src/libs/gui/PatchPortModule.cpp
+++ b/src/libs/gui/PatchPortModule.cpp
@@ -44,8 +44,8 @@ PatchPortModule::PatchPortModule(boost::shared_ptr<PatchCanvas> canvas, SharedPt
/*resize();
- const Atom& x_atom = port->get_metadata("ingenuity:canvas-x");
- const Atom& y_atom = port->get_metadata("ingenuity:canvas-y");
+ const Atom& x_atom = port->get_variable("ingenuity:canvas-x");
+ const Atom& y_atom = port->get_variable("ingenuity:canvas-y");
if (x_atom && y_atom && x_atom.type() == Atom::FLOAT && y_atom.type() == Atom::FLOAT) {
move_to(x_atom.get_float(), y_atom.get_float());
@@ -58,7 +58,7 @@ PatchPortModule::PatchPortModule(boost::shared_ptr<PatchCanvas> canvas, SharedPt
set_stacked_border(port->polyphonic());
- port->signal_metadata.connect(sigc::mem_fun(this, &PatchPortModule::metadata_update));
+ port->signal_variable.connect(sigc::mem_fun(this, &PatchPortModule::variable_change));
port->signal_polyphonic.connect(sigc::mem_fun(this, &PatchPortModule::set_stacked_border));
}
@@ -76,8 +76,8 @@ PatchPortModule::create(boost::shared_ptr<PatchCanvas> canvas, SharedPtr<PortMod
ret->set_menu(ret->_patch_port->menu());
- for (GraphObject::MetadataMap::const_iterator m = port->metadata().begin(); m != port->metadata().end(); ++m)
- ret->metadata_update(m->first, m->second);
+ for (GraphObject::Variables::const_iterator m = port->variables().begin(); m != port->variables().end(); ++m)
+ ret->variable_change(m->first, m->second);
ret->resize();
@@ -102,19 +102,19 @@ PatchPortModule::store_location()
const float x = static_cast<float>(property_x());
const float y = static_cast<float>(property_y());
- const Atom& existing_x = _port->get_metadata("ingenuity:canvas-x");
- const Atom& existing_y = _port->get_metadata("ingenuity:canvas-y");
+ const Atom& existing_x = _port->get_variable("ingenuity:canvas-x");
+ const Atom& existing_y = _port->get_variable("ingenuity:canvas-y");
if (existing_x.type() != Atom::FLOAT || existing_y.type() != Atom::FLOAT
|| existing_x.get_float() != x || existing_y.get_float() != y) {
- App::instance().engine()->set_metadata(_port->path(), "ingenuity:canvas-x", Atom(x));
- App::instance().engine()->set_metadata(_port->path(), "ingenuity:canvas-y", Atom(y));
+ App::instance().engine()->set_variable(_port->path(), "ingenuity:canvas-x", Atom(x));
+ App::instance().engine()->set_variable(_port->path(), "ingenuity:canvas-y", Atom(y));
}
}
void
-PatchPortModule::metadata_update(const string& key, const Atom& value)
+PatchPortModule::variable_change(const string& key, const Atom& value)
{
if (key == "ingenuity:canvas-x" && value.type() == Atom::FLOAT)
move_to(value.get_float(), property_y());
diff --git a/src/libs/gui/PatchPortModule.hpp b/src/libs/gui/PatchPortModule.hpp
index 8f3a3fc6..c9c5625d 100644
--- a/src/libs/gui/PatchPortModule.hpp
+++ b/src/libs/gui/PatchPortModule.hpp
@@ -62,7 +62,7 @@ public:
protected:
PatchPortModule(boost::shared_ptr<PatchCanvas> canvas, SharedPtr<PortModel> port);
- void metadata_update(const string& key, const Raul::Atom& value);
+ void variable_change(const string& key, const Raul::Atom& value);
void create_menu();
SharedPtr<PortModel> _port;
diff --git a/src/libs/gui/PatchPropertiesWindow.cpp b/src/libs/gui/PatchPropertiesWindow.cpp
index eb5120c4..2f0956e6 100644
--- a/src/libs/gui/PatchPropertiesWindow.cpp
+++ b/src/libs/gui/PatchPropertiesWindow.cpp
@@ -48,11 +48,11 @@ PatchPropertiesWindow::set_patch(SharedPtr<PatchModel> patch_model)
property_title() = patch_model->path() + " Properties";
_patch_model = patch_model;
- const Atom& author_atom = _patch_model->get_metadata("author");
+ const Atom& author_atom = _patch_model->get_variable("author");
_author_entry->set_text(
(author_atom.type() == Atom::STRING) ? author_atom.get_string() : "" );
- const Atom& desc_atom = _patch_model->get_metadata("description");
+ const Atom& desc_atom = _patch_model->get_variable("description");
_textview->get_buffer()->set_text(
(desc_atom.type() == Atom::STRING) ? desc_atom.get_string() : "" );
}
@@ -61,11 +61,11 @@ PatchPropertiesWindow::set_patch(SharedPtr<PatchModel> patch_model)
void
PatchPropertiesWindow::cancel_clicked()
{
- const Atom& author_atom = _patch_model->get_metadata("author");
+ const Atom& author_atom = _patch_model->get_variable("author");
_author_entry->set_text(
(author_atom.type() == Atom::STRING) ? author_atom.get_string() : "" );
- const Atom& desc_atom = _patch_model->get_metadata("description");
+ const Atom& desc_atom = _patch_model->get_variable("description");
_textview->get_buffer()->set_text(
(desc_atom.type() == Atom::STRING) ? desc_atom.get_string() : "" );
@@ -78,8 +78,8 @@ PatchPropertiesWindow::ok_clicked()
{
cerr << "FIXME: properties\n";
- //m_patch_model->set_metadata("author", Atom(_author_entry->get_text().c_str()));
- //m_patch_model->set_metadata("description", Atom(_textview->get_buffer()->get_text().c_str()));
+ //m_patch_model->set_variable("author", Atom(_author_entry->get_text().c_str()));
+ //m_patch_model->set_variable("description", Atom(_textview->get_buffer()->get_text().c_str()));
hide();
}
diff --git a/src/libs/gui/PatchWindow.cpp b/src/libs/gui/PatchWindow.cpp
index 3566d83d..716d4356 100644
--- a/src/libs/gui/PatchWindow.cpp
+++ b/src/libs/gui/PatchWindow.cpp
@@ -366,7 +366,7 @@ PatchWindow::event_save_as()
if (confirm) {
App::instance().loader()->save_patch(_patch, filename);
_patch->set_filename(filename);
- //_patch->set_metadata("filename", Atom(filename.c_str()));
+ //_patch->set_variable("filename", Atom(filename.c_str()));
}
}
App::instance().configuration()->set_patch_folder(dialog.get_current_folder());
diff --git a/src/libs/gui/Port.cpp b/src/libs/gui/Port.cpp
index e3dd0fd4..b02c0856 100644
--- a/src/libs/gui/Port.cpp
+++ b/src/libs/gui/Port.cpp
@@ -62,7 +62,7 @@ Port::Port(boost::shared_ptr<FlowCanvas::Module> module, SharedPtr<PortModel> pm
set_control_min(min);
set_control_max(max);
- pm->signal_metadata.connect(sigc::mem_fun(this, &Port::metadata_update));
+ pm->signal_variable.connect(sigc::mem_fun(this, &Port::variable_change));
_port_model->signal_control.connect(sigc::mem_fun(this, &Port::control_changed));
}
@@ -116,7 +116,7 @@ Port::set_control(float value, bool signal)
void
-Port::metadata_update(const string& key, const Atom& value)
+Port::variable_change(const string& key, const Atom& value)
{
if ( (key == "ingen:minimum") && value.type() == Atom::FLOAT) {
set_control_min(value.get_float());
diff --git a/src/libs/gui/Port.hpp b/src/libs/gui/Port.hpp
index dbbf64d3..4af07389 100644
--- a/src/libs/gui/Port.hpp
+++ b/src/libs/gui/Port.hpp
@@ -52,7 +52,7 @@ public:
private:
- void metadata_update(const string& key, const Raul::Atom& value);
+ void variable_change(const string& key, const Raul::Atom& value);
void renamed();
diff --git a/src/libs/gui/PortPropertiesWindow.cpp b/src/libs/gui/PortPropertiesWindow.cpp
index a715a114..707c8d76 100644
--- a/src/libs/gui/PortPropertiesWindow.cpp
+++ b/src/libs/gui/PortPropertiesWindow.cpp
@@ -80,8 +80,8 @@ PortPropertiesWindow::present(SharedPtr<PortModel> pm)
_connections.push_back(_max_spinner->signal_value_changed().connect(
sigc::mem_fun(*this, &PortPropertiesWindow::max_changed)));
- _connections.push_back(pm->signal_metadata.connect(
- sigc::mem_fun(this, &PortPropertiesWindow::metadata_update)));
+ _connections.push_back(pm->signal_variable.connect(
+ sigc::mem_fun(this, &PortPropertiesWindow::variable_change)));
_enable_signal = true;
@@ -90,7 +90,7 @@ PortPropertiesWindow::present(SharedPtr<PortModel> pm)
void
-PortPropertiesWindow::metadata_update(const string& key, const Atom& value)
+PortPropertiesWindow::variable_change(const string& key, const Atom& value)
{
_enable_signal = false;
@@ -115,7 +115,7 @@ PortPropertiesWindow::min_changed()
}
if (_enable_signal)
- App::instance().engine()->set_metadata(_port_model->path(), "ingen:minimum", min);
+ App::instance().engine()->set_variable(_port_model->path(), "ingen:minimum", min);
}
@@ -131,15 +131,15 @@ PortPropertiesWindow::max_changed()
}
if (_enable_signal)
- App::instance().engine()->set_metadata(_port_model->path(), "ingen:maximum", max);
+ App::instance().engine()->set_variable(_port_model->path(), "ingen:maximum", max);
}
void
PortPropertiesWindow::cancel()
{
- App::instance().engine()->set_metadata(_port_model->path(), "ingen:minimum", _initial_min);
- App::instance().engine()->set_metadata(_port_model->path(), "ingen:maximum", _initial_max);
+ App::instance().engine()->set_variable(_port_model->path(), "ingen:minimum", _initial_min);
+ App::instance().engine()->set_variable(_port_model->path(), "ingen:maximum", _initial_max);
hide();
}
diff --git a/src/libs/gui/PortPropertiesWindow.hpp b/src/libs/gui/PortPropertiesWindow.hpp
index 5d10960d..4580c7c6 100644
--- a/src/libs/gui/PortPropertiesWindow.hpp
+++ b/src/libs/gui/PortPropertiesWindow.hpp
@@ -42,7 +42,7 @@ public:
void present(SharedPtr<PortModel> port_model);
private:
- void metadata_update(const string& key, const Atom& value);
+ void variable_change(const string& key, const Atom& value);
void min_changed();
void max_changed();
diff --git a/src/libs/gui/ThreadedLoader.cpp b/src/libs/gui/ThreadedLoader.cpp
index 3cac84f6..1b7725a9 100644
--- a/src/libs/gui/ThreadedLoader.cpp
+++ b/src/libs/gui/ThreadedLoader.cpp
@@ -74,12 +74,12 @@ ThreadedLoader::_whipped()
}
void
-ThreadedLoader::load_patch(bool merge,
- const string& data_base_uri,
- const Path& data_path,
- GraphObject::MetadataMap engine_data,
- optional<Path> engine_parent,
- optional<const string&> engine_name)
+ThreadedLoader::load_patch(bool merge,
+ const string& data_base_uri,
+ const Path& data_path,
+ GraphObject::Variables engine_data,
+ optional<Path> engine_parent,
+ optional<const string&> engine_name)
{
_mutex.lock();
diff --git a/src/libs/gui/ThreadedLoader.hpp b/src/libs/gui/ThreadedLoader.hpp
index 2e03c2a1..6c095925 100644
--- a/src/libs/gui/ThreadedLoader.hpp
+++ b/src/libs/gui/ThreadedLoader.hpp
@@ -61,12 +61,12 @@ public:
// FIXME: there's a pattern here....
// (same core interface as Loader/Serialiser)
- void load_patch(bool merge,
- const string& data_base_uri,
- const Path& data_path,
- GraphObject::MetadataMap engine_data,
- optional<Path> engine_parent,
- optional<const string&> engine_name = optional<const string&>());
+ void load_patch(bool merge,
+ const string& data_base_uri,
+ const Path& data_path,
+ GraphObject::Variables engine_data,
+ optional<Path> engine_parent,
+ optional<const string&> engine_name = optional<const string&>());
void save_patch(SharedPtr<PatchModel> model, const string& filename);
diff --git a/src/libs/gui/UploadPatchWindow.cpp b/src/libs/gui/UploadPatchWindow.cpp
index b5e414a1..57045a91 100644
--- a/src/libs/gui/UploadPatchWindow.cpp
+++ b/src/libs/gui/UploadPatchWindow.cpp
@@ -74,11 +74,11 @@ UploadPatchWindow::on_show()
{
Gtk::Dialog::on_show();
- Raul::Atom atom = _patch->get_metadata("lv2:symbol");
+ Raul::Atom atom = _patch->get_variable("lv2:symbol");
if (atom)
_symbol_entry->set_text(atom.get_string());
- atom = _patch->get_metadata("doap:name");
+ atom = _patch->get_variable("doap:name");
if (atom)
_short_name_entry->set_text(atom.get_string());
}
@@ -237,11 +237,11 @@ UploadPatchWindow::upload_clicked()
Glib::ustring symbol = _symbol_entry->get_text();
Glib::ustring short_name = _short_name_entry->get_text();
- _patch->set_metadata("lv2:symbol", Atom(symbol));
- App::instance().engine()->set_metadata(_patch->path(), "lv2:symbol", Atom(symbol));
+ _patch->set_variable("lv2:symbol", Atom(symbol));
+ App::instance().engine()->set_variable(_patch->path(), "lv2:symbol", Atom(symbol));
- _patch->set_metadata("doap:name", Atom(short_name));
- App::instance().engine()->set_metadata(_patch->path(), "doap:name", Atom(short_name));
+ _patch->set_variable("doap:name", Atom(short_name));
+ App::instance().engine()->set_variable(_patch->path(), "doap:name", Atom(short_name));
_response = 0;
_progress_pct = 0;
diff --git a/src/libs/gui/WindowFactory.cpp b/src/libs/gui/WindowFactory.cpp
index 6e7e2c8b..0d04eed9 100644
--- a/src/libs/gui/WindowFactory.cpp
+++ b/src/libs/gui/WindowFactory.cpp
@@ -253,7 +253,7 @@ WindowFactory::remove_control_window(NodeControlWindow* win, GdkEventAny* ignore
void
-WindowFactory::present_load_plugin(SharedPtr<PatchModel> patch, GraphObject::MetadataMap data)
+WindowFactory::present_load_plugin(SharedPtr<PatchModel> patch, GraphObject::Variables data)
{
PatchWindowMap::iterator w = _patch_windows.find(patch->path());
@@ -265,7 +265,7 @@ WindowFactory::present_load_plugin(SharedPtr<PatchModel> patch, GraphObject::Met
void
-WindowFactory::present_load_patch(SharedPtr<PatchModel> patch, GraphObject::MetadataMap data)
+WindowFactory::present_load_patch(SharedPtr<PatchModel> patch, GraphObject::Variables data)
{
PatchWindowMap::iterator w = _patch_windows.find(patch->path());
@@ -279,7 +279,7 @@ WindowFactory::present_load_patch(SharedPtr<PatchModel> patch, GraphObject::Meta
void
-WindowFactory::present_load_remote_patch(SharedPtr<PatchModel> patch, GraphObject::MetadataMap data)
+WindowFactory::present_load_remote_patch(SharedPtr<PatchModel> patch, GraphObject::Variables data)
{
PatchWindowMap::iterator w = _patch_windows.find(patch->path());
@@ -306,7 +306,7 @@ WindowFactory::present_upload_patch(SharedPtr<PatchModel> patch)
}
void
-WindowFactory::present_new_subpatch(SharedPtr<PatchModel> patch, GraphObject::MetadataMap data)
+WindowFactory::present_new_subpatch(SharedPtr<PatchModel> patch, GraphObject::Variables data)
{
PatchWindowMap::iterator w = _patch_windows.find(patch->path());
@@ -318,7 +318,7 @@ WindowFactory::present_new_subpatch(SharedPtr<PatchModel> patch, GraphObject::Me
void
-WindowFactory::present_load_subpatch(SharedPtr<PatchModel> patch, GraphObject::MetadataMap data)
+WindowFactory::present_load_subpatch(SharedPtr<PatchModel> patch, GraphObject::Variables data)
{
PatchWindowMap::iterator w = _patch_windows.find(patch->path());
diff --git a/src/libs/gui/WindowFactory.hpp b/src/libs/gui/WindowFactory.hpp
index d9418496..06f2f637 100644
--- a/src/libs/gui/WindowFactory.hpp
+++ b/src/libs/gui/WindowFactory.hpp
@@ -64,12 +64,12 @@ public:
void present_controls(SharedPtr<NodeModel> node);
- void present_load_plugin(SharedPtr<PatchModel> patch, GraphObject::MetadataMap data=GraphObject::MetadataMap());
- void present_load_patch(SharedPtr<PatchModel> patch, GraphObject::MetadataMap data=GraphObject::MetadataMap());
- void present_load_remote_patch(SharedPtr<PatchModel> patch, GraphObject::MetadataMap data=GraphObject::MetadataMap());
+ void present_load_plugin(SharedPtr<PatchModel> patch, GraphObject::Variables data=GraphObject::Variables());
+ void present_load_patch(SharedPtr<PatchModel> patch, GraphObject::Variables data=GraphObject::Variables());
+ void present_load_remote_patch(SharedPtr<PatchModel> patch, GraphObject::Variables data=GraphObject::Variables());
void present_upload_patch(SharedPtr<PatchModel> patch);
- void present_new_subpatch(SharedPtr<PatchModel> patch, GraphObject::MetadataMap data=GraphObject::MetadataMap());
- void present_load_subpatch(SharedPtr<PatchModel> patch, GraphObject::MetadataMap data=GraphObject::MetadataMap());
+ void present_new_subpatch(SharedPtr<PatchModel> patch, GraphObject::Variables data=GraphObject::Variables());
+ void present_load_subpatch(SharedPtr<PatchModel> patch, GraphObject::Variables data=GraphObject::Variables());
void present_rename(SharedPtr<ObjectModel> object);
void present_properties(SharedPtr<ObjectModel> object);