aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYana Stamcheva <yana@jitsi.org>2006-08-14 12:18:54 +0000
committerYana Stamcheva <yana@jitsi.org>2006-08-14 12:18:54 +0000
commit0e2d028092c19e5b7b9e0826378c06b7111b56a5 (patch)
tree084edccb7e2c28b6e9d552128d3f74d5d76680eb
parent5d95a3eec11de2e424f3fbe2f890187ceae702fb (diff)
downloadjitsi-0e2d028092c19e5b7b9e0826378c06b7111b56a5.zip
jitsi-0e2d028092c19e5b7b9e0826378c06b7111b56a5.tar.gz
jitsi-0e2d028092c19e5b7b9e0826378c06b7111b56a5.tar.bz2
launch a browser for mac - work in progress
-rw-r--r--build.xml19
-rw-r--r--lib/BrowserLauncher2-10rc4.jarbin0 -> 57148 bytes
-rw-r--r--src/net/java/sip/communicator/impl/gui/utils/BrowserLauncher.java32
3 files changed, 41 insertions, 10 deletions
diff --git a/build.xml b/build.xml
index 58557c3..cbabdbe 100644
--- a/build.xml
+++ b/build.xml
@@ -21,7 +21,7 @@
<property name="test.html.reports.dir" value="${test.reports.dir}/html"/>
<property name="release" value="release"/>
<property name="inst.resrc" value="resources/install"/>
-
+
<!-- Put here the release directory -->
<property name="macosx.app.dir" value="${release}/macosx"/>
<!-- Put here the Application name -->
@@ -448,6 +448,9 @@
<!-- Tell java.util.logging about our logging preferences -->
<sysproperty key="java.util.logging.config.file"
value="lib/logging.properties"/>
+
+ <sysproperty key="java.library.path"
+ value="${lib}/native/x86"/>
</java>
</target>
@@ -795,6 +798,8 @@ javax.swing.event, javax.swing.border"/>
prefix="net/java/sip/communicator/service/gui"/>
<zipfileset dir="${dest}/net/java/sip/communicator/impl/gui"
prefix="net/java/sip/communicator/impl/gui"/>
+ <zipfileset src="${lib}/BrowserLauncher2-10rc4.jar"
+ prefix=""/>
</jar>
</target>
@@ -830,4 +835,16 @@ javax.swing.event, javax.swing.border"/>
</jar>
</target>
+
+ <!-- BUNDLE-PLUGIN-SYSTRAY -->
+ <!--target name="bundle-plugin-systray">
+ <jar compress="false" destfile="${bundles.dest}/systray.jar"
+ manifest="src/net/java/sip/communicator/plugin/systray/systray.manifest.mf">
+ <zipfileset dir="${dest}/net/java/sip/communicator/plugin/systray"
+ prefix="net/java/sip/communicator/plugin/systray"/>
+ <zipfileset src="${lib}/jdic/jdic.jar" prefix=""/>
+ <zipfileset dir="${lib}/jdic" prefix=""/>
+ <zipfileset src="${lib}/jdic/linux/jdic_stub.jar" prefix=""/>
+ </jar>
+ </target-->
</project>
diff --git a/lib/BrowserLauncher2-10rc4.jar b/lib/BrowserLauncher2-10rc4.jar
new file mode 100644
index 0000000..073da11
--- /dev/null
+++ b/lib/BrowserLauncher2-10rc4.jar
Binary files differ
diff --git a/src/net/java/sip/communicator/impl/gui/utils/BrowserLauncher.java b/src/net/java/sip/communicator/impl/gui/utils/BrowserLauncher.java
index 4929b67..bc38da2 100644
--- a/src/net/java/sip/communicator/impl/gui/utils/BrowserLauncher.java
+++ b/src/net/java/sip/communicator/impl/gui/utils/BrowserLauncher.java
@@ -6,13 +6,10 @@
*/
package net.java.sip.communicator.impl.gui.utils;
-/*
- * The content of this file was based on code borrowed from
- * http://www.centerkey.com/.
- */
-import java.lang.reflect.Method;
-import javax.swing.JOptionPane;
+import edu.stanford.ejalbert.BrowserLauncherRunner;
+import edu.stanford.ejalbert.exception.BrowserLaunchingInitializingException;
+import edu.stanford.ejalbert.exception.UnsupportedOperatingSystemException;
import net.java.sip.communicator.impl.gui.i18n.Messages;
@@ -24,8 +21,8 @@ import net.java.sip.communicator.impl.gui.i18n.Messages;
*/
public class BrowserLauncher {
- private static final String errMsg
- = Messages.getString("launchBrowserError");
+ //private static final String errMsg
+ // = Messages.getString("launchBrowserError");
/**
* Launches a browser for the given url, depending on the operation system
@@ -34,6 +31,23 @@ public class BrowserLauncher {
* @param url The url to open in the browser.
*/
public static void openURL(String url) {
+
+ edu.stanford.ejalbert.BrowserLauncher launcher;
+ try {
+ launcher = new edu.stanford.ejalbert.BrowserLauncher(null);
+
+ BrowserLauncherRunner runner = new BrowserLauncherRunner(launcher, url, null);
+ Thread launcherThread = new Thread(runner);
+ launcherThread.start();
+ }
+ catch (BrowserLaunchingInitializingException e) {
+ e.printStackTrace();
+ }
+ catch (UnsupportedOperatingSystemException e) {
+ e.printStackTrace();
+ }
+
+ /*
String osName = System.getProperty("os.name");
try {
if (osName.startsWith("Mac OS")) {
@@ -64,6 +78,6 @@ public class BrowserLauncher {
JOptionPane.showMessageDialog(null, errMsg + ":\n"
+ e.getLocalizedMessage());
}
+ */
}
-
}