fix for 43350, provide some warning about impending data loss before switching themes
git-svn-id: svn://10.0.0.236/trunk@74676 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
6e72c7a7f6
commit
7b5dcaf8af
@ -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");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
var bundle = srGetStrBundle("chrome://communicator/locale/pref/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
|
||||
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
|
||||
Loading…
x
Reference in New Issue
Block a user