From 13f70ad42cd397b27083e3aa542ea565e7a9451b Mon Sep 17 00:00:00 2001
From: hypercubus <hypercubus>
Date: Mon, 30 Aug 2004 11:47:28 +0000
Subject: [PATCH] systray now launches router console in config.jsp upon first
 launch after installation

---
 .../java/src/net/i2p/apps/systray/SysTray.java       | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/apps/systray/java/src/net/i2p/apps/systray/SysTray.java b/apps/systray/java/src/net/i2p/apps/systray/SysTray.java
index b040db1417..00bb23bba6 100644
--- a/apps/systray/java/src/net/i2p/apps/systray/SysTray.java
+++ b/apps/systray/java/src/net/i2p/apps/systray/SysTray.java
@@ -39,7 +39,7 @@ public class SysTray implements SysTrayMenuListener {
         _browserString = _configFile.getProperty("browser", "default");
 
         if (!(new File("router.config")).exists())
-            openRouterConsole();
+            openRouterConsole("http://localhost:7657/config.jsp");
 
         if (System.getProperty("os.name").startsWith("Windows"))
             _instance = new SysTray();
@@ -60,20 +60,20 @@ public class SysTray implements SysTrayMenuListener {
         return _instance;
     }
 
-    private static void openRouterConsole() {
+    private static void openRouterConsole(String url) {
 
         String browser = null;
 
         if (_browserString == null || _browserString.equals("default")) {
             try {
-                if (_urlLauncher.openUrl("http://localhost:7657/"))
+                if (_urlLauncher.openUrl(url))
                     return;
             } catch (Exception ex) {
                 // Fall through.
             }
         } else {
             try {
-                if (_urlLauncher.openUrl("http://localhost:7657/", _browserString))
+                if (_urlLauncher.openUrl(url, _browserString))
                     return;
             } catch (Exception ex) {
                 // Fall through.
@@ -108,7 +108,7 @@ public class SysTray implements SysTrayMenuListener {
     public void iconLeftClicked(SysTrayMenuEvent e) {}
 
     public void iconLeftDoubleClicked(SysTrayMenuEvent e) {
-        openRouterConsole();
+        openRouterConsole("http://localhost:7657/");
     }
 
     public void menuItemSelected(SysTrayMenuEvent e) {
@@ -129,7 +129,7 @@ public class SysTray implements SysTrayMenuListener {
             if (!(browser = promptForBrowser("Select browser")).equals("nullnull"))
                 setBrowser(browser);
         } else if (e.getActionCommand().equals("openconsole")) {
-            openRouterConsole();
+            openRouterConsole("http://localhost:7657/");
         }
     }
 
-- 
GitLab