mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 22:32:46 +00:00
Skin uninstallation. Just do it, baby. r=danm, sr=brendan
This commit is contained in:
parent
42df68efdd
commit
77c106212e
@ -40,6 +40,18 @@ function deselectSkin()
|
||||
chromeRegistry.refreshSkins();
|
||||
}
|
||||
|
||||
function uninstallSkin()
|
||||
{
|
||||
var tree = document.getElementById( "skinsTree" );
|
||||
var selectedSkinItem = tree.selectedItems[0];
|
||||
var skinName = selectedSkinItem.getAttribute( "name" );
|
||||
var inUse = chromeRegistry.isSkinSelected(skinName, DEBUG_USE_PROFILE);
|
||||
chromeRegistry.uninstallSkin( skinName, DEBUG_USE_PROFILE );
|
||||
if (inUse)
|
||||
chromeRegistry.refreshSkins();
|
||||
tree.selectedIndex = 0;
|
||||
}
|
||||
|
||||
// XXX DEBUG ONLY. DO NOT LOCALIZE
|
||||
function installSkin()
|
||||
{
|
||||
@ -65,9 +77,15 @@ function themeSelect()
|
||||
description.removeChild(description.firstChild);
|
||||
description.appendChild(descText);
|
||||
var applyButton = document.getElementById("applySkin");
|
||||
var uninstallButton = document.getElementById("uninstallSkin");
|
||||
var applyLabel = bundle.GetStringFromName("applyThemePrefix");
|
||||
var uninstallLabel = bundle.GetStringFromName("uninstallThemePrefix");
|
||||
applyLabel = applyLabel.replace(/%theme_name%/, themeName);
|
||||
uninstallLabel = uninstallLabel.replace(/%theme_name%/, themeName);
|
||||
applyButton.value = applyLabel;
|
||||
uninstallButton.value = uninstallLabel;
|
||||
var locType = selectedItem.getAttribute("loctype");
|
||||
uninstallButton.disabled = (locType == "install");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -59,7 +59,8 @@
|
||||
displayName="rdf:http://www.mozilla.org/rdf/chrome#displayName"
|
||||
name="rdf:http://www.mozilla.org/rdf/chrome#name"
|
||||
description="rdf:http://www.mozilla.org/rdf/chrome#description"
|
||||
image="rdf:http://www.mozilla.org/rdf/chrome#image">
|
||||
image="rdf:http://www.mozilla.org/rdf/chrome#image"
|
||||
loctype="rdf:http://www.mozilla.org/rdf/chrome#locType">
|
||||
<treerow>
|
||||
<treecell value="rdf:http://www.mozilla.org/rdf/chrome#displayName"/>
|
||||
</treerow>
|
||||
@ -89,6 +90,7 @@
|
||||
</box>
|
||||
<box orient="vertical" align="top">
|
||||
<button id="applySkin" value="&selectSkin.label;" accesskey="&selectSkin.accesskey;" oncommand="applySkin();"/>
|
||||
<button id="uninstallSkin" value="&uninstallSkin.label;" oncommand="uninstallSkin();"/>
|
||||
</box>
|
||||
</box>
|
||||
|
||||
|
@ -39,11 +39,7 @@
|
||||
|
||||
<tree id="prefsTree"
|
||||
onselect="if( hPrefWindow ) hPrefWindow.switchPage();">
|
||||
|
||||
<treecolgroup>
|
||||
<treecol flex="1"/>
|
||||
</treecolgroup>
|
||||
|
||||
|
||||
<treehead name="tree">
|
||||
<treerow>
|
||||
<treecell class="treecell-header outset" url="__header" value="&categoryHeader;"/>
|
||||
|
@ -8,6 +8,9 @@
|
||||
<!ENTITY selectSkin.label "Apply Theme">
|
||||
<!ENTITY selectSkin.accesskey "a">
|
||||
|
||||
<!ENTITY uninstallSkin.label "Uninstall Theme">
|
||||
<!ENTITY uninstallSkin.accesskey "u">
|
||||
|
||||
<!ENTITY general.label "General">
|
||||
<!ENTITY preview.label "Preview Image">
|
||||
<!ENTITY author.label "Author">
|
||||
|
@ -7,4 +7,5 @@ nofontsforlang=No fonts available for this language
|
||||
|
||||
# Themes preferences panel inserts the name of the selected
|
||||
# theme into the %theme_name% segment
|
||||
applyThemePrefix=Apply %theme_name%
|
||||
applyThemePrefix=Apply %theme_name%
|
||||
uninstallThemePrefix=Uninstall %theme_name%
|
Loading…
Reference in New Issue
Block a user