← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 790: Small usability improvement to dhis2-live. Now once the web app has loaded

 

------------------------------------------------------------
revno: 790
committer: Bob Jolliffe <bobj@bobj-laptop>
branch nick: trunk
timestamp: Mon 2009-09-28 16:54:18 +0100
message:
  Small usability improvement to dhis2-live.  Now once the web app has loaded 
  it will attempt to open the login page with your Desktop's default browser.  
modified:
  dhis-live/src/main/java/org/hisp/dhis/TrayApp.java


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription.
=== modified file 'dhis-live/src/main/java/org/hisp/dhis/TrayApp.java'
--- dhis-live/src/main/java/org/hisp/dhis/TrayApp.java	2009-09-14 16:00:37 +0000
+++ dhis-live/src/main/java/org/hisp/dhis/TrayApp.java	2009-09-28 15:54:18 +0000
@@ -29,6 +29,7 @@
 
 import java.awt.*;
 import java.awt.event.*;
+import java.net.URI;
 import java.net.URL;
 import javax.swing.*;
 
@@ -46,7 +47,7 @@
   private static final Log log = LogFactory.getLog( TrayApp.class );
   private static final String CONFIG_DIR = "/conf";
   private static final String STOPPED_ICON = "/icons/stopped.png";
-  private static final String STARTING_ICON = "/icons/starting.png";
+  private static final String STARTING_ICON = "/icons/starting.gif";
   private static final String FAILED_ICON ="/icons/failed.png";
   private static final String RUNNING_ICON = "/icons/running.png";
   
@@ -171,6 +172,11 @@
     trayIcon.displayMessage("Started","DHIS2 is running. Point your\nbrowser to " + url + ".",TrayIcon.MessageType.INFO);
     trayIcon.setToolTip("DHIS 2 Server running");
     trayIcon.setImage(createImage(RUNNING_ICON, "Running icon"));
+    try {
+    	Desktop.getDesktop().browse(URI.create(url));
+    } catch (Exception ex) {
+    	log.info("Couldn't open default desktop browse");
+    }
   }
 
   /**