From aca373cc82fc60353edfbebed03a68e995ce4266 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Mon, 4 Apr 2011 14:22:27 +0000 Subject: [PATCH] always make log/error window visible when a non-info message is posted git-svn-id: svn://localhost/ardour2/branches/3.0@9279 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/gtkmm2ext/gtk_ui.cc | 16 +++++++++++++++- libs/gtkmm2ext/gtkmm2ext/gtk_ui.h | 1 + 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/libs/gtkmm2ext/gtk_ui.cc b/libs/gtkmm2ext/gtk_ui.cc index a12bef593b..bebe6c09a9 100644 --- a/libs/gtkmm2ext/gtk_ui.cc +++ b/libs/gtkmm2ext/gtk_ui.cc @@ -565,13 +565,27 @@ UI::process_error_message (Transmitter::Channel chn, const char *str) display_message (prefix, prefix_len, ptag, mtag, str); if (!errors->is_visible() && chn != Transmitter::Info) { - toggle_errors(); + show_errors (); } } errors->text().get_buffer()->end_user_action(); } +void +UI::show_errors () +{ + Glib::RefPtr act = ActionManager::get_action (X_("Editor"), X_("toggle-log-window")); + if (!act) { + return; + } + + Glib::RefPtr tact = Glib::RefPtr::cast_dynamic (act); + if (tact) { + tact->set_active (); + } +} + void UI::toggle_errors () { diff --git a/libs/gtkmm2ext/gtkmm2ext/gtk_ui.h b/libs/gtkmm2ext/gtkmm2ext/gtk_ui.h index 49dd78a6d4..bba3fb6fdf 100644 --- a/libs/gtkmm2ext/gtkmm2ext/gtk_ui.h +++ b/libs/gtkmm2ext/gtkmm2ext/gtk_ui.h @@ -117,6 +117,7 @@ class UI : public Receiver, public AbstractUI void popup_error (const std::string& text); void flush_pending (); void toggle_errors (); + void show_errors (); void touch_display (Touchable *); void set_tip (Gtk::Widget &w, const gchar *tip); void set_tip (Gtk::Widget &w, const std::string &tip);