summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-03-12 02:28:21 +0000
committerDavid Robillard <d@drobilla.net>2012-03-12 02:28:21 +0000
commite9d9569271ee962c09ab66c6babed1ca5655a6c6 (patch)
treef77142b08c2bf2488eb382e993da1477c0b94307 /src/gui
parent7835b3d8c9b5b4a6f4959f56083d62826e6f7b8e (diff)
downloadingen-e9d9569271ee962c09ab66c6babed1ca5655a6c6.tar.gz
ingen-e9d9569271ee962c09ab66c6babed1ca5655a6c6.tar.bz2
ingen-e9d9569271ee962c09ab66c6babed1ca5655a6c6.zip
Unify event response mechanism and make it more appropriate for wire transmission.
The downside being more cryptic error messages until the client side error reporting stuff gets more fancy, but the important part is that belongs client side. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4053 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/App.cpp10
-rw-r--r--src/gui/App.hpp3
-rw-r--r--src/gui/ConnectWindow.cpp4
-rw-r--r--src/gui/ConnectWindow.hpp2
4 files changed, 11 insertions, 8 deletions
diff --git a/src/gui/App.cpp b/src/gui/App.cpp
index 5a42af53..e23ef5a6 100644
--- a/src/gui/App.cpp
+++ b/src/gui/App.cpp
@@ -167,8 +167,8 @@ App::attach(SharedPtr<SigClientInterface> client)
_patch_tree_window->init(*this, *_store);
- _client->signal_response_error().connect(
- sigc::mem_fun(this, &App::error_response));
+ _client->signal_response().connect(
+ sigc::mem_fun(this, &App::response));
_client->signal_error().connect(
sigc::mem_fun(this, &App::error_message));
_client->signal_property_change().connect(
@@ -199,9 +199,11 @@ App::serialiser()
}
void
-App::error_response(int32_t id, const string& str)
+App::response(int32_t id, Status status)
{
- error_message(str);
+ if (status) {
+ error_message(ingen_status_string(status));
+ }
}
void
diff --git a/src/gui/App.hpp b/src/gui/App.hpp
index 69bcd793..5ca767e9 100644
--- a/src/gui/App.hpp
+++ b/src/gui/App.hpp
@@ -28,6 +28,7 @@
#include "raul/SharedPtr.hpp"
#include "raul/Deletable.hpp"
+#include "ingen/Status.hpp"
#include "ingen/shared/World.hpp"
namespace Ingen {
@@ -135,7 +136,7 @@ protected:
App(Ingen::Shared::World* world);
bool animate();
- void error_response(int32_t id, const std::string& str);
+ void response(int32_t id, Ingen::Status status);
void property_change(const Raul::URI& subject,
const Raul::URI& key,
diff --git a/src/gui/ConnectWindow.cpp b/src/gui/ConnectWindow.cpp
index e7a0aba1..0bfa1999 100644
--- a/src/gui/ConnectWindow.cpp
+++ b/src/gui/ConnectWindow.cpp
@@ -369,8 +369,8 @@ ConnectWindow::gtk_callback()
if (_connect_stage == 0) {
_attached = false;
- _app->client()->signal_response_ok().connect(
- sigc::mem_fun(this, &ConnectWindow::on_response));
+ _app->client()->signal_response().connect(
+ sigc::mem_fun(this, &ConnectWindow::ingen_response));
_ping_id = abs(rand()) / 2 * 2; // avoid -1
_app->engine()->respond_to(_app->client().get(), _ping_id);
diff --git a/src/gui/ConnectWindow.hpp b/src/gui/ConnectWindow.hpp
index 9f82db32..9905b51a 100644
--- a/src/gui/ConnectWindow.hpp
+++ b/src/gui/ConnectWindow.hpp
@@ -45,7 +45,7 @@ public:
void set_connected_to(SharedPtr<ServerInterface> engine);
void start(App& app, Ingen::Shared::World* world);
- void on_response(int32_t id) { _attached = true; }
+ void ingen_response(int32_t id, Status status) { _attached = true; }
bool attached() const { return _finished_connecting; }
bool quit_flag() const { return _quit_flag; }