Lua Message dialog, push splash screen if needed.
authorRobin Gareus <robin@gareus.org>
Wed, 9 Aug 2017 12:12:54 +0000 (14:12 +0200)
committerRobin Gareus <robin@gareus.org>
Thu, 10 Aug 2017 00:26:01 +0000 (02:26 +0200)
gtk2_ardour/luadialog.cc

index 04040c820162bc9499e17edcf06fdd6de9d01c2d..a6ac48edc141faf5f8ecbd681226b7e38193cb8d 100644 (file)
@@ -28,6 +28,7 @@
 
 #include "ardour_dialog.h"
 #include "luadialog.h"
+#include "splash.h"
 #include "utils.h"
 
 using namespace LuaDialog;
@@ -44,8 +45,24 @@ Message::Message (std::string const& title, std::string const& msg, Message::Mes
 int
 Message::run ()
 {
+
+       bool _splash_pushed;
+       Splash* spl = Splash::instance();
+       if (spl && spl->is_visible()) {
+               spl->pop_back_for (_message_dialog);
+               _splash_pushed = true;
+       }
+
        int rv = _message_dialog.run ();
        _message_dialog.hide ();
+
+       if (_splash_pushed) {
+               spl = Splash::instance();
+               if (spl) {
+                       spl->pop_front();
+               }
+       }
+
        switch (rv) {
                case Gtk::RESPONSE_OK:
                        return 0;