From cebb7c2b3c9a7e765f24ea50d3b2acc474211305 Mon Sep 17 00:00:00 2001 From: "mkaply%us.ibm.com" Date: Wed, 22 Jan 2003 04:58:09 +0000 Subject: [PATCH] #189349 r=cbiesinger, sr=bzbarsky Have OS/2 follow the Windows path for downloadManager dialog - launch and open in explorer --- xpcom/io/nsLocalFileOS2.cpp | 7 +++++-- .../download-manager/resources/downloadmanager.js | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/xpcom/io/nsLocalFileOS2.cpp b/xpcom/io/nsLocalFileOS2.cpp index 5973a23b44ac..a69314f1e39d 100644 --- a/xpcom/io/nsLocalFileOS2.cpp +++ b/xpcom/io/nsLocalFileOS2.cpp @@ -1711,7 +1711,8 @@ nsLocalFile::SetPersistentDescriptor(const nsACString &aPersistentDescriptor) } #ifndef OPEN_DEFAULT -#define OPEN_DEFAULT 0 +#define OPEN_DEFAULT 0 +#define OPEN_CONTENTS 1 #endif @@ -1735,7 +1736,8 @@ nsLocalFile::Reveal() } HOBJECT hobject = WinQueryObject(path.get()); - WinOpenObject( hobject, OPEN_DEFAULT, TRUE); + WinSetFocus(HWND_DESKTOP, HWND_DESKTOP); + WinOpenObject( hobject, OPEN_CONTENTS, TRUE); // we don't care if it succeeded or failed. return NS_OK; @@ -1746,6 +1748,7 @@ NS_IMETHODIMP nsLocalFile::Launch() { HOBJECT hobject = WinQueryObject(mWorkingPath.get()); + WinSetFocus(HWND_DESKTOP, HWND_DESKTOP); WinOpenObject( hobject, OPEN_DEFAULT, TRUE); // we don't care if it succeeded or failed. diff --git a/xpfe/components/download-manager/resources/downloadmanager.js b/xpfe/components/download-manager/resources/downloadmanager.js index da299ef7b78a..d0fb8214be82 100644 --- a/xpfe/components/download-manager/resources/downloadmanager.js +++ b/xpfe/components/download-manager/resources/downloadmanager.js @@ -93,7 +93,8 @@ function DLManagerStartup() window.setTimeout(onRebuild, 0); var key; - if (navigator.platform.indexOf("Win") != -1) + if ((navigator.platform.indexOf("Win") != -1) || + (navigator.platform.indexOf("OS/2") != -1)) key = "Win"; else if (navigator.platform.indexOf("Mac") != -1) key = "Mac"; @@ -220,7 +221,9 @@ var downloadViewController = { file = getFileForItem(selectedItem); // on unix, open a browser window rooted at the parent - if (navigator.platform.indexOf("Win") == -1 && navigator.platform.indexOf("Mac") == -1) { + if ((navigator.platform.indexOf("Win") == -1) && + (navigator.platform.indexOf("Mac") == -1) && + (navigator.platform.indexOf("OS/2") == -1)) { file = file.QueryInterface(Components.interfaces.nsIFile); var parent = file.parent; if (parent) {