summaryrefslogtreecommitdiffstats
path: root/src/gui/App.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2009-12-19 21:37:50 +0000
committerDavid Robillard <d@drobilla.net>2009-12-19 21:37:50 +0000
commit19045ab92aa7e996971584a0dc8780d1d58b498b (patch)
tree619c73deb7fd64ce31c5167490d1ae186dbb2695 /src/gui/App.cpp
parent4613a2e15f1122ecf6830171de0ab18dc22fefff (diff)
downloadingen-19045ab92aa7e996971584a0dc8780d1d58b498b.tar.gz
ingen-19045ab92aa7e996971584a0dc8780d1d58b498b.tar.bz2
ingen-19045ab92aa7e996971584a0dc8780d1d58b498b.zip
New ingen module (library, not e.g. LV2 plugin) design.
Much cleaner interface and general usage of Ingen as a library. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2314 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/gui/App.cpp')
-rw-r--r--src/gui/App.cpp46
1 files changed, 19 insertions, 27 deletions
diff --git a/src/gui/App.cpp b/src/gui/App.cpp
index 29b00283..f42ddcb4 100644
--- a/src/gui/App.cpp
+++ b/src/gui/App.cpp
@@ -30,7 +30,6 @@
#include "module/World.hpp"
#include "engine/Engine.hpp"
#include "interface/EngineInterface.hpp"
-#include "serialisation/serialisation.hpp"
#include "client/ObjectModel.hpp"
#include "client/PatchModel.hpp"
#include "client/ClientStore.hpp"
@@ -102,10 +101,10 @@ App::~App()
}
void
-App::init(int argc, char** argv, Ingen::Shared::World* world)
+App::init(Ingen::Shared::World* world)
{
Gnome::Canvas::init();
- _main = new Gtk::Main(argc, argv);
+ _main = new Gtk::Main(world->argc, world->argv);
if (!_instance)
_instance = new App(world);
@@ -121,19 +120,19 @@ App::init(int argc, char** argv, Ingen::Shared::World* world)
// Set style for embedded node GUIs
const string rc_style =
- "style \"ingen_embedded_node_gui_style\" {"
- " bg[NORMAL] = \"#212222\""
- " bg[ACTIVE] = \"#505050\""
- " bg[PRELIGHT] = \"#525454\""
- " bg[SELECTED] = \"#99A0A0\""
- " bg[INSENSITIVE] = \"#F03030\""
- " fg[NORMAL] = \"#FFFFFF\""
- " fg[ACTIVE] = \"#FFFFFF\""
- " fg[PRELIGHT] = \"#FFFFFF\""
- " fg[SELECTED] = \"#FFFFFF\""
- " fg[INSENSITIVE] = \"#FFFFFF\""
- "}\n"
- "widget \"*ingen_embedded_node_gui_container*\" style \"ingen_embedded_node_gui_style\"\n";
+ "style \"ingen_embedded_node_gui_style\" {\n"
+ "bg[NORMAL] = \"#212222\"\n"
+ "bg[ACTIVE] = \"#505050\"\n"
+ "bg[PRELIGHT] = \"#525454\"\n"
+ "bg[SELECTED] = \"#99A0A0\"\n"
+ "bg[INSENSITIVE] = \"#F03030\"\n"
+ "fg[NORMAL] = \"#FFFFFF\"\n"
+ "fg[ACTIVE] = \"#FFFFFF\"\n"
+ "fg[PRELIGHT] = \"#FFFFFF\"\n"
+ "fg[SELECTED] = \"#FFFFFF\"\n"
+ "fg[INSENSITIVE] = \"#FFFFFF\"\n"
+ "}\n"
+ "widget \"*ingen_embedded_node_gui_container*\" style \"ingen_embedded_node_gui_style\"\n";
Gtk::RC::parse_string(rc_style);
@@ -168,7 +167,7 @@ App::attach(SharedPtr<SigClientInterface> client,
_client = client;
_handle = handle;
- _store = SharedPtr<ClientStore>(new ClientStore(_world->engine, client));
+ _store = SharedPtr<ClientStore>(new ClientStore(_world->engine, client));
_loader = SharedPtr<ThreadedLoader>(new ThreadedLoader(_world->engine));
_patch_tree_window->init(*_store);
@@ -197,17 +196,10 @@ App::detach()
const SharedPtr<Serialiser>&
App::serialiser()
{
- if (!_serialiser) {
- if (!_world->serialisation_module)
- _world->serialisation_module = Ingen::Shared::load_module("ingen_serialisation");
+ if (!_world->serialiser)
+ _world->load("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;
+ return _world->serialiser;
}