summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2008-08-14 05:20:40 +0000
committerDavid Robillard <d@drobilla.net>2008-08-14 05:20:40 +0000
commitdb492ea9443c4813b4124f980793746405ae39ef (patch)
tree70d389a14fe6e83e62123243f3b2ee4404864219 /src
parentce208602f25d443d4f721d75c9bd9c884ba9e9a6 (diff)
downloadingen-db492ea9443c4813b4124f980793746405ae39ef.tar.gz
ingen-db492ea9443c4813b4124f980793746405ae39ef.tar.bz2
ingen-db492ea9443c4813b4124f980793746405ae39ef.zip
Don't wait for plugins from ingen, show root patch window as soon as possible (huge reduction in startup time-to-patch-window).
git-svn-id: http://svn.drobilla.net/lad/ingen@1373 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src')
-rw-r--r--src/libs/gui/ConnectWindow.cpp56
1 files changed, 16 insertions, 40 deletions
diff --git a/src/libs/gui/ConnectWindow.cpp b/src/libs/gui/ConnectWindow.cpp
index 288b30cc..546cbb60 100644
--- a/src/libs/gui/ConnectWindow.cpp
+++ b/src/libs/gui/ConnectWindow.cpp
@@ -359,57 +359,33 @@ ConnectWindow::gtk_callback()
}
}
} else if (_connect_stage == 2) {
- _progress_label->set_text(string("Loading plugins..."));
- App::instance().engine()->load_plugins();
- ++_connect_stage;
- } else if (_connect_stage == 3) {
- //_progress_label->set_text(string("Requesting plugins..."));
- App::instance().engine()->request_plugins();
- ++_connect_stage;
- } else if (_connect_stage == 4) {
- // Wait for first plugin message
- if (App::instance().store()->plugins().size() > 0) {
- _progress_label->set_text(string("Receiving plugins..."));
- ++_connect_stage;
- }
- } else if (_connect_stage == 5) {
- // FIXME
- /*if (App::instance().store().plugins().size() < _client->num_plugins()) {
- static char buf[32];
- snprintf(buf, 32, "%zu/%zu", App::instance().store().plugins().size(),
- ThreadedSigClientInterface::instance()->num_plugins());
- _progress_bar->set_text(Glib::ustring(buf));
- _progress_bar->set_fraction(
- App::instance().store().plugins().size() / (double)_client->num_plugins());
- } else {*/
- _progress_bar->set_text("");
- ++_connect_stage;
- //}
- } else if (_connect_stage == 6) {
- _progress_label->set_text(string("Waiting for root patch..."));
+ _progress_label->set_text(string("Requesting root patch..."));
App::instance().engine()->request_all_objects();
++_connect_stage;
- } else if (_connect_stage == 7) {
+ } else if (_connect_stage == 3) {
if (App::instance().store()->objects().size() > 0) {
SharedPtr<PatchModel> root = PtrCast<PatchModel>(App::instance().store()->object("/"));
- assert(root);
- App::instance().window_factory()->present_patch(root);
- ++_connect_stage;
+ if (root) {
+ set_connected_to(App::instance().engine());
+ App::instance().window_factory()->present_patch(root);
+ ++_connect_stage;
+ }
}
- } else if (_connect_stage == 8) {
- _progress_label->set_text("Connected to engine");
+ } else if (_connect_stage == 4) {
+ _progress_label->set_text(string("Loading plugins..."));
+ App::instance().engine()->load_plugins();
++_connect_stage;
- } else if (_connect_stage == 9) {
+ } else if (_connect_stage == 5) {
+ App::instance().engine()->request_plugins();
++_connect_stage;
- hide();
- } else if (_connect_stage == 10) {
- set_connected_to(App::instance().engine());
+ } else if (_connect_stage == 6) {
+ _progress_label->set_text("Connected to engine");
_connect_stage = 0; // set ourselves up for next time (if there is one)
+ hide();
return false; // deregister this callback
}
- if (_connect_stage != 5) // yeah, ew
- _progress_bar->pulse();
+ _progress_bar->pulse();
if (_connect_stage == -1) { // we were cancelled
_icon->set(Gtk::Stock::DISCONNECT, Gtk::ICON_SIZE_LARGE_TOOLBAR);