summaryrefslogtreecommitdiffstats
path: root/src/libs/gui
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2008-08-14 06:38:33 +0000
committerDavid Robillard <d@drobilla.net>2008-08-14 06:38:33 +0000
commita573c44a227be59fb7f25e4b1d1cc8238c2329d8 (patch)
treed78b77578462ef2f2d2fdf50eeb770271f6d0e1f /src/libs/gui
parent46d363c84afd6306a0fa7fe60b77808087047b44 (diff)
downloadingen-a573c44a227be59fb7f25e4b1d1cc8238c2329d8.tar.gz
ingen-a573c44a227be59fb7f25e4b1d1cc8238c2329d8.tar.bz2
ingen-a573c44a227be59fb7f25e4b1d1cc8238c2329d8.zip
Don't load engine module twice.
git-svn-id: http://svn.drobilla.net/lad/ingen@1376 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/gui')
-rw-r--r--src/libs/gui/ConnectWindow.cpp31
1 files changed, 14 insertions, 17 deletions
diff --git a/src/libs/gui/ConnectWindow.cpp b/src/libs/gui/ConnectWindow.cpp
index 4846644a..c9cd948d 100644
--- a/src/libs/gui/ConnectWindow.cpp
+++ b/src/libs/gui/ConnectWindow.cpp
@@ -70,19 +70,6 @@ ConnectWindow::ConnectWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::
, _connect_stage(0)
, _new_engine(NULL)
{
- _engine_module = Ingen::Shared::load_module("ingen_engine");
-
- if (!_engine_module) {
- cerr << "Unable to load ingen_engine module, internal engine unavailable." << endl;
- cerr << "If you are running from the source tree, run ingenuity_dev." << endl;
- }
-
- bool found = _engine_module->get_symbol("new_engine", (void*&)_new_engine);
-
- if (!found) {
- cerr << "Unable to find module entry point, internal engine unavailable." << endl;
- _engine_module.reset();
- }
}
@@ -218,9 +205,10 @@ ConnectWindow::connect()
} else if (_mode == INTERNAL) {
Ingen::Shared::World* world = App::instance().world();
- assert(_new_engine);
- if ( ! world->local_engine)
+ if ( ! world->local_engine) {
+ assert(_new_engine);
world->local_engine = SharedPtr<Engine>(_new_engine(world));
+ }
if ( ! world->engine)
world->engine = world->local_engine->new_queued_interface();
@@ -297,9 +285,18 @@ ConnectWindow::load_widgets()
_connect_button->signal_clicked().connect(sigc::mem_fun(this, &ConnectWindow::connect));
_quit_button->signal_clicked().connect(sigc::mem_fun(this, &ConnectWindow::quit));
- _widgets_loaded = true;
-
_progress_bar->set_pulse_step(0.01);
+ _widgets_loaded = true;
+
+ _engine_module = Ingen::Shared::load_module("ingen_engine");
+ if (!_engine_module)
+ cerr << "Unable to load ingen_engine module, internal engine unavailable." << endl;
+ bool found = _engine_module->get_symbol("new_engine", (void*&)_new_engine);
+ if (!found) {
+ cerr << "Unable to find module entry point, internal engine unavailable." << endl;
+ _engine_module.reset();
+ }
+
server_toggled();
}