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
This commit is contained in:
Carl Hetherington 2010-09-22 00:41:25 +00:00
parent 4d908a12fd
commit 096f146d94
8 changed files with 58 additions and 18 deletions

View file

@ -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 {