summaryrefslogtreecommitdiff
path: root/gtk2_ardour
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2011-12-07 15:48:24 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2011-12-07 15:48:24 +0000
commit186283a3c484a71ad61d4e0db13efea6f1d9280c (patch)
treebde91861daead65ed5c0bc3204223e9d1a955dfb /gtk2_ardour
parent81b5814098882f6f3830a3f38b3a59d86c708aee (diff)
fix, or at least improve, management of the editor toolbar when maximising editing space
git-svn-id: svn://localhost/ardour2/branches/3.0@10936 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour')
-rw-r--r--gtk2_ardour/ardour_ui_options.cc1
-rw-r--r--gtk2_ardour/editor.cc7
2 files changed, 7 insertions, 1 deletions
diff --git a/gtk2_ardour/ardour_ui_options.cc b/gtk2_ardour/ardour_ui_options.cc
index 7fab6e5691..27750eeb43 100644
--- a/gtk2_ardour/ardour_ui_options.cc
+++ b/gtk2_ardour/ardour_ui_options.cc
@@ -279,6 +279,7 @@ void
ARDOUR_UI::toggle_editing_space()
{
Glib::RefPtr<Action> act = ActionManager::get_action ("Common", "ToggleMaximalEditor");
+
if (act) {
Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
if (tact->get_active()) {
diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc
index 31d5b495fe..e98a63b6a0 100644
--- a/gtk2_ardour/editor.cc
+++ b/gtk2_ardour/editor.cc
@@ -3558,7 +3558,9 @@ Editor::pane_allocation_handler (Allocation &alloc, Paned* which)
void
Editor::detach_tearoff (Box* /*b*/, Window* /*w*/)
{
- if (_tools_tearoff->torn_off() && _mouse_mode_tearoff->torn_off()) {
+ if ((_tools_tearoff->torn_off() || !_tools_tearoff->visible()) &&
+ (_mouse_mode_tearoff->torn_off() || !_mouse_mode_tearoff->visible()) &&
+ (_zoom_tearoff->torn_off() || !_zoom_tearoff->visible())) {
top_hbox.remove (toolbar_frame);
}
}
@@ -3897,6 +3899,9 @@ Editor::session_state_saved (string)
void
Editor::maximise_editing_space ()
{
+ /* these calls will leave each tearoff visible *if* it is torn off
+ */
+
_mouse_mode_tearoff->set_visible (false);
_tools_tearoff->set_visible (false);
_zoom_tearoff->set_visible (false);