summaryrefslogtreecommitdiffstats
path: root/src/gui/ThreadedLoader.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-10-22 03:08:06 +0000
committerDavid Robillard <d@drobilla.net>2011-10-22 03:08:06 +0000
commitac1d6d135bda8d739fdb8bf564f89c38b664c097 (patch)
treed750da79dd88b64ab2a88cca1651c2a5a240bd72 /src/gui/ThreadedLoader.cpp
parent143968e38cc2f058dd7c500e984904a39864d652 (diff)
downloadingen-ac1d6d135bda8d739fdb8bf564f89c38b664c097.tar.gz
ingen-ac1d6d135bda8d739fdb8bf564f89c38b664c097.tar.bz2
ingen-ac1d6d135bda8d739fdb8bf564f89c38b664c097.zip
De-singleton-ify GUI.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@3584 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/gui/ThreadedLoader.cpp')
-rw-r--r--src/gui/ThreadedLoader.cpp19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/gui/ThreadedLoader.cpp b/src/gui/ThreadedLoader.cpp
index e3cea135..babc6ee9 100644
--- a/src/gui/ThreadedLoader.cpp
+++ b/src/gui/ThreadedLoader.cpp
@@ -29,8 +29,9 @@ using namespace Raul;
namespace Ingen {
namespace GUI {
-ThreadedLoader::ThreadedLoader(SharedPtr<ServerInterface> engine)
- : _engine(engine)
+ThreadedLoader::ThreadedLoader(App& app, SharedPtr<ServerInterface> engine)
+ : _app(app)
+ , _engine(engine)
{
set_name("Loader");
@@ -43,7 +44,7 @@ ThreadedLoader::ThreadedLoader(SharedPtr<ServerInterface> engine)
SharedPtr<Parser>
ThreadedLoader::parser()
{
- Ingen::Shared::World* world = App::instance().world();
+ Ingen::Shared::World* world = _app.world();
if (!world->parser())
world->load_module("serialisation");
@@ -73,7 +74,7 @@ ThreadedLoader::load_patch(bool merge,
{
_mutex.lock();
- Ingen::Shared::World* world = App::instance().world();
+ Ingen::Shared::World* world = _app.world();
Glib::ustring engine_base = "";
if (engine_parent) {
@@ -87,8 +88,8 @@ ThreadedLoader::load_patch(bool merge,
sigc::hide_return(
sigc::bind(sigc::mem_fun(world->parser().get(),
&Ingen::Serialisation::Parser::parse_file),
- App::instance().world(),
- App::instance().world()->engine().get(),
+ _app.world(),
+ _app.world()->engine().get(),
document_uri,
engine_parent,
engine_symbol,
@@ -118,11 +119,11 @@ void
ThreadedLoader::save_patch_event(SharedPtr<const PatchModel> model,
const string& filename)
{
- if (App::instance().serialiser()) {
+ if (_app.serialiser()) {
if (filename.find(".ingen") != string::npos)
- App::instance().serialiser()->write_bundle(model, filename);
+ _app.serialiser()->write_bundle(model, filename);
else
- App::instance().serialiser()->to_file(model, filename);
+ _app.serialiser()->to_file(model, filename);
}
}