diff options
author | David Robillard <d@drobilla.net> | 2008-08-16 18:45:27 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2008-08-16 18:45:27 +0000 |
commit | 42936aa5d924ca89fe3d887fd0ffeb7a281b547e (patch) | |
tree | 0bc295b9f021bee109822782af4c15504b25efa4 /src/libs/gui/App.cpp | |
parent | 1116f096282e47c4f85c4681906bacf2516d5a01 (diff) | |
download | ingen-42936aa5d924ca89fe3d887fd0ffeb7a281b547e.tar.gz ingen-42936aa5d924ca89fe3d887fd0ffeb7a281b547e.tar.bz2 ingen-42936aa5d924ca89fe3d887fd0ffeb7a281b547e.zip |
Add missing Store.cpp.
More serialisation work.
git-svn-id: http://svn.drobilla.net/lad/ingen@1402 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/gui/App.cpp')
-rw-r--r-- | src/libs/gui/App.cpp | 42 |
1 files changed, 18 insertions, 24 deletions
diff --git a/src/libs/gui/App.cpp b/src/libs/gui/App.cpp index a0a877d5..34f04f35 100644 --- a/src/libs/gui/App.cpp +++ b/src/libs/gui/App.cpp @@ -73,18 +73,6 @@ App::App(Ingen::Shared::World* world) , _world(world) , _enable_signal(true) { - // FIXME: defer loading of serialisation module until needed - if (!world->serialisation_module) - world->serialisation_module = Ingen::Shared::load_module("ingen_serialisation"); - - if (world->serialisation_module) - if (!world->serialiser) - world->serialiser = SharedPtr<Serialiser>( - Ingen::Serialisation::new_serialiser(world)); - - if (!world->serialiser) - cerr << "WARNING: Failed to load ingen_serialisation module, save disabled." << endl; - Glib::RefPtr<Gnome::Glade::Xml> glade_xml = GladeFactory::new_glade_reference(); glade_xml->get_widget_derived("connect_win", _connect_window); @@ -93,18 +81,7 @@ App::App(Ingen::Shared::World* world) glade_xml->get_widget("about_win", _about_dialog); _about_dialog->property_program_name() = "Ingen"; - Redland::World& rdf_world = *world->rdf_world; - - rdf_world.add_prefix("xsd", "http://www.w3.org/2001/XMLSchema#"); - rdf_world.add_prefix("ingen", "http://drobilla.net/ns/ingen#"); - rdf_world.add_prefix("ingenuity", "http://drobilla.net/ns/ingenuity#"); - rdf_world.add_prefix("lv2", "http://lv2plug.in/ns/lv2core#"); - rdf_world.add_prefix("lv2_midi", "http://lv2plug.in/ns/ext/midi"); - rdf_world.add_prefix("rdfs", "http://www.w3.org/2000/01/rdf-schema#"); - rdf_world.add_prefix("doap", "http://usefulinc.com/ns/doap#"); - rdf_world.add_prefix("dc", "http://purl.org/dc/elements/1.1/"); - - PluginModel::set_rdf_world(rdf_world); + PluginModel::set_rdf_world(*world->rdf_world); #ifdef HAVE_SLV2 PluginModel::set_slv2_world(world->slv2_world); @@ -197,6 +174,23 @@ App::detach() _world->engine.reset(); } } + + +const SharedPtr<Serialiser>& +App::serialiser() +{ + if (!_serialiser) { + if (!_world->serialisation_module) + _world->serialisation_module = Ingen::Shared::load_module("ingen_serialisation"); + + if (_world->serialisation_module) + _serialiser = SharedPtr<Serialiser>(Ingen::Serialisation::new_serialiser(_world, _store)); + + if (!_serialiser) + cerr << "WARNING: Failed to load ingen_serialisation module, save disabled." << endl; + } + return _serialiser; +} void |