diff options
Diffstat (limited to 'libs/gtkmm2ext')
-rw-r--r-- | libs/gtkmm2ext/gtk_ui.cc | 16 | ||||
-rw-r--r-- | libs/gtkmm2ext/gtkmm2ext/gtk_ui.h | 1 |
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); |