diff options
Diffstat (limited to 'src/libs/gui/App.cpp')
-rw-r--r-- | src/libs/gui/App.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/libs/gui/App.cpp b/src/libs/gui/App.cpp index a00f93a5..b558f706 100644 --- a/src/libs/gui/App.cpp +++ b/src/libs/gui/App.cpp @@ -29,6 +29,7 @@ #include "module/Module.hpp" #include "module/World.hpp" #include "interface/EngineInterface.hpp" +#include "serialisation/serialisation.hpp" #include "client/ObjectModel.hpp" #include "client/PatchModel.hpp" #include "client/Store.hpp" @@ -66,26 +67,23 @@ App* App::_instance = 0; App::App(Ingen::Shared::World* world) - : _serialisation_module(Ingen::Shared::load_module("ingen_serialisation")) - , _configuration(new Configuration()) + : _configuration(new Configuration()) , _about_dialog(NULL) , _window_factory(new WindowFactory()) , _world(world) , _enable_signal(true) { - if (_serialisation_module) { - Serialiser* (*new_serialiser)(Ingen::Shared::World*) = NULL; + // FIXME: defer loading of serialisation module until needed + if (!world->serialisation_module) + world->serialisation_module = Ingen::Shared::load_module("ingen_serialisation"); - bool found = _serialisation_module->get_symbol("new_serialiser", (void*&)new_serialiser); + if (world->serialisation_module) + if (!world->serialiser) + world->serialiser = SharedPtr<Serialiser>( + Ingen::Serialisation::new_serialiser(world)); - if (found) - _serialiser = SharedPtr<Serialiser>(new_serialiser(world)); - } - - if ( ! _serialiser) { + if (!world->serialiser) cerr << "WARNING: Failed to load ingen_serialisation module, save disabled." << endl; - cerr << "(If you are running from the source tree, source set_dev_environment.sh)" << endl; - } Glib::RefPtr<Gnome::Glade::Xml> glade_xml = GladeFactory::new_glade_reference(); @@ -176,7 +174,9 @@ App::attach(SharedPtr<SigClientInterface> client) _world->engine->register_client(client.get()); _client = client; - _store = SharedPtr<Store>(new Store(_world->engine, client)); + assert(!_world->store); + _store = SharedPtr<ClientStore>(new ClientStore(_world->engine, client)); + _world->store = _store; _loader = SharedPtr<ThreadedLoader>(new ThreadedLoader(_world->engine)); _patch_tree_window->init(*_store); |