summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt/Eclipse SWT Mozilla
diff options
context:
space:
mode:
authorGrant Gayed <ggayed>2009-06-25 20:29:40 +0000
committerGrant Gayed <ggayed>2009-06-25 20:29:40 +0000
commit6b3ddabbff00c1c4b47d6361940192e9b0e68975 (patch)
tree3e3835f2f28b354ad91fd7740cbaa834c8eb1a07 /bundles/org.eclipse.swt/Eclipse SWT Mozilla
parent6c0d346828da7dec94d8f9cd2af71d1c09d54e5b (diff)
downloadeclipse.platform.swt-6b3ddabbff00c1c4b47d6361940192e9b0e68975.tar.gz
eclipse.platform.swt-6b3ddabbff00c1c4b47d6361940192e9b0e68975.tar.xz
eclipse.platform.swt-6b3ddabbff00c1c4b47d6361940192e9b0e68975.zip
77217 - Support the Browser widget on Solaris SPARC
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT Mozilla')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/AppFileLocProvider.java23
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Mozilla/gtk/org/eclipse/swt/browser/MozillaDelegate.java11
2 files changed, 20 insertions, 14 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/AppFileLocProvider.java b/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/AppFileLocProvider.java
index 1f9e84512a..89715657ac 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/AppFileLocProvider.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/AppFileLocProvider.java
@@ -33,6 +33,13 @@ class AppFileLocProvider {
static final String PLUGINS_DIR = "plugins"; //$NON-NLS-1$
static final String USER_PLUGINS_DIR = ".mozilla" + SEPARATOR_OS + "plugins"; //$NON-NLS-1$ //$NON-NLS-2$
static final String PREFERENCES_FILE = "prefs.js"; //$NON-NLS-1$
+
+ static boolean IsSparc;
+ static {
+ String osName = System.getProperty ("os.name").toLowerCase (); //$NON-NLS-1$
+ String osArch = System.getProperty ("os.arch").toLowerCase (); //$NON-NLS-1$
+ IsSparc = (osName.startsWith ("sunos") || osName.startsWith ("solaris")) && osArch.startsWith("sparc"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ }
AppFileLocProvider (String path) {
mozillaPath = path + SEPARATOR_OS;
@@ -174,18 +181,28 @@ int getFiles (int /*long*/ prop, int /*long*/ _retval) {
if (segment.length () > 0) segments.addElement (segment);
} while (end != -1);
int segmentsSize = segments.size ();
- pluginDirs = new String [segmentsSize + 2];
+ pluginDirs = new String [segmentsSize + (IsSparc ? 1 : 2)];
for (index = 0; index < segmentsSize; index++) {
pluginDirs[index] = (String)segments.elementAt (index);
}
}
}
if (pluginDirs == null) {
- pluginDirs = new String[2];
+ pluginDirs = new String[IsSparc ? 1 : 2];
}
/* set the next value to the GRE path + "plugins" */
- pluginDirs[index++] = mozillaPath + PLUGINS_DIR;
+
+ /*
+ * Bug on Solaris SPARC. Attempting to start the java plug-in fails with an
+ * error indicating that PR_NewMonitor could not be found. This is a well-
+ * known problem that many other apps have also encountered, with no
+ * resolution other than to remove this plug-in. The Browser workaround is
+ * to not add the directory containing this plug-in to the plug-in search path.
+ */
+ if (!IsSparc) {
+ pluginDirs[index++] = mozillaPath + PLUGINS_DIR;
+ }
/* set the next value to the home directory + "/.mozilla/plugins" */
pluginDirs[index++] = System.getProperty("user.home") + SEPARATOR_OS + USER_PLUGINS_DIR;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Mozilla/gtk/org/eclipse/swt/browser/MozillaDelegate.java b/bundles/org.eclipse.swt/Eclipse SWT Mozilla/gtk/org/eclipse/swt/browser/MozillaDelegate.java
index 77a16bad0b..57bd6b7c5e 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Mozilla/gtk/org/eclipse/swt/browser/MozillaDelegate.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Mozilla/gtk/org/eclipse/swt/browser/MozillaDelegate.java
@@ -26,19 +26,8 @@ class MozillaDelegate {
static int /*long*/ eventProc;
static final int STOP_PROPOGATE = 1;
- static boolean IsSparc;
- static {
- String osName = System.getProperty ("os.name").toLowerCase (); //$NON-NLS-1$
- String osArch = System.getProperty ("os.arch").toLowerCase (); //$NON-NLS-1$
- IsSparc = (osName.startsWith ("sunos") || osName.startsWith ("solaris")) && osArch.startsWith("sparc"); //$NON-NLS-1$
- }
-
MozillaDelegate (Browser browser) {
super ();
- if (IsSparc) {
- browser.dispose ();
- SWT.error (SWT.ERROR_NO_HANDLES, null, " [Unsupported platform]"); //$NON-NLS-1$
- }
this.browser = browser;
}