diff options
author | David Robillard <d@drobilla.net> | 2016-08-01 03:43:23 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2016-08-01 03:44:00 -0400 |
commit | 902703efa9425a0630053c10229de911e23a2a43 (patch) | |
tree | 078b44cf205f8f7a3265142ff95b36f08f56fa05 /src/gui/App.cpp | |
parent | ff6d8a87f9569a42c7827428f2329280c9b633b9 (diff) | |
download | ingen-902703efa9425a0630053c10229de911e23a2a43.tar.gz ingen-902703efa9425a0630053c10229de911e23a2a43.tar.bz2 ingen-902703efa9425a0630053c10229de911e23a2a43.zip |
Show colorized log output in messages window
Diffstat (limited to 'src/gui/App.cpp')
-rw-r--r-- | src/gui/App.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/gui/App.cpp b/src/gui/App.cpp index 2624d1e9..fad2f195 100644 --- a/src/gui/App.cpp +++ b/src/gui/App.cpp @@ -1,6 +1,6 @@ /* This file is part of Ingen. - Copyright 2007-2015 David Robillard <http://drobilla.net/> + Copyright 2007-2016 David Robillard <http://drobilla.net/> Ingen is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free @@ -91,6 +91,9 @@ App::App(Ingen::World* world) PluginModel::set_rdf_world(*world->rdf_world()); PluginModel::set_lilv_world(world->lilv_world()); + + using namespace std::placeholders; + world->log().set_sink(std::bind(&MessagesWindow::log, _messages_window, _1, _2, _3)); } App::~App() @@ -214,12 +217,7 @@ App::response(int32_t id, Status status, const std::string& subject) void App::error_message(const string& str) { - _messages_window->post(str); - - if (!_messages_window->is_visible()) - _messages_window->present(); - - _messages_window->set_urgency_hint(true); + _messages_window->post_error(str); } void @@ -321,6 +319,10 @@ App::gtk_main_iteration() if (!_client) return false; + if (_messages_window) { + _messages_window->flush(); + } + if (_world->engine()) { if (!_world->engine()->main_iteration()) { Gtk::Main::quit(); |