summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2011-04-04 14:22:27 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2011-04-04 14:22:27 +0000
commitaca373cc82fc60353edfbebed03a68e995ce4266 (patch)
tree513963ae7f6bbeb04112927f8911484265542a67
parent071d1185f62ef003c3f3cf7bf29651ddad396147 (diff)
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
-rw-r--r--libs/gtkmm2ext/gtk_ui.cc16
-rw-r--r--libs/gtkmm2ext/gtkmm2ext/gtk_ui.h1
2 files changed, 16 insertions, 1 deletions
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,7 +565,7 @@ 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 ();
}
}
@@ -573,6 +573,20 @@ UI::process_error_message (Transmitter::Channel chn, const char *str)
}
void
+UI::show_errors ()
+{
+ Glib::RefPtr<Action> act = ActionManager::get_action (X_("Editor"), X_("toggle-log-window"));
+ if (!act) {
+ return;
+ }
+
+ Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic (act);
+ if (tact) {
+ tact->set_active ();
+ }
+}
+
+void
UI::toggle_errors ()
{
Glib::RefPtr<Action> act = ActionManager::get_action (X_("Editor"), X_("toggle-log-window"));
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<UIRequest>
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);