, midi_port_matrix (X_("midi-connection-manager"), _("MIDI Connections"), boost::bind (&ARDOUR_UI::create_global_port_matrix, this, ARDOUR::DataType::MIDI))
, key_editor (X_("key-editor"), _("Keyboard Shortcuts"), boost::bind (&ARDOUR_UI::create_key_editor, this))
, video_server_process (0)
- , splash (0)
, have_configure_timeout (false)
, last_configure_time (0)
, last_peak_grab (0)
bool run_startup (bool should_be_new, std::string load_template);
- void show_splash ();
void hide_splash ();
+ static void pop_back_splash (Gtk::Window&);
void launch_chat ();
void launch_manual ();
uint32_t rec_enabled_streams;
void count_recenabled_streams (ARDOUR::Route&);
- Splash* splash;
-
- void pop_back_splash (Gtk::Window&);
-
/* cleanup */
Gtk::MenuItem *cleanup_item;
Gtk::Label status_bar_label;
bool status_bar_button_press (GdkEventButton*);
- void loading_message (const std::string& msg);
-
PBD::ScopedConnectionList forever_connections;
PBD::ScopedConnection halt_connection;
PBD::ScopedConnection editor_meter_connection;
}
}
- loading_message (string_compose (_("Please wait while %1 loads your session"), PROGRAM_NAME));
+ BootMessage (string_compose (_("Please wait while %1 loads your session"), PROGRAM_NAME));
try {
new_session = new Session (*AudioEngine::instance(), path, snap_name, 0, mix_template);
return node;
}
-
-void
-ARDOUR_UI::loading_message (const std::string& msg)
-{
- if (ARDOUR_COMMAND_LINE::no_splash) {
- return;
- }
-
- if (!splash) {
- show_splash ();
- }
-
- splash->message (msg);
-}
-
-void
-ARDOUR_UI::show_splash ()
-{
- if (splash == 0) {
- try {
- splash = new Splash;
- } catch (...) {
- return;
- }
- }
-
- splash->display ();
-}
-
void
ARDOUR_UI::hide_splash ()
{
- delete splash;
- splash = 0;
+ Splash::drop ();
}
void
Splash* Splash::the_splash = 0;
+Splash*
+Splash::instance()
+{
+ if (!the_splash) {
+ the_splash = new Splash;
+ }
+ return the_splash;
+}
+
+bool
+Splash::exists ()
+{
+ return the_splash;
+}
+
+void
+Splash::drop ()
+{
+ delete the_splash;
+ the_splash = 0;
+}
+
Splash::Splash ()
{
assert (the_splash == 0);
void
Splash::boot_message (std::string msg)
{
+ if (!is_visible()) {
+ display ();
+ }
message (msg);
}
class Splash : public Gtk::Window
{
public:
- Splash ();
~Splash ();
- static Splash* instance() { return the_splash; }
+ static Splash* instance();
+ static void drop();
+ static bool exists ();
void display ();
void pop_back_for (Gtk::Window&);
void hide ();
private:
+ Splash ();
static Splash* the_splash;
Glib::RefPtr<Gdk::Pixbuf> pixbuf;
#include "gtkmm2ext/application.h"
#include <gtkmm2ext/doi.h>
+#include "ardour_ui.h"
#include "engine_dialog.h"
#include "new_user_wizard.h"
#include "opts.h"
/* does not exist at present */
if (!requested_new) {
- // pop_back_splash (session_dialog);
+ ARDOUR_UI::pop_back_splash (*session_dialog);
MessageDialog msg (string_compose (_("There is no existing session at \"%1\""), session_path));
msg.run ();
session_dialog->clear_name();
msg.set_title (_("Open Existing Session"));
msg.set_wmclass (X_("existing_session"), PROGRAM_NAME);
msg.set_position (Gtk::WIN_POS_CENTER);
- // pop_back_splash (msg);
+ ARDOUR_UI::pop_back_splash (msg);
switch (msg.run()) {
case RESPONSE_YES:
pre_release_dialog->set_position (WIN_POS_CENTER);
pre_release_dialog->present ();
}
+