mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 14:22:01 +00:00
Bug #234270 --> Limit Theme File Picker to .jar files
Patch by Robert Accettura
This commit is contained in:
parent
ce6c0a408a
commit
a5230d88e2
@ -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();
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user