diff --git a/mozilla/xpfe/components/prefwindow/resources/content/pref-themes.js b/mozilla/xpfe/components/prefwindow/resources/content/pref-themes.js index 8ce5c31ec18..0fc4477af4c 100644 --- a/mozilla/xpfe/components/prefwindow/resources/content/pref-themes.js +++ b/mozilla/xpfe/components/prefwindow/resources/content/pref-themes.js @@ -4,6 +4,7 @@ const DEBUG_USE_PROFILE = true; + try { var chromeRegistry = Components.classes["component://netscape/chrome/chrome-registry"].getService(); @@ -17,6 +18,17 @@ catch(e) function selectSkin() { var tree = document.getElementById( "skinsTree" ); + + var commonDialogs = nsJSComponentManager.getService("component://netscape/appshell/commonDialogs", + "nsICommonDialogs"); + // XXX XXX BAD BAD BAD BAD !! XXX XXX + // we need to come up with a real solution to the losing content in editor problem + // rather than just hacking around it like this. + var dialogTitle = bundle.GetStringFromName("switchskins"); + var msg = bundle.GetStringFromName("switchskinstitle"); + if (!commonDialogs.Confirm(window, msg, dialogTitle)) + return false; + var selectedSkinItem = tree.selectedItems[0]; var skinName = selectedSkinItem.getAttribute( "name" ); chromeRegistry.selectSkin( skinName, DEBUG_USE_PROFILE ); @@ -85,4 +97,7 @@ function sendEmail(aElement) window.openDialog( "chrome://messenger/content/messengercompose/messengercompose.xul", "_blank", "chrome,all,dialog=no", "subject='" + aElement.getAttribute('displayName') + "',bodyislink=true"); - } \ No newline at end of file + } + +var bundle = srGetStrBundle("chrome://communicator/locale/pref/prefutilities.properties"); + \ No newline at end of file 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 01499b20d1b..29ab78ebca8 100644 --- a/mozilla/xpfe/components/prefwindow/resources/locale/en-US/prefutilities.properties +++ b/mozilla/xpfe/components/prefwindow/resources/locale/en-US/prefutilities.properties @@ -3,4 +3,6 @@ choosehomepage=Choose Start Page choosefile=Choose a file viewrow=View... hiderow=Hide -nofontsforlang=No fonts available for this language \ No newline at end of file +nofontsforlang=No fonts available for this language +switchskins=Switching skins is a prototype feature and will result in all changes in an open editor and mail compose windows to be lost, as well as the current webpage in the browser. If you have any mail or editor windows open it is recommended that you click cancel, close these windows and then switch skins. +switchskinstitle=Switch Skins \ No newline at end of file