From 9e18a5d70a5c09bd2a3c4d6706af35bbf7cb3568 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Sun, 2 Dec 2012 01:44:09 +0000 Subject: refuse to show the editor mixer is the screen is < 700 pixels high (makes the editor very hard to use) git-svn-id: svn://localhost/ardour2/branches/3.0@13586 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/editor_mixer.cc | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'gtk2_ardour/editor_mixer.cc') diff --git a/gtk2_ardour/editor_mixer.cc b/gtk2_ardour/editor_mixer.cc index 12b5ff3f30..27ba1e5e21 100644 --- a/gtk2_ardour/editor_mixer.cc +++ b/gtk2_ardour/editor_mixer.cc @@ -22,6 +22,7 @@ #endif #include +#include #include #include @@ -75,6 +76,23 @@ Editor::show_editor_mixer (bool yn) show_editor_mixer_when_tracks_arrive = false; + if (yn) { + Glib::RefPtr win = get_window (); + Glib::RefPtr screen; + + if (get_window()) { + 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 editor mixer"); + msg.run (); + return; + } + } + if (!_session) { show_editor_mixer_when_tracks_arrive = yn; return; -- cgit v1.2.3