JAL-3300 instant Splash screen on getdown
[jalview.git] / getdown / src / getdown / launcher / src / main / java / com / threerings / getdown / launcher / GetdownApp.java
index f632b65..367db7c 100644 (file)
@@ -29,6 +29,7 @@ import javax.swing.WindowConstants;
 
 import com.install4j.api.launcher.StartupNotification;
 import com.samskivert.swing.util.SwingUtil;
+import com.threerings.getdown.data.Application;
 import com.threerings.getdown.data.EnvConfig;
 import com.threerings.getdown.data.SysProps;
 import com.threerings.getdown.util.LaunchUtil;
@@ -93,14 +94,13 @@ public class GetdownApp
 
     try
     {
-      log.info("**** Registering i4j StartupNotification Listener");
       StartupNotification.registerStartupListener(
               new StartupNotification.Listener() {
                 @Override
                 public void startupPerformed(String parameters)
-                {
-                  log.info("**** adding startup parameters '"+parameters+"'");
-                  GetdownApp.setStartupFilesParameterString(parameters);
+                { 
+                  log.warning("StartupNotification.Listener.startupPerformed: '"+parameters+"'");
+                  setStartupFilesParameterString(parameters);
                 }
               });
     } catch (Exception e)
@@ -108,8 +108,6 @@ public class GetdownApp
       e.printStackTrace();
     }
     
-    //Thread.sleep(200);
-
     // record a few things for posterity
     log.info("------------------ VM Info ------------------");
     log.info("-- OS Name: " + System.getProperty("os.name"));
@@ -167,7 +165,7 @@ public class GetdownApp
           log.warning("Failed to set background", "bg", _ifc.background, e);
         }
 
-        if (_ifc.iconImages != null) {
+        if (_ifc.iconImages != null && _ifc.iconImages.size() > 0) {
           ArrayList<Image> icons = new ArrayList<>();
           for (String path : _ifc.iconImages) {
             Image img = loadImage(path);
@@ -269,9 +267,12 @@ public class GetdownApp
 
       protected JFrame _frame;
     };
-    if (getStartupFilesParameterString() != null) {
-      app.setStartupFilesFromParameterString(getStartupFilesParameterString());
+    
+    String startupFile = getStartupFilesParameterString();
+    if (!StringUtil.isBlank(startupFile)) {
+      Application.setStartupFilesFromParameterString(startupFile);
     }
     app.start();
     return app;
   }