summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-10-21 19:29:03 +0000
committerDavid Robillard <d@drobilla.net>2011-10-21 19:29:03 +0000
commitee1ba36e564c4f0545e50ec91fa4b14d6dfca91b (patch)
tree60935911f4f05642fc86c1e94052209a091b0156 /src/gui
parentc65659729265b8795ea76390a3507023ff3164dd (diff)
downloadingen-ee1ba36e564c4f0545e50ec91fa4b14d6dfca91b.tar.gz
ingen-ee1ba36e564c4f0545e50ec91fa4b14d6dfca91b.tar.bz2
ingen-ee1ba36e564c4f0545e50ec91fa4b14d6dfca91b.zip
Separate URIs from LV2URIMap.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@3564 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/App.cpp2
-rw-r--r--src/gui/App.hpp4
-rw-r--r--src/gui/Configuration.cpp2
-rw-r--r--src/gui/Controls.cpp2
-rw-r--r--src/gui/LoadPatchWindow.cpp2
-rw-r--r--src/gui/LoadPluginWindow.cpp8
-rw-r--r--src/gui/NodeModule.cpp10
-rw-r--r--src/gui/ObjectMenu.cpp2
-rw-r--r--src/gui/PatchCanvas.cpp8
-rw-r--r--src/gui/PatchPortModule.cpp6
-rw-r--r--src/gui/PatchTreeWindow.cpp2
-rw-r--r--src/gui/PatchWindow.cpp2
-rw-r--r--src/gui/Port.cpp4
-rw-r--r--src/gui/PortMenu.cpp8
-rw-r--r--src/gui/PortPropertiesWindow.cpp4
-rw-r--r--src/gui/RenameWindow.cpp2
-rw-r--r--src/gui/SubpatchModule.cpp2
-rw-r--r--src/gui/ThreadedLoader.cpp2
-rw-r--r--src/gui/ThreadedLoader.hpp3
-rw-r--r--src/gui/UploadPatchWindow.cpp4
20 files changed, 39 insertions, 40 deletions
diff --git a/src/gui/App.cpp b/src/gui/App.cpp
index bddcec2c..6608df17 100644
--- a/src/gui/App.cpp
+++ b/src/gui/App.cpp
@@ -168,7 +168,7 @@ App::attach(SharedPtr<SigClientInterface> client)
_client = client;
_store = SharedPtr<ClientStore>(new ClientStore(_world->uris(), _world->engine(), client));
- _loader = SharedPtr<ThreadedLoader>(new ThreadedLoader(_world->uris(), _world->engine()));
+ _loader = SharedPtr<ThreadedLoader>(new ThreadedLoader(_world->engine()));
_patch_tree_window->init(*_store);
diff --git a/src/gui/App.hpp b/src/gui/App.hpp
index 174aad1c..9cda522b 100644
--- a/src/gui/App.hpp
+++ b/src/gui/App.hpp
@@ -114,8 +114,8 @@ public:
static void init(Ingen::Shared::World* world);
static void run();
- inline Ingen::Shared::World* world() const { return _world; }
- inline Ingen::Shared::LV2URIMap& uris() const { return *_world->uris(); }
+ inline Ingen::Shared::World* world() const { return _world; }
+ inline Ingen::Shared::URIs& uris() const { return *_world->uris(); }
protected:
diff --git a/src/gui/Configuration.cpp b/src/gui/Configuration.cpp
index 5e300bc1..855c991f 100644
--- a/src/gui/Configuration.cpp
+++ b/src/gui/Configuration.cpp
@@ -83,7 +83,7 @@ uint32_t
Configuration::get_port_color(const PortModel* p)
{
assert(p != NULL);
- const Shared::LV2URIMap& uris = App::instance().uris();
+ const Shared::URIs& uris = App::instance().uris();
if (p->is_a(uris.lv2_AudioPort)) {
return _audio_port_color;
} else if (p->supports(uris.atom_String)) {
diff --git a/src/gui/Controls.cpp b/src/gui/Controls.cpp
index e31c8d52..786e5b49 100644
--- a/src/gui/Controls.cpp
+++ b/src/gui/Controls.cpp
@@ -214,7 +214,7 @@ SliderControl::port_property_changed(const URI& key, const Atom& value)
{
_enable_signal = false;
- const Shared::LV2URIMap& uris = App::instance().uris();
+ const Shared::URIs& uris = App::instance().uris();
if (key == uris.lv2_minimum && value.type() == Atom::FLOAT)
set_range(value.get_float(), _slider->get_adjustment()->get_upper());
else if (key == uris.lv2_maximum && value.type() == Atom::FLOAT)
diff --git a/src/gui/LoadPatchWindow.cpp b/src/gui/LoadPatchWindow.cpp
index 33363f0d..e4716451 100644
--- a/src/gui/LoadPatchWindow.cpp
+++ b/src/gui/LoadPatchWindow.cpp
@@ -149,7 +149,7 @@ LoadPatchWindow::ok_clicked()
return;
}
- const LV2URIMap& uris = App::instance().uris();
+ const URIs& uris = App::instance().uris();
if (_poly_voices_radio->get_active())
_initial_data.insert(make_pair(
diff --git a/src/gui/LoadPluginWindow.cpp b/src/gui/LoadPluginWindow.cpp
index 9d5772f1..2e0c4290 100644
--- a/src/gui/LoadPluginWindow.cpp
+++ b/src/gui/LoadPluginWindow.cpp
@@ -224,7 +224,7 @@ void
LoadPluginWindow::set_row(Gtk::TreeModel::Row& row,
SharedPtr<const PluginModel> plugin)
{
- const LV2URIMap& uris = App::instance().uris();
+ const URIs& uris = App::instance().uris();
const Atom& name = plugin->get_property(uris.doap_name);
if (name.is_valid() && name.type() == Atom::STRING)
row[_plugins_columns._col_name] = name.get_string();
@@ -325,7 +325,7 @@ LoadPluginWindow::generate_module_name(SharedPtr<const PluginModel> plugin,
void
LoadPluginWindow::load_plugin(const Gtk::TreeModel::iterator& iter)
{
- const LV2URIMap& uris = App::instance().uris();
+ const URIs& uris = App::instance().uris();
Gtk::TreeModel::Row row = *iter;
SharedPtr<const PluginModel> plugin = row.get_value(_plugins_columns._col_plugin);
bool polyphonic = _polyphonic_checkbutton->get_active();
@@ -386,7 +386,7 @@ LoadPluginWindow::filter_changed()
Gtk::TreeModel::Row model_row;
Gtk::TreeModel::iterator model_iter;
size_t num_visible = 0;
- const LV2URIMap& uris = App::instance().uris();
+ const URIs& uris = App::instance().uris();
for (ClientStore::Plugins::const_iterator i = App::instance().store()->plugins()->begin();
i != App::instance().store()->plugins()->end(); ++i) {
@@ -439,7 +439,7 @@ LoadPluginWindow::plugin_property_changed(const URI& plugin,
const URI& predicate,
const Atom& value)
{
- const LV2URIMap& uris = App::instance().uris();
+ const URIs& uris = App::instance().uris();
if (predicate == uris.doap_name) {
Rows::const_iterator i = _rows.find(plugin);
if (i != _rows.end() && value.type() == Atom::STRING)
diff --git a/src/gui/NodeModule.cpp b/src/gui/NodeModule.cpp
index 9b0a3743..d0e5c2cb 100644
--- a/src/gui/NodeModule.cpp
+++ b/src/gui/NodeModule.cpp
@@ -121,7 +121,7 @@ NodeModule::create(PatchCanvas& canvas,
void
NodeModule::show_human_names(bool b)
{
- const LV2URIMap& uris = App::instance().uris();
+ const URIs& uris = App::instance().uris();
if (b && node()->plugin()) {
const Raul::Atom& name_property = node()->get_property(uris.lv2_name);
@@ -183,7 +183,7 @@ NodeModule::plugin_changed()
void
NodeModule::embed_gui(bool embed)
{
- const LV2URIMap& uris = App::instance().uris();
+ const URIs& uris = App::instance().uris();
if (embed) {
if (_gui_window) {
@@ -357,7 +357,7 @@ NodeModule::store_location()
const Atom x(static_cast<float>(property_x()));
const Atom y(static_cast<float>(property_y()));
- const LV2URIMap& uris = App::instance().uris();
+ const URIs& uris = App::instance().uris();
const Atom& existing_x = _node->get_property(uris.ingenui_canvas_x);
const Atom& existing_y = _node->get_property(uris.ingenui_canvas_y);
@@ -376,7 +376,7 @@ NodeModule::store_location()
void
NodeModule::property_changed(const URI& key, const Atom& value)
{
- const Shared::LV2URIMap& uris = App::instance().uris();
+ const Shared::URIs& uris = App::instance().uris();
switch (value.type()) {
case Atom::FLOAT:
if (key == uris.ingenui_canvas_x) {
@@ -410,7 +410,7 @@ void
NodeModule::set_selected(bool b)
{
const App& app = App::instance();
- const LV2URIMap& uris = app.uris();
+ const URIs& uris = app.uris();
if (b != selected()) {
Module::set_selected(b);
if (b) {
diff --git a/src/gui/ObjectMenu.cpp b/src/gui/ObjectMenu.cpp
index c2dd370a..c46abf01 100644
--- a/src/gui/ObjectMenu.cpp
+++ b/src/gui/ObjectMenu.cpp
@@ -121,7 +121,7 @@ ObjectMenu::on_menu_polyphonic()
void
ObjectMenu::property_changed(const URI& predicate, const Atom& value)
{
- const LV2URIMap& uris = App::instance().uris();
+ const URIs& uris = App::instance().uris();
_enable_signal = false;
if (predicate == uris.ingen_polyphonic && value.type() == Atom::BOOL)
_polyphonic_menuitem->set_active(value.get_bool());
diff --git a/src/gui/PatchCanvas.cpp b/src/gui/PatchCanvas.cpp
index a0440ade..c1194395 100644
--- a/src/gui/PatchCanvas.cpp
+++ b/src/gui/PatchCanvas.cpp
@@ -670,7 +670,7 @@ PatchCanvas::paste()
clear_selection();
++_paste_count;
- const LV2URIMap& uris = App::instance().uris();
+ const URIs& uris = App::instance().uris();
Builder builder(App::instance().world()->uris(), *App::instance().engine());
ClientStore clipboard(App::instance().world()->uris());
@@ -762,7 +762,7 @@ PatchCanvas::menu_add_port(const string& sym_base, const string& name_base,
generate_port_name(sym_base, sym, name_base, name);
const Path& path = _patch->path().base() + sym;
- const LV2URIMap& uris = App::instance().uris();
+ const URIs& uris = App::instance().uris();
Resource::Properties props = get_initial_data();
props.insert(make_pair(uris.rdf_type,
@@ -791,7 +791,7 @@ PatchCanvas::load_plugin(WeakPtr<PluginModel> weak_plugin)
symbol = ss.str();
}
- const LV2URIMap& uris = App::instance().uris();
+ const URIs& uris = App::instance().uris();
const Path path = _patch->path().child(symbol);
// FIXME: polyphony?
@@ -817,7 +817,7 @@ GraphObject::Properties
PatchCanvas::get_initial_data(Resource::Graph ctx)
{
GraphObject::Properties result;
- const LV2URIMap& uris = App::instance().uris();
+ const URIs& uris = App::instance().uris();
result.insert(make_pair(uris.ingenui_canvas_x,
Resource::Property((float)_last_click_x, ctx)));
result.insert(make_pair(uris.ingenui_canvas_y,
diff --git a/src/gui/PatchPortModule.cpp b/src/gui/PatchPortModule.cpp
index 15c26392..19ac52e3 100644
--- a/src/gui/PatchPortModule.cpp
+++ b/src/gui/PatchPortModule.cpp
@@ -83,7 +83,7 @@ PatchPortModule::store_location()
const Atom x(static_cast<float>(property_x()));
const Atom y(static_cast<float>(property_y()));
- const LV2URIMap& uris = App::instance().uris();
+ const URIs& uris = App::instance().uris();
const Atom& existing_x = _model->get_property(uris.ingenui_canvas_x);
const Atom& existing_y = _model->get_property(uris.ingenui_canvas_y);
@@ -104,7 +104,7 @@ PatchPortModule::store_location()
void
PatchPortModule::show_human_names(bool b)
{
- const LV2URIMap& uris = App::instance().uris();
+ const URIs& uris = App::instance().uris();
const Atom& name = _model->get_property(uris.lv2_name);
if (b && name.type() == Atom::STRING)
set_name(name.get_string());
@@ -122,7 +122,7 @@ PatchPortModule::set_name(const std::string& n)
void
PatchPortModule::property_changed(const URI& key, const Atom& value)
{
- const LV2URIMap& uris = App::instance().uris();
+ const URIs& uris = App::instance().uris();
switch (value.type()) {
case Atom::FLOAT:
if (key == uris.ingenui_canvas_x) {
diff --git a/src/gui/PatchTreeWindow.cpp b/src/gui/PatchTreeWindow.cpp
index 18d6610a..fef646c1 100644
--- a/src/gui/PatchTreeWindow.cpp
+++ b/src/gui/PatchTreeWindow.cpp
@@ -192,7 +192,7 @@ void
PatchTreeWindow::patch_property_changed(const URI& key, const Atom& value,
SharedPtr<PatchModel> patch)
{
- const LV2URIMap& uris = App::instance().uris();
+ const URIs& uris = App::instance().uris();
_enable_signal = false;
if (key == uris.ingen_enabled && value.type() == Atom::BOOL) {
Gtk::TreeModel::iterator i = find_patch(_patch_treestore->children(), patch);
diff --git a/src/gui/PatchWindow.cpp b/src/gui/PatchWindow.cpp
index bab06da8..14f7c060 100644
--- a/src/gui/PatchWindow.cpp
+++ b/src/gui/PatchWindow.cpp
@@ -458,7 +458,7 @@ PatchWindow::event_save()
void
PatchWindow::event_save_as()
{
- const Shared::LV2URIMap& uris = App::instance().uris();
+ const Shared::URIs& uris = App::instance().uris();
while (true) {
Gtk::FileChooserDialog dialog(*this, "Save Patch", Gtk::FILE_CHOOSER_ACTION_SAVE);
diff --git a/src/gui/Port.cpp b/src/gui/Port.cpp
index a3a7afb2..adaf2510 100644
--- a/src/gui/Port.cpp
+++ b/src/gui/Port.cpp
@@ -244,7 +244,7 @@ Port::set_control(float value, bool signal)
void
Port::property_changed(const URI& key, const Atom& value)
{
- const LV2URIMap& uris = App::instance().uris();
+ const URIs& uris = App::instance().uris();
if (value.type() == Atom::FLOAT) {
float val = value.get_float();
if (key == uris.ingen_value && !_pressed) {
@@ -278,7 +278,7 @@ Port::property_changed(const URI& key, const Atom& value)
ArtVpathDash*
Port::dash()
{
- const LV2URIMap& uris = App::instance().uris();
+ const URIs& uris = App::instance().uris();
SharedPtr<const PortModel> pm = _port_model.lock();
if (!pm)
return NULL;
diff --git a/src/gui/PortMenu.cpp b/src/gui/PortMenu.cpp
index 6e51ee45..2da24ace 100644
--- a/src/gui/PortMenu.cpp
+++ b/src/gui/PortMenu.cpp
@@ -43,7 +43,7 @@ PortMenu::PortMenu(BaseObjectType* cobject,
void
PortMenu::init(SharedPtr<const PortModel> port, bool patch_port)
{
- const LV2URIMap& uris = App::instance().uris();
+ const URIs& uris = App::instance().uris();
ObjectMenu::init(port);
_patch_port = patch_port;
@@ -96,7 +96,7 @@ PortMenu::on_menu_disconnect()
void
PortMenu::on_menu_set_min()
{
- const LV2URIMap& uris = App::instance().uris();
+ const URIs& uris = App::instance().uris();
SharedPtr<const PortModel> model = PtrCast<const PortModel>(_object);
const Raul::Atom& value = model->get_property(uris.ingen_value);
if (value.is_valid())
@@ -106,7 +106,7 @@ PortMenu::on_menu_set_min()
void
PortMenu::on_menu_set_max()
{
- const LV2URIMap& uris = App::instance().uris();
+ const URIs& uris = App::instance().uris();
SharedPtr<const PortModel> model = PtrCast<const PortModel>(_object);
const Raul::Atom& value = model->get_property(uris.ingen_value);
if (value.is_valid())
@@ -116,7 +116,7 @@ PortMenu::on_menu_set_max()
void
PortMenu::on_menu_reset_range()
{
- const LV2URIMap& uris = App::instance().uris();
+ const URIs& uris = App::instance().uris();
SharedPtr<const PortModel> model = PtrCast<const PortModel>(_object);
SharedPtr<const NodeModel> parent = PtrCast<const NodeModel>(_object->parent());
diff --git a/src/gui/PortPropertiesWindow.cpp b/src/gui/PortPropertiesWindow.cpp
index 0b51074b..7ce9e064 100644
--- a/src/gui/PortPropertiesWindow.cpp
+++ b/src/gui/PortPropertiesWindow.cpp
@@ -96,7 +96,7 @@ PortPropertiesWindow::present(SharedPtr<const PortModel> pm)
void
PortPropertiesWindow::property_changed(const URI& key, const Atom& value)
{
- const Shared::LV2URIMap& uris = App::instance().uris();
+ const Shared::URIs& uris = App::instance().uris();
if (value.type() == Atom::FLOAT) {
if (key == uris.lv2_minimum)
@@ -151,7 +151,7 @@ PortPropertiesWindow::cancel()
void
PortPropertiesWindow::ok()
{
- const Shared::LV2URIMap& uris = App::instance().uris();
+ const Shared::URIs& uris = App::instance().uris();
Resource::Properties props;
props.insert(make_pair(uris.lv2_minimum, float(_min_spinner->get_value())));
props.insert(make_pair(uris.lv2_maximum, float(_max_spinner->get_value())));
diff --git a/src/gui/RenameWindow.cpp b/src/gui/RenameWindow.cpp
index 18fca3de..daadf48e 100644
--- a/src/gui/RenameWindow.cpp
+++ b/src/gui/RenameWindow.cpp
@@ -115,7 +115,7 @@ RenameWindow::cancel_clicked()
void
RenameWindow::ok_clicked()
{
- const Shared::LV2URIMap& uris = App::instance().uris();
+ const Shared::URIs& uris = App::instance().uris();
const string& symbol_str = _symbol_entry->get_text();
const string& label = _label_entry->get_text();
diff --git a/src/gui/SubpatchModule.cpp b/src/gui/SubpatchModule.cpp
index 2c5c968a..e3085e95 100644
--- a/src/gui/SubpatchModule.cpp
+++ b/src/gui/SubpatchModule.cpp
@@ -66,7 +66,7 @@ SubpatchModule::store_location()
const Atom x(static_cast<float>(property_x()));
const Atom y(static_cast<float>(property_y()));
- const LV2URIMap& uris = App::instance().uris();
+ const URIs& uris = App::instance().uris();
const Atom& existing_x = _node->get_property(uris.ingenui_canvas_x);
const Atom& existing_y = _node->get_property(uris.ingenui_canvas_y);
diff --git a/src/gui/ThreadedLoader.cpp b/src/gui/ThreadedLoader.cpp
index 22a311e9..e3cea135 100644
--- a/src/gui/ThreadedLoader.cpp
+++ b/src/gui/ThreadedLoader.cpp
@@ -29,7 +29,7 @@ using namespace Raul;
namespace Ingen {
namespace GUI {
-ThreadedLoader::ThreadedLoader(SharedPtr<Shared::LV2URIMap> uris, SharedPtr<ServerInterface> engine)
+ThreadedLoader::ThreadedLoader(SharedPtr<ServerInterface> engine)
: _engine(engine)
{
set_name("Loader");
diff --git a/src/gui/ThreadedLoader.hpp b/src/gui/ThreadedLoader.hpp
index ab5995f9..deb8781b 100644
--- a/src/gui/ThreadedLoader.hpp
+++ b/src/gui/ThreadedLoader.hpp
@@ -54,8 +54,7 @@ namespace GUI {
class ThreadedLoader : public Raul::Slave
{
public:
- ThreadedLoader(SharedPtr<Shared::LV2URIMap> uris,
- SharedPtr<ServerInterface> engine);
+ ThreadedLoader(SharedPtr<ServerInterface> engine);
void load_patch(bool merge,
const Glib::ustring& document_uri,
diff --git a/src/gui/UploadPatchWindow.cpp b/src/gui/UploadPatchWindow.cpp
index 79b54a10..7540badf 100644
--- a/src/gui/UploadPatchWindow.cpp
+++ b/src/gui/UploadPatchWindow.cpp
@@ -69,7 +69,7 @@ UploadPatchWindow::present(SharedPtr<PatchModel> patch)
void
UploadPatchWindow::on_show()
{
- const Shared::LV2URIMap& uris = App::instance().uris();
+ const Shared::URIs& uris = App::instance().uris();
Gtk::Dialog::on_show();
Raul::Atom atom = _patch->get_property(uris.lv2_symbol);
@@ -222,7 +222,7 @@ UploadPatchWindow::upload_clicked()
{
assert(!_thread);
- const Shared::LV2URIMap& uris = App::instance().uris();
+ const Shared::URIs& uris = App::instance().uris();
Glib::ustring symbol = _symbol_entry->get_text();
Glib::ustring short_name = _short_name_entry->get_text();