diff options
author | Carl Hetherington <carl@carlh.net> | 2010-09-22 00:41:25 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2010-09-22 00:41:25 +0000 |
commit | 096f146d94b20d8b68a838d2f5151765523869b4 (patch) | |
tree | e860eebf2980cf207844d9645f5171ea69aa0b5f /libs/gtkmm2ext/gtk_ui.cc | |
parent | 4d908a12fd812e5ae14ea56d6fe626e365d15f63 (diff) |
Tidy up Window menu a bit; use ToggleActions for all relevant things, cleanup editor/mixer options a bit.
git-svn-id: svn://localhost/ardour2/branches/3.0@7828 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/gtkmm2ext/gtk_ui.cc')
-rw-r--r-- | libs/gtkmm2ext/gtk_ui.cc | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/libs/gtkmm2ext/gtk_ui.cc b/libs/gtkmm2ext/gtk_ui.cc index d1ef1e27c4..1b697f4e4a 100644 --- a/libs/gtkmm2ext/gtk_ui.cc +++ b/libs/gtkmm2ext/gtk_ui.cc @@ -96,6 +96,7 @@ UI::UI (string namestr, int *argc, char ***argv) errors = new TextViewer (800,600); errors->text().set_editable (false); errors->text().set_name ("ErrorText"); + errors->signal_unmap().connect (sigc::bind (sigc::ptr_fun (&ActionManager::uncheck_toggleaction), X_("<Actions>/Editor/toggle-log-window"))); Glib::set_application_name(namestr); @@ -571,7 +572,14 @@ UI::process_error_message (Transmitter::Channel chn, const char *str) void UI::toggle_errors () { - if (!errors->is_visible()) { + 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->get_active()) { errors->set_position (WIN_POS_MOUSE); errors->show (); } else { |