mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 15:25:01 +01:00
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
This commit is contained in:
parent
ea99ee68d9
commit
b53c92b652
5 changed files with 30 additions and 22 deletions
|
|
@ -78,7 +78,7 @@ ArdourDialog::on_show ()
|
||||||
Splash* spl = Splash::instance();
|
Splash* spl = Splash::instance();
|
||||||
|
|
||||||
if (spl) {
|
if (spl) {
|
||||||
spl->pop_back ();
|
spl->pop_back_for (*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
Dialog::on_show ();
|
Dialog::on_show ();
|
||||||
|
|
|
||||||
|
|
@ -507,11 +507,10 @@ ARDOUR_UI::~ARDOUR_UI ()
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ARDOUR_UI::pop_back_splash ()
|
ARDOUR_UI::pop_back_splash (Gtk::Window& win)
|
||||||
{
|
{
|
||||||
if (Splash::instance()) {
|
if (Splash::instance()) {
|
||||||
// Splash::instance()->pop_back();
|
Splash::instance()->pop_back_for (win);
|
||||||
Splash::instance()->hide ();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -696,7 +695,7 @@ Please consider the possibilities, and perhaps (re)start JACK."));
|
||||||
|
|
||||||
win.show_all ();
|
win.show_all ();
|
||||||
win.set_position (Gtk::WIN_POS_CENTER);
|
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 */
|
/* we just don't care about the result, but we want to block */
|
||||||
|
|
||||||
|
|
@ -800,7 +799,7 @@ ARDOUR_UI::check_memory_locking ()
|
||||||
vbox->show();
|
vbox->show();
|
||||||
hbox.show ();
|
hbox.show ();
|
||||||
|
|
||||||
pop_back_splash ();
|
pop_back_splash (msg);
|
||||||
|
|
||||||
editor->ensure_float (msg);
|
editor->ensure_float (msg);
|
||||||
msg.run ();
|
msg.run ();
|
||||||
|
|
@ -853,7 +852,7 @@ ARDOUR_UI::finish()
|
||||||
Ardour was unable to save your session.\n\n\
|
Ardour was unable to save your session.\n\n\
|
||||||
If you still wish to quit, please use the\n\n\
|
If you still wish to quit, please use the\n\n\
|
||||||
\"Just quit\" option."));
|
\"Just quit\" option."));
|
||||||
pop_back_splash();
|
pop_back_splash(msg);
|
||||||
msg.run ();
|
msg.run ();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -1380,7 +1379,7 @@ ARDOUR_UI::check_audioengine ()
|
||||||
_("%1 is not connected to JACK\n"
|
_("%1 is not connected to JACK\n"
|
||||||
"You cannot open or close sessions in this condition"),
|
"You cannot open or close sessions in this condition"),
|
||||||
PROGRAM_NAME));
|
PROGRAM_NAME));
|
||||||
pop_back_splash ();
|
pop_back_splash (msg);
|
||||||
msg.run ();
|
msg.run ();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
@ -1533,7 +1532,7 @@ ARDOUR_UI::session_add_audio_route (
|
||||||
to create a new track or bus.\n\
|
to create a new track or bus.\n\
|
||||||
You should save %1, exit and\n\
|
You should save %1, exit and\n\
|
||||||
restart JACK with more ports."), PROGRAM_NAME));
|
restart JACK with more ports."), PROGRAM_NAME));
|
||||||
pop_back_splash ();
|
pop_back_splash (msg);
|
||||||
msg.run ();
|
msg.run ();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -2070,7 +2069,7 @@ JACK, reconnect and save the session."), PROGRAM_NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
MessageDialog msg (*editor, msgstr);
|
MessageDialog msg (*editor, msgstr);
|
||||||
pop_back_splash ();
|
pop_back_splash (msg);
|
||||||
msg.run ();
|
msg.run ();
|
||||||
|
|
||||||
if (free_reason) {
|
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_title (_("Open Existing Session"));
|
||||||
msg.set_wmclass (X_("existing_session"), PROGRAM_NAME);
|
msg.set_wmclass (X_("existing_session"), PROGRAM_NAME);
|
||||||
msg.set_position (Gtk::WIN_POS_MOUSE);
|
msg.set_position (Gtk::WIN_POS_MOUSE);
|
||||||
pop_back_splash ();
|
pop_back_splash (msg);
|
||||||
|
|
||||||
switch (msg.run()) {
|
switch (msg.run()) {
|
||||||
case RESPONSE_YES:
|
case RESPONSE_YES:
|
||||||
|
|
@ -2559,10 +2558,10 @@ ARDOUR_UI::end_loading_messages ()
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ARDOUR_UI::loading_message (const std::string& /*msg*/)
|
ARDOUR_UI::loading_message (const std::string& msg)
|
||||||
{
|
{
|
||||||
// show_splash ();
|
show_splash ();
|
||||||
// splash->message (msg);
|
splash->message (msg);
|
||||||
flush_pending ();
|
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_title (_("Port Registration Error"));
|
||||||
msg.set_secondary_text (_("Click the Close button to try again."));
|
msg.set_secondary_text (_("Click the Close button to try again."));
|
||||||
msg.set_position (Gtk::WIN_POS_CENTER);
|
msg.set_position (Gtk::WIN_POS_CENTER);
|
||||||
pop_back_splash ();
|
pop_back_splash (msg);
|
||||||
msg.present ();
|
msg.present ();
|
||||||
|
|
||||||
int response = msg.run ();
|
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.set_secondary_text (_("Click the Refresh button to try again."));
|
||||||
msg.add_button (Stock::REFRESH, 1);
|
msg.add_button (Stock::REFRESH, 1);
|
||||||
msg.set_position (Gtk::WIN_POS_CENTER);
|
msg.set_position (Gtk::WIN_POS_CENTER);
|
||||||
pop_back_splash ();
|
pop_back_splash (msg);
|
||||||
msg.present ();
|
msg.present ();
|
||||||
|
|
||||||
int response = msg.run ();
|
int response = msg.run ();
|
||||||
|
|
@ -2908,7 +2907,7 @@ ARDOUR_UI::build_session (const std::string& path, const std::string& snap_name,
|
||||||
catch (...) {
|
catch (...) {
|
||||||
|
|
||||||
MessageDialog msg (string_compose(_("Could not create session in \"%1\""), path));
|
MessageDialog msg (string_compose(_("Could not create session in \"%1\""), path));
|
||||||
pop_back_splash ();
|
pop_back_splash (msg);
|
||||||
msg.run ();
|
msg.run ();
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
@ -3001,8 +3000,8 @@ ARDOUR_UI::show_splash ()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
splash->show ();
|
|
||||||
splash->present ();
|
splash->present ();
|
||||||
|
splash->pop_front ();
|
||||||
splash->queue_draw ();
|
splash->queue_draw ();
|
||||||
splash->get_window()->process_updates (true);
|
splash->get_window()->process_updates (true);
|
||||||
flush_pending ();
|
flush_pending ();
|
||||||
|
|
|
||||||
|
|
@ -630,7 +630,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
|
||||||
|
|
||||||
About* about;
|
About* about;
|
||||||
Splash* splash;
|
Splash* splash;
|
||||||
void pop_back_splash ();
|
void pop_back_splash (Gtk::Window&);
|
||||||
|
|
||||||
/* cleanup */
|
/* cleanup */
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ Splash::Splash ()
|
||||||
}
|
}
|
||||||
|
|
||||||
darea.set_size_request (pixbuf->get_width(), pixbuf->get_height());
|
darea.set_size_request (pixbuf->get_width(), pixbuf->get_height());
|
||||||
set_keep_above (true);
|
pop_front ();
|
||||||
set_position (WIN_POS_CENTER);
|
set_position (WIN_POS_CENTER);
|
||||||
darea.add_events (Gdk::BUTTON_PRESS_MASK|Gdk::BUTTON_RELEASE_MASK);
|
darea.add_events (Gdk::BUTTON_PRESS_MASK|Gdk::BUTTON_RELEASE_MASK);
|
||||||
darea.set_double_buffered (false);
|
darea.set_double_buffered (false);
|
||||||
|
|
@ -60,9 +60,17 @@ Splash::Splash ()
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Splash::pop_back ()
|
Splash::pop_back_for (Gtk::Window& win)
|
||||||
{
|
{
|
||||||
set_keep_above (false);
|
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
|
void
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,8 @@ class Splash : public Gtk::Window
|
||||||
|
|
||||||
static Splash* instance() { return the_splash; }
|
static Splash* instance() { return the_splash; }
|
||||||
|
|
||||||
void pop_back ();
|
void pop_back_for (Gtk::Window&);
|
||||||
|
void pop_front ();
|
||||||
|
|
||||||
bool expose (GdkEventExpose*);
|
bool expose (GdkEventExpose*);
|
||||||
bool on_button_release_event (GdkEventButton*);
|
bool on_button_release_event (GdkEventButton*);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue