From cb55bd1a52158a7ee8784ad58582252b7ab0b06c Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Tue, 11 Dec 2012 01:17:23 +0000 Subject: do not show the mixer window if the (current) screen height is < 700 pixels (since this results in a very, very irritating situation) git-svn-id: svn://localhost/ardour2/branches/3.0@13635 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/ardour_ui_dependents.cc | 19 +++++++++++++++++++ gtk2_ardour/editor_mixer.cc | 2 +- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/gtk2_ardour/ardour_ui_dependents.cc b/gtk2_ardour/ardour_ui_dependents.cc index 99b27d75d6..b9b0cdb6a2 100644 --- a/gtk2_ardour/ardour_ui_dependents.cc +++ b/gtk2_ardour/ardour_ui_dependents.cc @@ -108,6 +108,25 @@ ARDOUR_UI::goto_editor_window () void ARDOUR_UI::goto_mixer_window () { + if (!editor) { + return; + } + + Glib::RefPtr win = editor->get_window (); + Glib::RefPtr screen; + + if (win) { + screen = win->get_screen(); + } else { + screen = Gdk::Screen::get_default(); + } + + if (screen && screen->get_height() < 700) { + Gtk::MessageDialog msg (_("This screen is not tall enough to display the mixer window")); + msg.run (); + return; + } + mixer->show_window (); mixer->present (); flush_pending (); diff --git a/gtk2_ardour/editor_mixer.cc b/gtk2_ardour/editor_mixer.cc index b7eb05affc..f63e396ba7 100644 --- a/gtk2_ardour/editor_mixer.cc +++ b/gtk2_ardour/editor_mixer.cc @@ -80,7 +80,7 @@ Editor::show_editor_mixer (bool yn) Glib::RefPtr win = get_window (); Glib::RefPtr screen; - if (get_window()) { + if (win) { screen = win->get_screen(); } else { screen = Gdk::Screen::get_default(); -- cgit v1.2.3