refuse to show the editor mixer is the screen is < 700 pixels high (makes the editor...
authorPaul Davis <paul@linuxaudiosystems.com>
Sun, 2 Dec 2012 01:44:09 +0000 (01:44 +0000)
committerPaul Davis <paul@linuxaudiosystems.com>
Sun, 2 Dec 2012 01:44:09 +0000 (01:44 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@13586 d708f5d6-7413-0410-9779-e7cbd77b26cf

gtk2_ardour/editor_mixer.cc

index 12b5ff3f305b7c2a1e02d2fb9993e2d7a635c5f9..27ba1e5e21fe04be200bf54b36c6d544dcb56f3a 100644 (file)
@@ -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;