diff options
author | David Robillard <d@drobilla.net> | 2019-03-09 17:44:36 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2019-12-12 19:42:09 +0100 |
commit | 3c0ed6b66b6e99c68fc01c86b5796a55d74a5977 (patch) | |
tree | 7be3252c13ef123b956424169c1bfbf55359564a /src/gui | |
parent | e32f32a360f2bf8f017ea347b6d1e568c0beaf68 (diff) | |
download | ingen-3c0ed6b66b6e99c68fc01c86b5796a55d74a5977.tar.gz ingen-3c0ed6b66b6e99c68fc01c86b5796a55d74a5977.tar.bz2 ingen-3c0ed6b66b6e99c68fc01c86b5796a55d74a5977.zip |
WIP: Port to serd1serd1
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/App.cpp | 13 | ||||
-rw-r--r-- | src/gui/ConnectWindow.cpp | 2 | ||||
-rw-r--r-- | src/gui/GraphCanvas.cpp | 4 | ||||
-rw-r--r-- | src/gui/LoadPluginWindow.cpp | 2 | ||||
-rw-r--r-- | src/gui/NodeMenu.cpp | 4 | ||||
-rw-r--r-- | src/gui/NodeMenu.hpp | 2 | ||||
-rw-r--r-- | src/gui/Port.cpp | 4 | ||||
-rw-r--r-- | src/gui/PropertiesWindow.cpp | 3 | ||||
-rw-r--r-- | src/gui/ingen_gui_lv2.cpp | 1 | ||||
-rw-r--r-- | src/gui/wscript | 7 |
10 files changed, 23 insertions, 19 deletions
diff --git a/src/gui/App.cpp b/src/gui/App.cpp index dfa34998..0e2292eb 100644 --- a/src/gui/App.cpp +++ b/src/gui/App.cpp @@ -87,7 +87,7 @@ App::App(ingen::World& world) , _requested_plugins(false) , _is_plugin(false) { - _world.conf().load_default("ingen", "gui.ttl"); + _world.conf().load_default(_world.rdf_world(), "ingen", "gui.ttl"); WidgetFactory::get_widget_derived("connect_win", _connect_window); WidgetFactory::get_widget_derived("messages_win", _messages_window); @@ -99,7 +99,6 @@ App::App(ingen::World& world) _about_dialog->property_program_name() = "Ingen"; _about_dialog->property_logo_icon_name() = "ingen"; - PluginModel::set_rdf_world(*world.rdf_world()); PluginModel::set_lilv_world(world.lilv_world()); using namespace std::placeholders; @@ -178,7 +177,8 @@ App::attach(SPtr<ingen::Interface> client) } if (_world.conf().option("dump").get<int32_t>()) { - _dumper = SPtr<StreamWriter>(new StreamWriter(_world.uri_map(), + _dumper = SPtr<StreamWriter>(new StreamWriter(_world.rdf_world(), + _world.uri_map(), _world.uris(), URI("ingen:/client"), stderr, @@ -469,8 +469,11 @@ App::quit(Gtk::Window* dialog_parent) Gtk::Main::quit(); try { - const std::string path = _world.conf().save( - _world.uri_map(), "ingen", "gui.ttl", Configuration::GUI); + const std::string path = _world.conf().save(_world.rdf_world(), + _world.uri_map(), + "ingen", + "gui.ttl", + Configuration::GUI); std::cout << fmt("Saved GUI settings to %1%\n", path); } catch (const std::exception& e) { std::cerr << fmt("Error saving GUI settings (%1%)\n", e.what()); diff --git a/src/gui/ConnectWindow.cpp b/src/gui/ConnectWindow.cpp index 209475e0..a7b2cbf7 100644 --- a/src/gui/ConnectWindow.cpp +++ b/src/gui/ConnectWindow.cpp @@ -228,7 +228,7 @@ ConnectWindow::connect(bool existing) if (_mode == Mode::CONNECT_REMOTE) { std::string uri_str = world.conf().option("connect").ptr<char>(); if (existing) { - uri_str = world.interface()->uri(); + uri_str = world.interface()->uri().str(); _connect_stage = 1; SPtr<client::SocketClient> client = dynamic_ptr_cast<client::SocketClient>( world.interface()); diff --git a/src/gui/GraphCanvas.cpp b/src/gui/GraphCanvas.cpp index 13b17bdf..40373a1a 100644 --- a/src/gui/GraphCanvas.cpp +++ b/src/gui/GraphCanvas.cpp @@ -636,7 +636,7 @@ serialise_arc(GanvEdge* arc, void* data) gui::Arc* garc = dynamic_cast<gui::Arc*>(Glib::wrap(GANV_EDGE(arc))); if (garc) { - serialiser->serialise_arc(Sord::Node(), garc->model()); + serialiser->serialise_arc({}, garc->model()); } } @@ -690,7 +690,7 @@ GraphCanvas::paste() // Figure out the copy graph base path Raul::Path copy_root("/"); if (base_uri) { - std::string base = *base_uri; + std::string base = base_uri->str(); if (base[base.size() - 1] == '/') { base = base.substr(0, base.size() - 1); } diff --git a/src/gui/LoadPluginWindow.cpp b/src/gui/LoadPluginWindow.cpp index bb84f96f..32a35c65 100644 --- a/src/gui/LoadPluginWindow.cpp +++ b/src/gui/LoadPluginWindow.cpp @@ -459,7 +459,7 @@ LoadPluginWindow::filter_changed() field = get_author_name(plugin); break; case CriteriaColumns::Criteria::URI: - field = plugin->uri(); + field = plugin->uri().str(); break; } diff --git a/src/gui/NodeMenu.cpp b/src/gui/NodeMenu.cpp index e2478592..ef0e80dc 100644 --- a/src/gui/NodeMenu.cpp +++ b/src/gui/NodeMenu.cpp @@ -235,11 +235,11 @@ NodeMenu::on_save_preset_activated() } void -NodeMenu::on_preset_activated(const std::string& uri) +NodeMenu::on_preset_activated(const URI& uri) { _app->set_property(block()->uri(), _app->uris().pset_preset, - _app->forge().make_urid(URI(uri))); + _app->forge().make_urid(uri)); } bool diff --git a/src/gui/NodeMenu.hpp b/src/gui/NodeMenu.hpp index 2a3268b4..799abef3 100644 --- a/src/gui/NodeMenu.hpp +++ b/src/gui/NodeMenu.hpp @@ -60,7 +60,7 @@ protected: void on_menu_enabled(); void on_menu_randomize(); void on_save_preset_activated(); - void on_preset_activated(const std::string& uri); + void on_preset_activated(const URI& uri); Gtk::MenuItem* _popup_gui_menuitem; Gtk::CheckMenuItem* _embed_gui_menuitem; diff --git a/src/gui/Port.cpp b/src/gui/Port.cpp index 14f87fc1..63e90bdd 100644 --- a/src/gui/Port.cpp +++ b/src/gui/Port.cpp @@ -289,8 +289,8 @@ Port::build_uri_menu() // Add a menu item for each such class for (const auto& v : values) { if (!v.first.empty()) { - const std::string qname = world.rdf_world()->prefixes().qualify(v.second); - const std::string label = qname + " - " + v.first; + const auto qname = world.env().qualify(v.second); + const std::string label = std::string(*qname) + " - " + v.first; menu->items().push_back(Gtk::Menu_Helpers::MenuElem(label)); Gtk::MenuItem* menu_item = &(menu->items().back()); menu_item->signal_activate().connect( diff --git a/src/gui/PropertiesWindow.cpp b/src/gui/PropertiesWindow.cpp index 9912f73a..32ed24e5 100644 --- a/src/gui/PropertiesWindow.cpp +++ b/src/gui/PropertiesWindow.cpp @@ -114,7 +114,8 @@ PropertiesWindow::add_property(const URI& key, const Atom& value) LilvNode* prop = lilv_new_uri(world.lilv_world(), key.c_str()); std::string name = rdfs::label(world, prop); if (name.empty()) { - name = world.rdf_world()->prefixes().qualify(key); + const auto qname = world.env().qualify(key); + name = qname ? std::string(*qname) : key.str(); } Gtk::Label* label = new Gtk::Label( std::string("<a href=\"") + key.string() + "\">" + name + "</a>", diff --git a/src/gui/ingen_gui_lv2.cpp b/src/gui/ingen_gui_lv2.cpp index 4817e9ae..4107d5c0 100644 --- a/src/gui/ingen_gui_lv2.cpp +++ b/src/gui/ingen_gui_lv2.cpp @@ -143,6 +143,7 @@ instantiate(const LV2UI_Descriptor* descriptor, // Set up an engine interface that writes LV2 atoms ui->engine = SPtr<ingen::Interface>( new ingen::AtomWriter( + ui->world->rdf_world(), ui->world->uri_map(), ui->world->uris(), *ui->sink)); ui->world->set_interface(ui->engine); diff --git a/src/gui/wscript b/src/gui/wscript index b33bd31e..2a52849e 100644 --- a/src/gui/wscript +++ b/src/gui/wscript @@ -57,11 +57,10 @@ def build(bld): LILV LV2 RAUL - SIGCPP SERD - SORD - SRATOM + SIGCPP SOUP + SRATOM SUIL WEBKIT ''') @@ -124,4 +123,4 @@ def build(bld): target = 'ingen_gui_lv2', install_path = '${LV2DIR}/ingen.lv2/', use = 'libingen libingen_gui', - uselib = 'LV2 SERD SORD SRATOM LILV RAUL GLIBMM GTKMM') + uselib = 'LV2 SERD SRATOM LILV RAUL GLIBMM GTKMM') |