diff options
author | Lakshmi Shanmugam | 2015-05-27 11:31:02 +0000 |
---|---|---|
committer | Lakshmi Shanmugam | 2015-05-27 11:34:40 +0000 |
commit | bfd81d646bfd6fdd35c5572a300cae24ce353795 (patch) | |
tree | 7354b418add9eccf009f1617810d4621a60bf5ab | |
parent | b406b65a23020f2d0f3b46b4ebe75980942d3d09 (diff) | |
download | eclipse.platform.swt-bfd81d646bfd6fdd35c5572a300cae24ce353795.tar.gz eclipse.platform.swt-bfd81d646bfd6fdd35c5572a300cae24ce353795.tar.xz eclipse.platform.swt-bfd81d646bfd6fdd35c5572a300cae24ce353795.zip |
Bug 467203 - Download progress window not shown with XULRunner 31
The download doesn't start automatically with XULR 31 browser and the
progress window doesn't show up. The workaround is to open the download
progress window, so that user can start the download.
3 files changed, 14 insertions, 2 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/HelperAppLauncherDialog_10.java b/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/HelperAppLauncherDialog_10.java index 0a395f8b27..1e1b963d71 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/HelperAppLauncherDialog_10.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/HelperAppLauncherDialog_10.java @@ -11,7 +11,7 @@ package org.eclipse.swt.browser; import org.eclipse.swt.*; -import org.eclipse.swt.internal.C; +import org.eclipse.swt.internal.*; import org.eclipse.swt.internal.mozilla.*; import org.eclipse.swt.widgets.*; @@ -68,7 +68,9 @@ int PromptForSaveToFile (long /*int*/ aLauncher, long /*int*/ aWindowContext, lo path.dispose (); if (rc != XPCOM.NS_OK) Mozilla.error (rc); if (result[0] == 0) Mozilla.error (XPCOM.NS_ERROR_NULL_POINTER); - /* Our own nsIDownload has been registered during the Browser initialization. It will be invoked by Mozilla. */ + if (MozillaVersion.CheckVersion (MozillaVersion.VERSION_XR31, true)) { + Mozilla.shouldOpenDownloadProgressWindow = true; + } XPCOM.memmove (_retval, result, C.PTR_SIZEOF); return XPCOM.NS_OK; } diff --git a/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/Mozilla.java b/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/Mozilla.java index d6f9c7a8f4..d7cc81c495 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/Mozilla.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/Mozilla.java @@ -69,6 +69,7 @@ class Mozilla extends WebBrowser { static Listener DisplayListener; static boolean Initialized, IsXULRunner, PerformedVersionCheck, XPCOMWasGlued, XPCOMInitWasGlued; static boolean IsGettingSiteWindow; + static boolean shouldOpenDownloadProgressWindow = false; static String MozillaPath; static String oldProxyHostFTP, oldProxyHostHTTP, oldProxyHostSSL; static int oldProxyPortFTP = -1, oldProxyPortHTTP = -1, oldProxyPortSSL = -1, oldProxyType = -1; diff --git a/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/WindowCreator2.java b/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/WindowCreator2.java index e1b4a95715..375c2ee913 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/WindowCreator2.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/WindowCreator2.java @@ -177,6 +177,15 @@ int CreateChromeWindow2 (long /*int*/ parent, int chromeFlags, int contextFlags, new Shell (src.getShell(), style); shell.setLayout (new FillLayout ()); browser = new Browser (shell, src == null ? SWT.MOZILLA : src.getStyle () & SWT.MOZILLA); + if (Mozilla.shouldOpenDownloadProgressWindow) { + /* + * In XULRunner 31, download doesn't start automatically and progress window doesn't open. + * We open it the download progress window, so that user can start the download. + */ + + Mozilla.shouldOpenDownloadProgressWindow = false; + shell.open(); + } browser.addVisibilityWindowListener (new VisibilityWindowListener () { public void hide (WindowEvent event) { } |