diff options
author | David Robillard <d@drobilla.net> | 2018-01-21 00:41:34 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2018-01-21 00:56:50 +0100 |
commit | a99b72e4adbc4c28fadc08d29299d99405f72db9 (patch) | |
tree | fb21f2cea8f5db1dc187cdbdd01f43e73bbddfff /src/server/events | |
parent | 329f498d901f9be9c0c820749850f5277a17df5d (diff) | |
download | ingen-a99b72e4adbc4c28fadc08d29299d99405f72db9.tar.gz ingen-a99b72e4adbc4c28fadc08d29299d99405f72db9.tar.bz2 ingen-a99b72e4adbc4c28fadc08d29299d99405f72db9.zip |
Add FilePath class and remove use of glib path utilities
Diffstat (limited to 'src/server/events')
-rw-r--r-- | src/server/events/CreateBlock.cpp | 3 | ||||
-rw-r--r-- | src/server/events/Delta.cpp | 14 |
2 files changed, 9 insertions, 8 deletions
diff --git a/src/server/events/CreateBlock.cpp b/src/server/events/CreateBlock.cpp index fc0c0f5e..d678bea3 100644 --- a/src/server/events/CreateBlock.cpp +++ b/src/server/events/CreateBlock.cpp @@ -119,7 +119,8 @@ CreateBlock::pre_process(PreProcessContext& ctx) LilvState* state = nullptr; auto s = _properties.find(uris.state_state); if (s != _properties.end() && s->second.type() == uris.forge.Path) { - state = LV2Block::load_state(_engine.world(), s->second.ptr<char>()); + state = LV2Block::load_state( + _engine.world(), FilePath(s->second.ptr<char>())); } // Instantiate plugin diff --git a/src/server/events/Delta.cpp b/src/server/events/Delta.cpp index 56cc22aa..b23ae884 100644 --- a/src/server/events/Delta.cpp +++ b/src/server/events/Delta.cpp @@ -17,8 +17,6 @@ #include <vector> #include <thread> -#include <glibmm/convert.h> - #include "ingen/Log.hpp" #include "ingen/Store.hpp" #include "ingen/URIs.hpp" @@ -366,15 +364,17 @@ Delta::pre_process(PreProcessContext& ctx) _status = Status::BAD_VALUE_TYPE; } } else if (key == uris.pset_preset) { - std::string uri_str; + URI uri; if (uris.forge.is_uri(value)) { - uri_str = uris.forge.str(value, false); + const std::string uri_str = uris.forge.str(value, false); + if (URI::is_valid(uri_str)) { + uri = URI(uri_str); + } } else if (value.type() == uris.forge.Path) { - uri_str = Glib::filename_to_uri(value.ptr<char>()); + uri = URI(FilePath(value.ptr<char>())); } - if (URI::is_valid(uri_str)) { - const URI uri(uri_str); + if (!uri.empty()) { op = SpecialType::PRESET; if ((_state = block->load_preset(uri))) { lilv_state_emit_port_values( |