diff --git a/mozilla/xpfe/components/prefwindow/resources/content/pref-themes.js b/mozilla/xpfe/components/prefwindow/resources/content/pref-themes.js
index f31530b644d..23de83f8b5e 100644
--- a/mozilla/xpfe/components/prefwindow/resources/content/pref-themes.js
+++ b/mozilla/xpfe/components/prefwindow/resources/content/pref-themes.js
@@ -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");
}
}
diff --git a/mozilla/xpfe/components/prefwindow/resources/content/pref-themes.xul b/mozilla/xpfe/components/prefwindow/resources/content/pref-themes.xul
index 9b61be368c5..3ed3553222b 100644
--- a/mozilla/xpfe/components/prefwindow/resources/content/pref-themes.xul
+++ b/mozilla/xpfe/components/prefwindow/resources/content/pref-themes.xul
@@ -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">
@@ -89,6 +90,7 @@
+
diff --git a/mozilla/xpfe/components/prefwindow/resources/content/preftree.xul b/mozilla/xpfe/components/prefwindow/resources/content/preftree.xul
index 55b5cecf748..dc3559c9369 100644
--- a/mozilla/xpfe/components/prefwindow/resources/content/preftree.xul
+++ b/mozilla/xpfe/components/prefwindow/resources/content/preftree.xul
@@ -39,11 +39,7 @@
-
-
-
-
-
+
diff --git a/mozilla/xpfe/components/prefwindow/resources/locale/en-US/pref-themes.dtd b/mozilla/xpfe/components/prefwindow/resources/locale/en-US/pref-themes.dtd
index 66bb3680059..75b6fc1be12 100644
--- a/mozilla/xpfe/components/prefwindow/resources/locale/en-US/pref-themes.dtd
+++ b/mozilla/xpfe/components/prefwindow/resources/locale/en-US/pref-themes.dtd
@@ -8,6 +8,9 @@
+
+
+
diff --git a/mozilla/xpfe/components/prefwindow/resources/locale/en-US/prefutilities.properties b/mozilla/xpfe/components/prefwindow/resources/locale/en-US/prefutilities.properties
index 457fbdcd17f..b1821370995 100644
--- a/mozilla/xpfe/components/prefwindow/resources/locale/en-US/prefutilities.properties
+++ b/mozilla/xpfe/components/prefwindow/resources/locale/en-US/prefutilities.properties
@@ -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%
\ No newline at end of file
+applyThemePrefix=Apply %theme_name%
+uninstallThemePrefix=Uninstall %theme_name%
\ No newline at end of file