Bug 347230: Minimal Save-only dialog shown for files with discoverable types (known file extensions), patch by Masatoshi Kimura (:emk) <VYV03354@nifty.ne.jp>, r=me

This commit is contained in:
gavin%gavinsharp.com 2006-12-09 04:37:22 +00:00
parent 0c63351905
commit 0a951cdc46

View File

@ -422,13 +422,11 @@ nsUnknownContentTypeDialog.prototype = {
// if always-save and is-executable and no-handler
// then set up simple ui
var defaultApp = this.mLauncher.MIMEInfo.preferredApplicationHandler;
var noDefaultApp = (!defaultApp || !defaultApp.path);
var mimeType = this.mLauncher.MIMEInfo.MIMEType;
var shouldntRememberChoice = (mimeType == "application/octet-stream" ||
mimeType == "application/x-msdownload" ||
this.mLauncher.targetFile.isExecutable());
if (shouldntRememberChoice && noDefaultApp) {
if (shouldntRememberChoice && !this.openWithDefaultOK()) {
// hide featured choice
this.mDialog.document.getElementById("normalBox").collapsed = "true";
// show basic choice