summaryrefslogtreecommitdiff
path: root/gtk2_ardour/splash.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2019-10-11 14:29:55 -0600
committerPaul Davis <paul@linuxaudiosystems.com>2019-10-11 14:29:55 -0600
commit54acf6af6a4b571863e1c69be4defad6b222bc32 (patch)
tree22249488f032afe53c6768e8d1dabfa8c16b2c32 /gtk2_ardour/splash.cc
parentda2d6312c43213241e0a60656d631a89255d2951 (diff)
enforce singleton nature of Splash a little more rigorously, and slightly rationalize it's use
Diffstat (limited to 'gtk2_ardour/splash.cc')
-rw-r--r--gtk2_ardour/splash.cc25
1 files changed, 25 insertions, 0 deletions
diff --git a/gtk2_ardour/splash.cc b/gtk2_ardour/splash.cc
index 9d4f78957e..11e88cb1ad 100644
--- a/gtk2_ardour/splash.cc
+++ b/gtk2_ardour/splash.cc
@@ -48,6 +48,28 @@ using namespace ARDOUR;
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);
@@ -208,6 +230,9 @@ Splash::expose (GdkEventExpose* ev)
void
Splash::boot_message (std::string msg)
{
+ if (!is_visible()) {
+ display ();
+ }
message (msg);
}