From 8dcd73f9852d4e5ef2bcd81a26d363bf2ffbe40d Mon Sep 17 00:00:00 2001 From: "bbaetz%cs.mcgill.ca" Date: Sat, 12 May 2001 17:47:33 +0000 Subject: [PATCH] Bug 53712 - changing themes shouldn't reaply current theme patch by gerv (gervase.markham@univ.ox.ac.uk), r=timeless, sr=alecf --- .../prefwindow/resources/content/pref-themes.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/xpfe/components/prefwindow/resources/content/pref-themes.js b/xpfe/components/prefwindow/resources/content/pref-themes.js index d971778d5b08..9eaa21a45fd2 100644 --- a/xpfe/components/prefwindow/resources/content/pref-themes.js +++ b/xpfe/components/prefwindow/resources/content/pref-themes.js @@ -28,8 +28,10 @@ function applySkin() var tree = document.getElementById( "skinsTree" ); var selectedSkinItem = tree.selectedItems[0]; var skinName = selectedSkinItem.getAttribute( "name" ); - chromeRegistry.selectSkin( skinName, DEBUG_USE_PROFILE ); - chromeRegistry.refreshSkins(); + if (!chromeRegistry.isSkinSelected(skinName, DEBUG_USE_PROFILE)) { + chromeRegistry.selectSkin( skinName, DEBUG_USE_PROFILE ); + chromeRegistry.refreshSkins(); + } } function deselectSkin() @@ -88,6 +90,8 @@ function themeSelect() uninstallButton.label = uninstallLabel; var locType = selectedItem.getAttribute("loctype"); uninstallButton.disabled = (locType == "install"); + var skinName = selectedItem.getAttribute( "name" ); + applyButton.disabled = chromeRegistry.isSkinSelected(skinName, DEBUG_USE_PROFILE); } else { applyButton.setAttribute("disabled", true);