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
Родитель 2c97a5424a
Коммит de402b87fe
1 изменённых файлов: 1 добавлений и 3 удалений

Просмотреть файл

@ -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