Changeset 51bf23a


Ignore:
Timestamp:
Dec 12, 2018 3:17:51 PM (19 months ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
9738db7
Parents:
5eda3064
Message:

DTG: Use UrlLauncher? to launch browser

Files:
2 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • apps/desktopgui/build.xml

    r5eda3064 r51bf23a  
    3535                    <pathelement location="../../installer/lib/wrapper/all/wrapper.jar" />
    3636                    <pathelement location="../../router/java/build/router.jar" />
     37                    <pathelement location="../systray/java/build/systray.jar" />
    3738                </classpath>
    3839            </javac>
  • apps/desktopgui/src/net/i2p/desktopgui/InternalTrayManager.java

    r5eda3064 r51bf23a  
    77import java.awt.event.ActionEvent;
    88import java.awt.event.ActionListener;
    9 
     9import java.io.IOException;
    1010import javax.swing.JMenu;
    1111import javax.swing.JMenuItem;
     
    1313import javax.swing.SwingWorker;
    1414
     15import net.i2p.apps.systray.UrlLauncher;
    1516import net.i2p.data.DataHelper;
    1617import net.i2p.desktopgui.router.RouterManager;
    17 import net.i2p.desktopgui.util.BrowseException;
    18 import net.i2p.desktopgui.util.I2PDesktop;
    1918import net.i2p.router.RouterContext;
    2019import net.i2p.util.Log;
     
    434433     *
    435434     * Modified from I2PTunnelHTTPClientBase.
    436      * TODO perhaps move this to a new PortMapper method.
    437435     *
    438436     * @since 0.9.26
    439437     */
    440438    private void launchBrowser() {
     439        // null args ok
     440        UrlLauncher launcher = new UrlLauncher(_context, null, null);
    441441        String url = _context.portMapper().getConsoleURL();
    442442        try {
    443             I2PDesktop.browse(url);
    444         } catch (BrowseException e1) {
     443            launcher.openUrl(url);
     444        } catch (IOException e1) {
    445445            log.log(Log.WARN, "Failed to open browser!", e1);
    446446        }   
  • apps/desktopgui/src/net/i2p/desktopgui/Main.java

    r5eda3064 r51bf23a  
    1818import static net.i2p.app.ClientAppState.*;
    1919import net.i2p.desktopgui.router.RouterManager;
    20 import net.i2p.desktopgui.util.*;
    2120import net.i2p.router.RouterContext;
    2221import net.i2p.router.app.RouterApp;
  • build.xml

    r5eda3064 r51bf23a  
    389389    </target>
    390390
    391     <target name="buildDesktopGui" depends="buildCore, buildrouter" >
    392 <!--
    393         <ant dir="apps/desktopgui" target="clean" />
    394 -->
     391    <target name="buildDesktopGui" depends="buildCore, buildrouter, buildSystray" >
    395392        <ant dir="apps/desktopgui" target="jar" />
    396393        <copy file="apps/desktopgui/dist/desktopgui.jar" todir="build/" />
Note: See TracChangeset for help on using the changeset viewer.