summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_mixer.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2012-12-02 01:44:09 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2012-12-02 01:44:09 +0000
commit9e18a5d70a5c09bd2a3c4d6706af35bbf7cb3568 (patch)
treef25ffc3cc3e380499054d992e40aa9c308e71469 /gtk2_ardour/editor_mixer.cc
parent8ecabd0d37c7a70c83211e304282f3b39a054b35 (diff)
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
Diffstat (limited to 'gtk2_ardour/editor_mixer.cc')
-rw-r--r--gtk2_ardour/editor_mixer.cc18
1 files changed, 18 insertions, 0 deletions
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 <glibmm/miscutils.h>
+#include <gtkmm/messagedialog.h>
#include <gtkmm2ext/utils.h>
#include <gtkmm2ext/window_title.h>
@@ -75,6 +76,23 @@ Editor::show_editor_mixer (bool yn)
show_editor_mixer_when_tracks_arrive = false;
+ if (yn) {
+ Glib::RefPtr<Gdk::Window> win = get_window ();
+ Glib::RefPtr<Gdk::Screen> 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;