diff options
-rw-r--r-- | src/libs/client/OSCEngineSender.cpp | 3 | ||||
-rw-r--r-- | src/libs/gui/ConnectWindow.cpp | 13 | ||||
-rw-r--r-- | src/libs/gui/ConnectWindow.hpp | 2 | ||||
-rw-r--r-- | src/libs/gui/ThreadedLoader.cpp | 6 |
4 files changed, 13 insertions, 11 deletions
diff --git a/src/libs/client/OSCEngineSender.cpp b/src/libs/client/OSCEngineSender.cpp index 48fee877..412cb5cd 100644 --- a/src/libs/client/OSCEngineSender.cpp +++ b/src/libs/client/OSCEngineSender.cpp @@ -55,7 +55,6 @@ OSCEngineSender::~OSCEngineSender() void OSCEngineSender::attach(int32_t ping_id, bool block) { - cerr << "FIXME: attach\n"; //start_listen_thread(_client_port); /*if (engine_url == "") { @@ -70,7 +69,7 @@ OSCEngineSender::attach(int32_t ping_id, bool block) _engine_addr = lo_address_new_from_url(_engine_url.c_str()); if (_engine_addr == NULL) { - cerr << "Unable to connect, aborting." << endl; + cerr << "Aborting: Unable to connect to " << _engine_url << endl; exit(EXIT_FAILURE); } diff --git a/src/libs/gui/ConnectWindow.cpp b/src/libs/gui/ConnectWindow.cpp index 8348126b..f1b0912a 100644 --- a/src/libs/gui/ConnectWindow.cpp +++ b/src/libs/gui/ConnectWindow.cpp @@ -84,7 +84,7 @@ ConnectWindow::start(Ingen::Shared::World* world) set_connected_to(world->engine); - connect(); + connect(true); } @@ -154,7 +154,7 @@ ConnectWindow::set_connecting_widget_states() * the App with them. */ void -ConnectWindow::connect() +ConnectWindow::connect(bool existing) { assert(!_attached); assert(!App::instance().client()); @@ -165,8 +165,10 @@ ConnectWindow::connect() Ingen::Shared::World* world = App::instance().world(); if (_mode == CONNECT_REMOTE) { - const string url = (_widgets_loaded ? _url_entry->get_text() : "osc.udp://localhost:16180"); - world->engine = SharedPtr<EngineInterface>(new OSCEngineSender(url)); + if (!existing) { + const string url = (_widgets_loaded ? _url_entry->get_text() : "osc.udp://localhost:16180"); + world->engine = SharedPtr<EngineInterface>(new OSCEngineSender(url)); + } OSCSigEmitter* ose = new OSCSigEmitter(1024, 16181); // FIXME: args SharedPtr<ThreadedSigClientInterface> client(ose); @@ -282,7 +284,8 @@ ConnectWindow::load_widgets() _launch_radio->signal_toggled().connect(sigc::mem_fun(this, &ConnectWindow::launch_toggled)); _internal_radio->signal_clicked().connect(sigc::mem_fun(this, &ConnectWindow::internal_toggled)); _disconnect_button->signal_clicked().connect(sigc::mem_fun(this, &ConnectWindow::disconnect)); - _connect_button->signal_clicked().connect(sigc::mem_fun(this, &ConnectWindow::connect)); + _connect_button->signal_clicked().connect(sigc::bind( + sigc::mem_fun(this, &ConnectWindow::connect), false)); _quit_button->signal_clicked().connect(sigc::mem_fun(this, &ConnectWindow::quit)); _progress_bar->set_pulse_step(0.01); diff --git a/src/libs/gui/ConnectWindow.hpp b/src/libs/gui/ConnectWindow.hpp index e7620026..8410783d 100644 --- a/src/libs/gui/ConnectWindow.hpp +++ b/src/libs/gui/ConnectWindow.hpp @@ -63,7 +63,7 @@ private: void internal_toggled(); void disconnect(); - void connect(); + void connect(bool existing); void quit(); void on_show(); void on_hide(); diff --git a/src/libs/gui/ThreadedLoader.cpp b/src/libs/gui/ThreadedLoader.cpp index d06ddde6..94c517a8 100644 --- a/src/libs/gui/ThreadedLoader.cpp +++ b/src/libs/gui/ThreadedLoader.cpp @@ -15,15 +15,15 @@ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include <fstream> -#include <cassert> +#include <iostream> #include <string> #include "module/global.hpp" #include "module/World.hpp" #include "client/PatchModel.hpp" #include "App.hpp" #include "ThreadedLoader.hpp" -using std::cout; using std::endl; + +using namespace std; namespace Ingen { namespace GUI { |