2198 +# PrefWindow IV (April 24, 2000) |
2198 +# PrefWindow IV (April 24, 2000) |
2199 +# PrefWindow III (January 6, 2000) |
2199 +# PrefWindow III (January 6, 2000) |
2200 +# PrefWindow II (???) |
2200 +# PrefWindow II (???) |
2201 +# PrefWindow I (June 4, 1999) |
2201 +# PrefWindow I (June 4, 1999) |
2202 +# |
2202 +# |
|
2203 diff --git a/toolkit/mozapps/downloads/nsHelperAppDlg.js b/toolkit/mozapps/downloads/nsHelperAppDlg.js |
|
2204 --- a/toolkit/mozapps/downloads/nsHelperAppDlg.js |
|
2205 +++ b/toolkit/mozapps/downloads/nsHelperAppDlg.js |
|
2206 @@ -627,17 +627,17 @@ nsUnknownContentTypeDialog.prototype = { |
|
2207 else |
|
2208 typeString = mimeInfo.MIMEType; |
|
2209 } |
|
2210 // When the length is unknown, contentLength would be -1 |
|
2211 if (this.mLauncher.contentLength >= 0) { |
|
2212 let [size, unit] = DownloadUtils. |
|
2213 convertByteUnits(this.mLauncher.contentLength); |
|
2214 type.value = this.dialogElement("strings") |
|
2215 - .getFormattedString("orderedFileSizeWithType", |
|
2216 + .getFormattedString("orderedFileSizeWithType", |
|
2217 [typeString, size, unit]); |
|
2218 } |
|
2219 else { |
|
2220 type.value = typeString; |
|
2221 } |
|
2222 }, |
|
2223 |
|
2224 // Returns true if opening the default application makes sense. |
|
2225 @@ -801,17 +801,17 @@ nsUnknownContentTypeDialog.prototype = { |
|
2226 switch (this.dialogElement("openHandler").selectedIndex) { |
|
2227 case 0: |
|
2228 // No app need be specified in this case. |
|
2229 ok = true; |
|
2230 break; |
|
2231 case 1: |
|
2232 // only enable the OK button if we have a default app to use or if |
|
2233 // the user chose an app.... |
|
2234 - ok = this.chosenApp || /\S/.test(this.dialogElement("otherHandler").getAttribute("path")); |
|
2235 + ok = this.chosenApp || /\S/.test(this.dialogElement("otherHandler").getAttribute("path")); |
|
2236 break; |
|
2237 } |
|
2238 } |
|
2239 |
|
2240 // Enable Ok button if ok to press. |
|
2241 this.mDialog.document.documentElement.getButton("accept").disabled = !ok; |
|
2242 }, |
|
2243 |
|
2244 @@ -1068,30 +1068,56 @@ nsUnknownContentTypeDialog.prototype = { |
|
2245 params.handlerApp.executable && |
|
2246 params.handlerApp.executable.isFile()) { |
|
2247 // Remember the file they chose to run. |
|
2248 this.chosenApp = params.handlerApp; |
|
2249 } |
|
2250 } |
|
2251 else { |
|
2252 #if MOZ_WIDGET_GTK == 3 |
|
2253 - var nsIApplicationChooser = Components.interfaces.nsIApplicationChooser; |
|
2254 - var appChooser = Components.classes["@mozilla.org/applicationchooser;1"] |
|
2255 - .createInstance(nsIApplicationChooser); |
|
2256 - appChooser.init(this.mDialog, this.dialogElement("strings").getString("chooseAppFilePickerTitle")); |
|
2257 - var contentTypeDialogObj = this; |
|
2258 - let appChooserCallback = function appChooserCallback_done(aResult) { |
|
2259 - if (aResult) { |
|
2260 - contentTypeDialogObj.chosenApp = aResult.QueryInterface(Components.interfaces.nsILocalHandlerApp); |
|
2261 + // handle the KDE case which is implemented in the filepicker |
|
2262 + // therefore falling back to Gtk2 like behaviour if KDE is running |
|
2263 + // FIXME this should be better handled in the nsIApplicationChooser interface |
|
2264 + var env = Components.classes["@mozilla.org/process/environment;1"] |
|
2265 + .getService(Components.interfaces.nsIEnvironment); |
|
2266 + if (env.get('KDE_FULL_SESSION') == "true") |
|
2267 + { |
|
2268 + var nsIFilePicker = Components.interfaces.nsIFilePicker; |
|
2269 + var fp = Components.classes["@mozilla.org/filepicker;1"] |
|
2270 + .createInstance(nsIFilePicker); |
|
2271 + fp.init(this.mDialog, |
|
2272 + this.dialogElement("strings").getString("chooseAppFilePickerTitle"), |
|
2273 + nsIFilePicker.modeOpen); |
|
2274 + |
|
2275 + fp.appendFilters(nsIFilePicker.filterApps); |
|
2276 + |
|
2277 + if (fp.show() == nsIFilePicker.returnOK && fp.file) { |
|
2278 + // Remember the file they chose to run. |
|
2279 + var localHandlerApp = |
|
2280 + Components.classes["@mozilla.org/uriloader/local-handler-app;1"]. |
|
2281 + createInstance(Components.interfaces.nsILocalHandlerApp); |
|
2282 + localHandlerApp.executable = fp.file; |
|
2283 + this.chosenApp = localHandlerApp; |
|
2284 } |
|
2285 - contentTypeDialogObj.finishChooseApp(); |
|
2286 - }; |
|
2287 - appChooser.open(this.mLauncher.MIMEInfo.MIMEType, appChooserCallback); |
|
2288 - // The finishChooseApp is called from appChooserCallback |
|
2289 - return; |
|
2290 + } else { |
|
2291 + var nsIApplicationChooser = Components.interfaces.nsIApplicationChooser; |
|
2292 + var appChooser = Components.classes["@mozilla.org/applicationchooser;1"] |
|
2293 + .createInstance(nsIApplicationChooser); |
|
2294 + appChooser.init(this.mDialog, this.dialogElement("strings").getString("chooseAppFilePickerTitle")); |
|
2295 + var contentTypeDialogObj = this; |
|
2296 + let appChooserCallback = function appChooserCallback_done(aResult) { |
|
2297 + if (aResult) { |
|
2298 + contentTypeDialogObj.chosenApp = aResult.QueryInterface(Components.interfaces.nsILocalHandlerApp); |
|
2299 + } |
|
2300 + contentTypeDialogObj.finishChooseApp(); |
|
2301 + }; |
|
2302 + appChooser.open(this.mLauncher.MIMEInfo.MIMEType, appChooserCallback); |
|
2303 + // The finishChooseApp is called from appChooserCallback |
|
2304 + return; |
|
2305 + } |
|
2306 #else |
|
2307 var nsIFilePicker = Components.interfaces.nsIFilePicker; |
|
2308 var fp = Components.classes["@mozilla.org/filepicker;1"] |
|
2309 .createInstance(nsIFilePicker); |
|
2310 fp.init(this.mDialog, |
|
2311 this.dialogElement("strings").getString("chooseAppFilePickerTitle"), |
|
2312 nsIFilePicker.modeOpen); |
|
2313 |
2203 diff --git a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp b/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp |
2314 diff --git a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp b/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp |
2204 --- a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp |
2315 --- a/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp |
2205 +++ b/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp |
2316 +++ b/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp |
2206 @@ -15,16 +15,17 @@ |
2317 @@ -15,16 +15,17 @@ |
2207 #include "nsPrintfCString.h" |
2318 #include "nsPrintfCString.h" |