diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2012-07-09 21:54:21 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2012-07-09 21:54:21 +0000 |
commit | 3dcbdc0fe624f92121e9931365be75921f301b8c (patch) | |
tree | 895645a2fbc7050c44e6932af72bd631995c4d77 /gtk2_ardour/splash.cc | |
parent | c300fa98affc58a97fec1c7a0797c2c6e37d03cb (diff) |
cleaner version of splash display changes
git-svn-id: svn://localhost/ardour2/branches/3.0@13004 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/splash.cc')
-rw-r--r-- | gtk2_ardour/splash.cc | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/gtk2_ardour/splash.cc b/gtk2_ardour/splash.cc index 5643adbd6a..cd09be0574 100644 --- a/gtk2_ardour/splash.cc +++ b/gtk2_ardour/splash.cc @@ -85,6 +85,40 @@ Splash::~Splash () the_splash = 0; } +bool +Splash::wakeup_from_splash_sleep () +{ + splash_done_visible = true; + return false; +} + +bool +Splash::splash_mapped (GdkEventAny*) +{ + Glib::signal_idle().connect (sigc::mem_fun (this, &Splash::wakeup_from_splash_sleep)); + return false; +} + +void +Splash::display () +{ + bool was_mapped = is_mapped (); + + if (!was_mapped) { + signal_map_event().connect (sigc::mem_fun (this, &Splash::splash_mapped), false); + splash_done_visible = false; + } + + pop_front (); + present (); + + if (!was_mapped) { + while (!splash_done_visible) { + gtk_main_iteration (); + } + } +} + void Splash::pop_back_for (Gtk::Window& win) { |