summaryrefslogtreecommitdiffstats
path: root/src/libs/gui
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2008-05-15 00:43:05 +0000
committerDavid Robillard <d@drobilla.net>2008-05-15 00:43:05 +0000
commitd5cc3f720e50583f172425fbebf401e6be0c8b78 (patch)
tree6fe9efb22ef8f26860efc2de4a077e619a530f42 /src/libs/gui
parenteb10d32d8b59f2158ba64ba55e310ba0f5f24170 (diff)
downloadingen-d5cc3f720e50583f172425fbebf401e6be0c8b78.tar.gz
ingen-d5cc3f720e50583f172425fbebf401e6be0c8b78.tar.bz2
ingen-d5cc3f720e50583f172425fbebf401e6be0c8b78.zip
Show error messages from engine in a pop-up dialog.
Don't attempt to create root patch when loading deprecated (.om) patches. git-svn-id: http://svn.drobilla.net/lad/ingen@1208 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/gui')
-rw-r--r--src/libs/gui/App.cpp17
-rw-r--r--src/libs/gui/App.hpp1
2 files changed, 16 insertions, 2 deletions
diff --git a/src/libs/gui/App.cpp b/src/libs/gui/App.cpp
index 46737d01..8b3013ad 100644
--- a/src/libs/gui/App.cpp
+++ b/src/libs/gui/App.cpp
@@ -186,6 +186,9 @@ App::attach(SharedPtr<EngineInterface> engine, SharedPtr<SigClientInterface> cli
_loader = SharedPtr<ThreadedLoader>(new ThreadedLoader(engine));
_patch_tree_window->init(*_store);
+
+ _client->signal_response_error.connect(sigc::mem_fun(this, &App::error_response));
+ _client->signal_error.connect(sigc::mem_fun(this, &App::error_message));
}
@@ -205,11 +208,21 @@ App::detach()
void
+App::error_response(int32_t id, const string& str)
+{
+ error_message(str);
+}
+
+
+void
App::error_message(const string& str)
{
_messages_window->post(str);
- _messages_window->show();
- _messages_window->raise();
+
+ if (!_messages_window->is_visible())
+ _messages_window->present();
+
+ _messages_window->set_urgency_hint(true);
}
diff --git a/src/libs/gui/App.hpp b/src/libs/gui/App.hpp
index bfe58f53..6bb7083b 100644
--- a/src/libs/gui/App.hpp
+++ b/src/libs/gui/App.hpp
@@ -136,6 +136,7 @@ protected:
App(Ingen::Shared::World* world);
bool animate();
+ void error_response(int32_t id, const string& str);
static void* icon_destroyed(void* data);