summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2012-06-12 04:20:13 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2012-06-12 04:20:13 +0000
commitb0fdefb7af31ff6f81e0b89891c748b42c78df3d (patch)
treeb76b9e765e286f7a498760e60399890e99faf5c4 /gtk2_ardour/editor.cc
parent557f56a7f2173fdf9b01dfb3f3410f227d05f8e2 (diff)
maximise-editor patch from Rodrigo:
* makes "View >> Toolbar When Maximized" act immediately, i.e., even when already maximized changing this toggle changes whenever toolbar is shown or not; * renames "Toolbar When Maximized" to "Show Toolbar" as it acts whenever editor has maximized space or not. git-svn-id: svn://localhost/ardour2/branches/3.0@12668 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/editor.cc')
-rw-r--r--gtk2_ardour/editor.cc29
1 files changed, 12 insertions, 17 deletions
diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc
index e17c8046c4..e096968b87 100644
--- a/gtk2_ardour/editor.cc
+++ b/gtk2_ardour/editor.cc
@@ -3929,40 +3929,35 @@ Editor::session_state_saved (string)
}
void
-Editor::maximise_editing_space ()
+Editor::maximise_editing_space (bool force)
{
- if (_maximised) {
+ if (_maximised && !force) {
return;
}
fullscreen ();
- if (!Config->get_keep_tearoffs()) {
- /* these calls will leave each tearoff visible *if* it is torn off,
- but invisible otherwise.
- */
- _mouse_mode_tearoff->set_visible (false);
- _tools_tearoff->set_visible (false);
- _zoom_tearoff->set_visible (false);
- }
+ bool visible = Config->get_keep_tearoffs();
+ _mouse_mode_tearoff->set_visible (visible);
+ _tools_tearoff->set_visible (visible);
+ _zoom_tearoff->set_visible (visible);
_maximised = true;
}
void
-Editor::restore_editing_space ()
+Editor::restore_editing_space (bool force)
{
- if (!_maximised) {
+ if (!_maximised && !force) {
return;
}
unfullscreen();
- if (!Config->get_keep_tearoffs()) {
- _mouse_mode_tearoff->set_visible (true);
- _tools_tearoff->set_visible (true);
- _zoom_tearoff->set_visible (true);
- }
+ bool visible = Config->get_keep_tearoffs();
+ _mouse_mode_tearoff->set_visible (visible);
+ _tools_tearoff->set_visible (visible);
+ _zoom_tearoff->set_visible (visible);
_maximised = false;
}