summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2012-01-10 18:21:39 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2012-01-10 18:21:39 +0000
commitb53c92b652563f682ec414f46c8aca724ce630cd (patch)
tree2c677a73af3d4b725bff241400d712878bae2b39
parentea99ee68d9eecf53a687faefe3dbc79b6c6bea0e (diff)
the return of the splash, with a few changes to help with window layering a little
git-svn-id: svn://localhost/ardour2/branches/3.0@11222 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r--gtk2_ardour/ardour_dialog.cc2
-rw-r--r--gtk2_ardour/ardour_ui.cc33
-rw-r--r--gtk2_ardour/ardour_ui.h2
-rw-r--r--gtk2_ardour/splash.cc12
-rw-r--r--gtk2_ardour/splash.h3
5 files changed, 30 insertions, 22 deletions
diff --git a/gtk2_ardour/ardour_dialog.cc b/gtk2_ardour/ardour_dialog.cc
index b8c755de10..c0e1708781 100644
--- a/gtk2_ardour/ardour_dialog.cc
+++ b/gtk2_ardour/ardour_dialog.cc
@@ -78,7 +78,7 @@ ArdourDialog::on_show ()
Splash* spl = Splash::instance();
if (spl) {
- spl->pop_back ();
+ spl->pop_back_for (*this);
}
Dialog::on_show ();
diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc
index 5e7b75b90e..b7a2b0776e 100644
--- a/gtk2_ardour/ardour_ui.cc
+++ b/gtk2_ardour/ardour_ui.cc
@@ -507,11 +507,10 @@ ARDOUR_UI::~ARDOUR_UI ()
}
void
-ARDOUR_UI::pop_back_splash ()
+ARDOUR_UI::pop_back_splash (Gtk::Window& win)
{
if (Splash::instance()) {
- // Splash::instance()->pop_back();
- Splash::instance()->hide ();
+ Splash::instance()->pop_back_for (win);
}
}
@@ -696,7 +695,7 @@ Please consider the possibilities, and perhaps (re)start JACK."));
win.show_all ();
win.set_position (Gtk::WIN_POS_CENTER);
- pop_back_splash ();
+ pop_back_splash (win);
/* we just don't care about the result, but we want to block */
@@ -800,7 +799,7 @@ ARDOUR_UI::check_memory_locking ()
vbox->show();
hbox.show ();
- pop_back_splash ();
+ pop_back_splash (msg);
editor->ensure_float (msg);
msg.run ();
@@ -853,7 +852,7 @@ ARDOUR_UI::finish()
Ardour was unable to save your session.\n\n\
If you still wish to quit, please use the\n\n\
\"Just quit\" option."));
- pop_back_splash();
+ pop_back_splash(msg);
msg.run ();
return;
}
@@ -1380,7 +1379,7 @@ ARDOUR_UI::check_audioengine ()
_("%1 is not connected to JACK\n"
"You cannot open or close sessions in this condition"),
PROGRAM_NAME));
- pop_back_splash ();
+ pop_back_splash (msg);
msg.run ();
return false;
}
@@ -1533,7 +1532,7 @@ ARDOUR_UI::session_add_audio_route (
to create a new track or bus.\n\
You should save %1, exit and\n\
restart JACK with more ports."), PROGRAM_NAME));
- pop_back_splash ();
+ pop_back_splash (msg);
msg.run ();
}
}
@@ -2070,7 +2069,7 @@ JACK, reconnect and save the session."), PROGRAM_NAME);
}
MessageDialog msg (*editor, msgstr);
- pop_back_splash ();
+ pop_back_splash (msg);
msg.run ();
if (free_reason) {
@@ -2457,7 +2456,7 @@ ARDOUR_UI::ask_about_loading_existing_session (const std::string& session_path)
msg.set_title (_("Open Existing Session"));
msg.set_wmclass (X_("existing_session"), PROGRAM_NAME);
msg.set_position (Gtk::WIN_POS_MOUSE);
- pop_back_splash ();
+ pop_back_splash (msg);
switch (msg.run()) {
case RESPONSE_YES:
@@ -2559,10 +2558,10 @@ ARDOUR_UI::end_loading_messages ()
}
void
-ARDOUR_UI::loading_message (const std::string& /*msg*/)
+ARDOUR_UI::loading_message (const std::string& msg)
{
- // show_splash ();
- // splash->message (msg);
+ show_splash ();
+ splash->message (msg);
flush_pending ();
}
@@ -2799,7 +2798,7 @@ ARDOUR_UI::load_session (const std::string& path, const std::string& snap_name,
msg.set_title (_("Port Registration Error"));
msg.set_secondary_text (_("Click the Close button to try again."));
msg.set_position (Gtk::WIN_POS_CENTER);
- pop_back_splash ();
+ pop_back_splash (msg);
msg.present ();
int response = msg.run ();
@@ -2828,7 +2827,7 @@ ARDOUR_UI::load_session (const std::string& path, const std::string& snap_name,
msg.set_secondary_text (_("Click the Refresh button to try again."));
msg.add_button (Stock::REFRESH, 1);
msg.set_position (Gtk::WIN_POS_CENTER);
- pop_back_splash ();
+ pop_back_splash (msg);
msg.present ();
int response = msg.run ();
@@ -2908,7 +2907,7 @@ ARDOUR_UI::build_session (const std::string& path, const std::string& snap_name,
catch (...) {
MessageDialog msg (string_compose(_("Could not create session in \"%1\""), path));
- pop_back_splash ();
+ pop_back_splash (msg);
msg.run ();
return -1;
}
@@ -3001,8 +3000,8 @@ ARDOUR_UI::show_splash ()
}
}
- splash->show ();
splash->present ();
+ splash->pop_front ();
splash->queue_draw ();
splash->get_window()->process_updates (true);
flush_pending ();
diff --git a/gtk2_ardour/ardour_ui.h b/gtk2_ardour/ardour_ui.h
index 74eafbb064..9f0af76285 100644
--- a/gtk2_ardour/ardour_ui.h
+++ b/gtk2_ardour/ardour_ui.h
@@ -630,7 +630,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
About* about;
Splash* splash;
- void pop_back_splash ();
+ void pop_back_splash (Gtk::Window&);
/* cleanup */
diff --git a/gtk2_ardour/splash.cc b/gtk2_ardour/splash.cc
index 01f0db9f9f..d459a308b1 100644
--- a/gtk2_ardour/splash.cc
+++ b/gtk2_ardour/splash.cc
@@ -35,7 +35,7 @@ Splash::Splash ()
}
darea.set_size_request (pixbuf->get_width(), pixbuf->get_height());
- set_keep_above (true);
+ pop_front ();
set_position (WIN_POS_CENTER);
darea.add_events (Gdk::BUTTON_PRESS_MASK|Gdk::BUTTON_RELEASE_MASK);
darea.set_double_buffered (false);
@@ -60,9 +60,17 @@ Splash::Splash ()
}
void
-Splash::pop_back ()
+Splash::pop_back_for (Gtk::Window& win)
{
set_keep_above (false);
+ get_window()->restack (win.get_window(), false);
+ win.signal_hide().connect (sigc::mem_fun (*this, &Splash::pop_front));
+}
+
+void
+Splash::pop_front ()
+{
+ set_keep_above (true);
}
void
diff --git a/gtk2_ardour/splash.h b/gtk2_ardour/splash.h
index 56e159ebde..d6b103609a 100644
--- a/gtk2_ardour/splash.h
+++ b/gtk2_ardour/splash.h
@@ -38,7 +38,8 @@ class Splash : public Gtk::Window
static Splash* instance() { return the_splash; }
- void pop_back ();
+ void pop_back_for (Gtk::Window&);
+ void pop_front ();
bool expose (GdkEventExpose*);
bool on_button_release_event (GdkEventButton*);