bug 164489 r=timeless sr=bz contentAreaUtils.js should use appendFilters for well known types (text, allfiles)

This commit is contained in:
cbiesinger%web.de 2006-07-29 05:41:21 +00:00
Родитель 802563e3ad
Коммит 209895d405
2 изменённых файлов: 3 добавлений и 5 удалений

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

@ -515,7 +515,7 @@ function appendFiltersForContentType(aFilePicker, aContentType, aSaveMode)
aFilePicker.appendFilter(bundle.GetStringFromName("WebPageCompleteFilter"), "*.htm; *.html"); aFilePicker.appendFilter(bundle.GetStringFromName("WebPageCompleteFilter"), "*.htm; *.html");
aFilePicker.appendFilter(bundle.GetStringFromName("WebPageHTMLOnlyFilter"), "*.htm; *.html"); aFilePicker.appendFilter(bundle.GetStringFromName("WebPageHTMLOnlyFilter"), "*.htm; *.html");
if (aSaveMode == MODE_COMPLETE) if (aSaveMode == MODE_COMPLETE)
aFilePicker.appendFilter(bundle.GetStringFromName("TextOnlyFilter"), "*.txt"); aFilePicker.appendFilters(Components.interfaces.nsIFilePicker.filterText);
break; break;
default: default:
var mimeInfo = getMIMEInfoForType(aContentType); var mimeInfo = getMIMEInfoForType(aContentType);
@ -534,11 +534,11 @@ function appendFiltersForContentType(aFilePicker, aContentType, aSaveMode)
if (extCount.value > 0) { if (extCount.value > 0) {
aFilePicker.appendFilter(mimeInfo.Description, extString); aFilePicker.appendFilter(mimeInfo.Description, extString);
} else { } else {
aFilePicker.appendFilter(bundle.GetStringFromName("AllFilesFilter"), "*.*"); aFilePicker.appendFilters(Components.interfaces.nsIFilePicker.filterAll);
} }
} }
else else
aFilePicker.appendFilter(bundle.GetStringFromName("AllFilesFilter"), "*.*"); aFilePicker.appendFilters(Components.interfaces.nsIFilePicker.filterAll);
break; break;
} }
} }

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

@ -8,8 +8,6 @@ SaveLinkTitle=Save As
DefaultSaveFileName=index DefaultSaveFileName=index
WebPageCompleteFilter=Web Page, complete WebPageCompleteFilter=Web Page, complete
WebPageHTMLOnlyFilter=Web Page, HTML only WebPageHTMLOnlyFilter=Web Page, HTML only
TextOnlyFilter=Text File
AllFilesFilter=All Files
# LOCALIZATION NOTE (filesFolder): # LOCALIZATION NOTE (filesFolder):
# This is the name of the folder that is created parallel to a HTML file # This is the name of the folder that is created parallel to a HTML file