aboutsummaryrefslogtreecommitdiffstats
path: root/src/net/java/sip/communicator/impl/splashscreen
diff options
context:
space:
mode:
authorIngo Bauersachs <ingo@jitsi.org>2014-02-09 12:46:04 +0100
committerIngo Bauersachs <ingo@jitsi.org>2014-02-09 12:46:04 +0100
commita15bf4472afe1086fbc783d95c9bb9baca30de39 (patch)
treefafdaa260f608ca8f99cf3e998f84114fe6e0c60 /src/net/java/sip/communicator/impl/splashscreen
parent68bd82842706b3619f44eac5211ed1713b891dd7 (diff)
downloadjitsi-a15bf4472afe1086fbc783d95c9bb9baca30de39.zip
jitsi-a15bf4472afe1086fbc783d95c9bb9baca30de39.tar.gz
jitsi-a15bf4472afe1086fbc783d95c9bb9baca30de39.tar.bz2
Hide splash screen when main window is iconified on startup
Diffstat (limited to 'src/net/java/sip/communicator/impl/splashscreen')
-rw-r--r--src/net/java/sip/communicator/impl/splashscreen/SplashScreenActivator.java15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/net/java/sip/communicator/impl/splashscreen/SplashScreenActivator.java b/src/net/java/sip/communicator/impl/splashscreen/SplashScreenActivator.java
index afab631..409b007 100644
--- a/src/net/java/sip/communicator/impl/splashscreen/SplashScreenActivator.java
+++ b/src/net/java/sip/communicator/impl/splashscreen/SplashScreenActivator.java
@@ -112,6 +112,21 @@ public class SplashScreenActivator
if(bundleName == null)
return;
+ // If the main frame was set visible, the splash screen was/will
+ // be closed by Java automatically. Otherwise we need to do that
+ // manually.
+ Object service =
+ bundleContext
+ .getService(serviceEvent.getServiceReference());
+ if (service.getClass().getSimpleName().equals("UIServiceImpl"))
+ {
+ splash.close();
+ stop(bundleContext);
+ return;
+ }
+
+ bundleContext.ungetService(serviceEvent.getServiceReference());
+
progress++;
int progressWidth = 233;