summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-07-26 15:27:03 +0000
committerDavid Robillard <d@drobilla.net>2012-07-26 15:27:03 +0000
commit3c5931bb13b5f88edcebb375fa6964dde8b85563 (patch)
tree9801897576b7fb9d8a9f700847c670f216fc93b7 /src/gui
parentb83ed4f83cf4c9b5054dcf55bea710313c369633 (diff)
downloadingen-3c5931bb13b5f88edcebb375fa6964dde8b85563.tar.gz
ingen-3c5931bb13b5f88edcebb375fa6964dde8b85563.tar.bz2
ingen-3c5931bb13b5f88edcebb375fa6964dde8b85563.zip
Report subject with errors to client for more meaningful error messages.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4556 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/App.cpp8
-rw-r--r--src/gui/App.hpp2
-rw-r--r--src/gui/ConnectWindow.hpp4
3 files changed, 10 insertions, 4 deletions
diff --git a/src/gui/App.cpp b/src/gui/App.cpp
index a815c6e7..1d6381fb 100644
--- a/src/gui/App.cpp
+++ b/src/gui/App.cpp
@@ -203,10 +203,14 @@ App::serialiser()
}
void
-App::response(int32_t id, Status status)
+App::response(int32_t id, Status status, const std::string& subject)
{
if (status) {
- error_message(ingen_status_string(status));
+ std::string msg = ingen_status_string(status);
+ if (!subject.empty()) {
+ msg += ": " + subject;
+ }
+ error_message(msg);
}
}
diff --git a/src/gui/App.hpp b/src/gui/App.hpp
index 7969982c..1f611a13 100644
--- a/src/gui/App.hpp
+++ b/src/gui/App.hpp
@@ -140,7 +140,7 @@ protected:
explicit App(Ingen::Shared::World* world);
bool animate();
- void response(int32_t id, Ingen::Status status);
+ void response(int32_t id, Ingen::Status status, const std::string& subject);
void property_change(const Raul::URI& subject,
const Raul::URI& key,
diff --git a/src/gui/ConnectWindow.hpp b/src/gui/ConnectWindow.hpp
index 00ba5fd3..ca27787e 100644
--- a/src/gui/ConnectWindow.hpp
+++ b/src/gui/ConnectWindow.hpp
@@ -51,7 +51,9 @@ public:
void set_connected_to(SharedPtr<Ingen::Interface> engine);
void start(App& app, Ingen::Shared::World* world);
- void ingen_response(int32_t id, Status status) { _attached = true; }
+ void ingen_response(int32_t id, Status status, const std::string& subject) {
+ _attached = true;
+ }
bool attached() const { return _finished_connecting; }
bool quit_flag() const { return _quit_flag; }