Bug #234270 --> Limit Theme File Picker to .jar files

Patch by Robert Accettura
This commit is contained in:
scott%scott-macgregor.org 2004-02-15 08:00:05 +00:00
parent ce6c0a408a
commit a5230d88e2
2 changed files with 10 additions and 0 deletions

View File

@ -243,6 +243,13 @@ function installSkin()
// 1) Prompt the user for the location of the theme to install. Eventually we'll support web locations too.
var fp = Components.classes["@mozilla.org/filepicker;1"].createInstance(nsIFilePicker);
fp.init(window, document.getElementById("installSkin").getAttribute("filepickertitle"), nsIFilePicker.modeOpen);
var strBundleService = Components.classes["@mozilla.org/intl/stringbundle;1"].getService();
strBundleService = strBundleService.QueryInterface(Components.interfaces.nsIStringBundleService);
var extbundle = strBundleService.createBundle("chrome://communicator/locale/pref/prefutilities.properties");
var themesFilter = extbundle.GetStringFromName("themesFilter");
fp.appendFilter(themesFilter, "*.jar");
fp.appendFilters(nsIFilePicker.filterAll);
var ret = fp.show();

View File

@ -5,6 +5,9 @@ choosefile=Choose a file
applyThemePrefix=Apply %theme_name%
uninstallThemePrefix=Uninstall %theme_name%
# Themes File Picker filter
themesFilter=Themes (*.jar)
oldTheme=You have selected a theme which was designed for an earlier version of %brand% and is incompatible with your current %brand% version. Please check the %brand% Theme Park for an updated version of the theme. You can uninstall this theme by clicking \"Uninstall %theme_name%\" button.
enableExtension=Enable Extension