improving mail compose window performance;checking blake's patch for bug#89624; r=varada; sr=sspitzer

This commit is contained in:
varada%netscape.com 2001-08-04 00:03:18 +00:00
Родитель 8bd4c52c47
Коммит 3207680662
4 изменённых файлов: 168 добавлений и 298 удалений

Просмотреть файл

@ -39,8 +39,7 @@ var messengerMigratorContractID = "@mozilla.org/messenger/migrator;1";
var msgComposeService = Components.classes["@mozilla.org/messengercompose;1"].getService(); var msgComposeService = Components.classes["@mozilla.org/messengercompose;1"].getService();
msgComposeService = msgComposeService.QueryInterface(Components.interfaces.nsIMsgComposeService); msgComposeService = msgComposeService.QueryInterface(Components.interfaces.nsIMsgComposeService);
var promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].getService(); var gPromptService = null;
promptService = promptService.QueryInterface(Components.interfaces.nsIPromptService);
//This migrates the LDAPServer Preferences from 4.x to mozilla format. //This migrates the LDAPServer Preferences from 4.x to mozilla format.
try { try {
@ -50,39 +49,30 @@ try {
Components.interfaces.nsILDAPPrefsService); Components.interfaces.nsILDAPPrefsService);
} catch (ex) {dump ("ERROR:" + ex + "\n");} } catch (ex) {dump ("ERROR:" + ex + "\n");}
try {
var ldapSession = Components.classes[
"@mozilla.org/autocompleteSession;1?type=ldap"].createInstance().
QueryInterface(Components.interfaces.nsILDAPAutoCompleteSession);
} catch (ex) {dump ("ERROR:" + ex + "\n");}
var msgCompose = null; var msgCompose = null;
var MAX_RECIPIENTS = 0; var MAX_RECIPIENTS = 0;
var currentAttachment = null; var currentAttachment = null;
var windowLocked = false; var windowLocked = false;
var contentChanged = false; var contentChanged = false;
var currentIdentity = null; var gCurrentIdentity = null;
var defaultSaveOperation = "draft"; var defaultSaveOperation = "draft";
var sendOrSaveOperationInProgress = false; var sendOrSaveOperationInProgress = false;
var isOffline = false; var isOffline = false;
var sessionAdded = false; var sessionAdded = false;
var currentAutocompleteDirectory = null; var currentAutocompleteDirectory = null;
var gAutocompleteSession = null;
var gSetupLdapAutocomplete = false;
var gLDAPSession = null;
var gComposeMsgsBundle; var gComposeMsgsBundle;
const DEBUG = false;
var other_header = ""; var other_header = "";
var update_compose_title_as_you_type = true;
var sendFormat = msgCompSendFormat.AskUser; var sendFormat = msgCompSendFormat.AskUser;
var prefs = Components.classes["@mozilla.org/preferences;1"].getService(); var prefs = Components.classes["@mozilla.org/preferences;1"].getService();
if (prefs) { if (prefs) {
prefs = prefs.QueryInterface(Components.interfaces.nsIPref); prefs = prefs.QueryInterface(Components.interfaces.nsIPref);
if (prefs) { if (prefs) {
try {
update_compose_title_as_you_type = prefs.GetBoolPref("mail.update_compose_title_as_you_type");
}
catch (ex) {
dump("failed to get the mail.update_compose_title_as_you_type pref\n");
}
try { try {
other_header = prefs.CopyCharPref("mail.compose.other.header"); other_header = prefs.CopyCharPref("mail.compose.other.header");
} }
@ -176,7 +166,6 @@ g_charsetConvertManager = g_charsetConvertManager.QueryInterface(Components.inte
var msgWindowContractID = "@mozilla.org/messenger/msgwindow;1"; var msgWindowContractID = "@mozilla.org/messenger/msgwindow;1";
var msgWindow = Components.classes[msgWindowContractID].createInstance(); var msgWindow = Components.classes[msgWindowContractID].createInstance();
var defaultController = var defaultController =
{ {
supportsCommand: function(command) supportsCommand: function(command)
@ -223,7 +212,6 @@ var defaultController =
case "cmd_insertBreakAll": case "cmd_insertBreakAll":
//Format Menu //Format Menu
case "cmd_format":
case "cmd_decreaseFont": case "cmd_decreaseFont":
case "cmd_increaseFont": case "cmd_increaseFont":
case "cmd_bold": case "cmd_bold":
@ -284,7 +272,6 @@ var defaultController =
return false; return false;
} }
}, },
isCommandEnabled: function(command) isCommandEnabled: function(command)
{ {
//For some reason, when editor has the focus, focusedElement is null!. //For some reason, when editor has the focus, focusedElement is null!.
@ -317,7 +304,7 @@ var defaultController =
case "cmd_find": case "cmd_find":
case "cmd_findNext": case "cmd_findNext":
//Disable the editor specific edit commands if the focus is not into the body //Disable the editor specific edit commands if the focus is not into the body
return /*!focusedElement*/false; return !focusedElement;
case "cmd_account": case "cmd_account":
case "cmd_preferences": case "cmd_preferences":
return true; return true;
@ -341,7 +328,7 @@ var defaultController =
case "cmd_insertChars": case "cmd_insertChars":
case "cmd_insertBreak": case "cmd_insertBreak":
case "cmd_insertBreakAll": case "cmd_insertBreakAll":
return /*!focusedElement*/false; return !focusedElement;
//Options Menu //Options Menu
case "cmd_selectAddress": case "cmd_selectAddress":
@ -356,8 +343,6 @@ var defaultController =
return !composeHTML && !focusedElement; return !composeHTML && !focusedElement;
//Format Menu //Format Menu
case "cmd_format":
return !focusedElement;
case "cmd_decreaseFont": case "cmd_decreaseFont":
case "cmd_increaseFont": case "cmd_increaseFont":
case "cmd_bold": case "cmd_bold":
@ -404,7 +389,7 @@ var defaultController =
case "cmd_tableJoinCells": case "cmd_tableJoinCells":
case "cmd_tableSplitCell": case "cmd_tableSplitCell":
case "cmd_editTable": case "cmd_editTable":
return /*!focusedElement*/false; return !focusedElement;
default: default:
// dump("##MsgCompose: command " + command + " disabled!\n"); // dump("##MsgCompose: command " + command + " disabled!\n");
@ -471,110 +456,43 @@ function SetupCommandUpdateHandlers()
function CommandUpdate_MsgCompose() function CommandUpdate_MsgCompose()
{ {
// dump("\nCommandUpdate_MsgCompose\n"); window.setTimeout("updateComposeItems()", 0);
}
function updateComposeItems() {
try { try {
//File Menu
// goUpdateCommand("cmd_attachFile");
// goUpdateCommand("cmd_attachPage");
goUpdateCommand("cmd_close");
// goUpdateCommand("cmd_saveDefault");
// goUpdateCommand("cmd_saveAsFile");
// goUpdateCommand("cmd_saveAsDraft");
// goUpdateCommand("cmd_saveAsTemplate");
// goUpdateCommand("cmd_sendButton");
// goUpdateCommand("cmd_sendNow");
// goUpdateCommand("cmd_sendLater");
// goUpdateCommand("cmd_printSetup");
goUpdateCommand("cmd_print");
goUpdateCommand("cmd_quit");
//Edit Menu //Edit Menu
goUpdateCommand("cmd_pasteQuote");
goUpdateCommand("cmd_find");
goUpdateCommand("cmd_findNext");
// goUpdateCommand("cmd_account");
goUpdateCommand("cmd_preferences");
//View Menu
// goUpdateCommand("cmd_showComposeToolbar");
// goUpdateCommand("cmd_showFormatToolbar");
//Insert Menu //Insert Menu
if (msgCompose && msgCompose.composeHTML) if (msgCompose && msgCompose.composeHTML)
{ {
goUpdateCommand("cmd_insert"); goUpdateCommand("cmd_insert");
goUpdateCommand("cmd_link");
goUpdateCommand("cmd_anchor");
goUpdateCommand("cmd_image");
goUpdateCommand("cmd_hline");
goUpdateCommand("cmd_table");
goUpdateCommand("cmd_insertHTML");
goUpdateCommand("cmd_insertChars");
goUpdateCommand("cmd_insertBreak");
goUpdateCommand("cmd_insertBreakAll");
//Format Menu
goUpdateCommand("cmd_format");
goUpdateCommand("cmd_decreaseFont"); goUpdateCommand("cmd_decreaseFont");
goUpdateCommand("cmd_increaseFont"); goUpdateCommand("cmd_increaseFont");
goUpdateCommand("cmd_bold"); goUpdateCommand("cmd_bold");
goUpdateCommand("cmd_italic"); goUpdateCommand("cmd_italic");
goUpdateCommand("cmd_underline"); goUpdateCommand("cmd_underline");
goUpdateCommand("cmd_strikethrough");
goUpdateCommand("cmd_superscript");
goUpdateCommand("cmd_subscript");
goUpdateCommand("cmd_nobreak");
goUpdateCommand("cmd_em");
goUpdateCommand("cmd_strong");
goUpdateCommand("cmd_cite");
goUpdateCommand("cmd_abbr");
goUpdateCommand("cmd_acronym");
goUpdateCommand("cmd_code");
goUpdateCommand("cmd_samp");
goUpdateCommand("cmd_var");
goUpdateCommand("cmd_removeList");
goUpdateCommand("cmd_ul"); goUpdateCommand("cmd_ul");
goUpdateCommand("cmd_ol"); goUpdateCommand("cmd_ol");
goUpdateCommand("cmd_dt");
goUpdateCommand("cmd_dd");
goUpdateCommand("cmd_listProperties");
goUpdateCommand("cmd_indent"); goUpdateCommand("cmd_indent");
goUpdateCommand("cmd_outdent"); goUpdateCommand("cmd_outdent");
goUpdateCommand("cmd_align"); goUpdateCommand("cmd_align");
goUpdateCommand("cmd_smiley"); goUpdateCommand("cmd_smiley");
goUpdateCommand("cmd_objectProperties");
goUpdateCommand("cmd_InsertTable");
goUpdateCommand("cmd_InsertRowAbove");
goUpdateCommand("cmd_InsertRowBelow");
goUpdateCommand("cmd_InsertColumnBefore");
goUpdateCommand("cmd_InsertColumnAfter");
goUpdateCommand("cmd_SelectTable");
goUpdateCommand("cmd_SelectRow");
goUpdateCommand("cmd_SelectColumn");
goUpdateCommand("cmd_SelectCell");
goUpdateCommand("cmd_SelectAllCells");
goUpdateCommand("cmd_DeleteTable");
goUpdateCommand("cmd_DeleteRow");
goUpdateCommand("cmd_DeleteColumn");
goUpdateCommand("cmd_DeleteCell");
goUpdateCommand("cmd_DeleteCellContents");
goUpdateCommand("cmd_NormalizeTable");
goUpdateCommand("cmd_tableJoinCells");
goUpdateCommand("cmd_tableSplitCell");
goUpdateCommand("cmd_editTable");
} }
//Options Menu //Options Menu
// goUpdateCommand("cmd_selectAddress");
goUpdateCommand("cmd_spelling"); goUpdateCommand("cmd_spelling");
// goUpdateCommand("cmd_outputFormat");
// goUpdateCommand("cmd_quoteMessage");
// goUpdateCommand("cmd_rewrap");
} catch(e) {} } catch(e) {}
} }
function updateEditItems() {
goUpdateCommand("cmd_pasteQuote");
goUpdateCommand("cmd_find");
goUpdateCommand("cmd_findNext");
}
var messageComposeOfflineObserver = { var messageComposeOfflineObserver = {
Observe: function(subject, topic, state) { Observe: function(subject, topic, state) {
// sanity checks // sanity checks
@ -636,9 +554,9 @@ function AddDirectoryServerObserver(flag) {
} }
else else
{ {
var prefstring = "mail.identity." + currentIdentity.key + ".overrideGlobal_Pref"; var prefstring = "mail.identity." + gCurrentIdentity.key + ".overrideGlobal_Pref";
prefs.addObserver(prefstring, directoryServerObserver); prefs.addObserver(prefstring, directoryServerObserver);
prefstring = "mail.identity." + currentIdentity.key + ".directoryServer"; prefstring = "mail.identity." + gCurrentIdentity.key + ".directoryServer";
prefs.addObserver(prefstring, directoryServerObserver); prefs.addObserver(prefstring, directoryServerObserver);
} }
} }
@ -670,6 +588,7 @@ function RemoveDirectorySettingsObserver(prefstring)
function setupLdapAutocompleteSession() function setupLdapAutocompleteSession()
{ {
gSetupLdapAutocomplete = true;
var autocompleteLdap = false; var autocompleteLdap = false;
var autocompleteDirectory = null; var autocompleteDirectory = null;
var prevAutocompleteDirectory = currentAutocompleteDirectory; var prevAutocompleteDirectory = currentAutocompleteDirectory;
@ -684,8 +603,15 @@ function setupLdapAutocompleteSession()
dump("ERROR: " + ex + "\n"); dump("ERROR: " + ex + "\n");
} }
if(currentIdentity.overrideGlobalPref) { if(gCurrentIdentity.overrideGlobalPref) {
autocompleteDirectory = currentIdentity.directoryServer; autocompleteDirectory = gCurrentIdentity.directoryServer;
}
try {
if (!gLDAPSession)
gLDAPSession = Components.classes["@mozilla.org/autocompleteSession;1?type=ldap"].createInstance()
.QueryInterface(Components.interfaces.nsILDAPAutoCompleteSession);
} catch (ex) {
dump ("ERROR:" + ex + "\n");
} }
if (autocompleteDirectory && !isOffline) { if (autocompleteDirectory && !isOffline) {
// Add observer on the directory server we are autocompleting against // Add observer on the directory server we are autocompleting against
@ -700,12 +626,11 @@ function setupLdapAutocompleteSession()
} }
else else
AddDirectorySettingsObserver(); AddDirectorySettingsObserver();
if (gLDAPSession) {
if (ldapSession) {
if (!sessionAdded) { if (!sessionAdded) {
// add session for all the recipients // add session for all the recipients
for (var i=1; i <= MAX_RECIPIENTS; i++) for (var i=1; i <= MAX_RECIPIENTS; i++)
document.getElementById("msgRecipient#" + i).addSession(ldapSession); document.getElementById("msgRecipient#" + i).addSession(gLDAPSession);
sessionAdded = true; sessionAdded = true;
} }
var serverURL = Components.classes[ var serverURL = Components.classes[
@ -719,12 +644,12 @@ function setupLdapAutocompleteSession()
} catch (ex) { } catch (ex) {
dump("ERROR: " + ex + "\n"); dump("ERROR: " + ex + "\n");
} }
ldapSession.serverURL = serverURL; gLDAPSession.serverURL = serverURL;
// don't search on strings shorter than this // don't search on strings shorter than this
// //
try { try {
ldapSession.minStringLength = prefs.GetIntPref( gLDAPSession.minStringLength = prefs.GetIntPref(
autocompleteDirectory + ".autoComplete.minStringLength"); autocompleteDirectory + ".autoComplete.minStringLength");
} catch (ex) { } catch (ex) {
// if this pref isn't there, no big deal. just let // if this pref isn't there, no big deal. just let
@ -734,7 +659,7 @@ function setupLdapAutocompleteSession()
// override autocomplete entry formatting? // override autocomplete entry formatting?
// //
try { try {
ldapSession.outputFormat = gLDAPSession.outputFormat =
prefs.CopyUnicharPref(autocompleteDirectory + prefs.CopyUnicharPref(autocompleteDirectory +
".autoComplete.outputFormat"); ".autoComplete.outputFormat");
} catch (ex) { } catch (ex) {
@ -745,7 +670,7 @@ function setupLdapAutocompleteSession()
// override default search filter template? // override default search filter template?
// //
try { try {
ldapSession.filterTemplate = prefs.CopyUnicharPref( gLDAPSession.filterTemplate = prefs.CopyUnicharPref(
autocompleteDirectory + ".autoComplete.filterTemplate"); autocompleteDirectory + ".autoComplete.filterTemplate");
} catch (ex) { } catch (ex) {
// if this pref isn't there, no big deal. just let // if this pref isn't there, no big deal. just let
@ -759,7 +684,7 @@ function setupLdapAutocompleteSession()
// XXXdmose should really use .autocomplete.maxHits, // XXXdmose should really use .autocomplete.maxHits,
// but there's no UI for that yet // but there's no UI for that yet
// //
ldapSession.maxHits = gLDAPSession.maxHits =
prefs.GetIntPref(autocompleteDirectory + ".maxHits"); prefs.GetIntPref(autocompleteDirectory + ".maxHits");
} catch (ex) { } catch (ex) {
// if this pref isn't there, or is out of range, no big deal. // if this pref isn't there, or is out of range, no big deal.
@ -773,9 +698,9 @@ function setupLdapAutocompleteSession()
RemoveDirectorySettingsObserver(currentAutocompleteDirectory); RemoveDirectorySettingsObserver(currentAutocompleteDirectory);
currentAutocompleteDirectory = null; currentAutocompleteDirectory = null;
} }
if (ldapSession && sessionAdded) { if (gLDAPSession && sessionAdded) {
for (var i=1; i <= MAX_RECIPIENTS; i++) for (var i=1; i <= MAX_RECIPIENTS; i++)
document.getElementById("msgRecipient#" + i).removeSession(ldapSession); document.getElementById("msgRecipient#" + i).removeSession(gLDAPSession);
sessionAdded = false; sessionAdded = false;
} }
} }
@ -881,44 +806,33 @@ function GetArgs(originalData)
function ComposeFieldsReady(msgType) function ComposeFieldsReady(msgType)
{ {
//If we are in plain text, we nee to set the wrap column //If we are in plain text, we need to set the wrap column
if (! msgCompose.composeHTML) if (! msgCompose.composeHTML) {
try try {
{ window.editorShell.wrapColumn = msgCompose.wrapLength;
window.editorShell.wrapColumn = msgCompose.wrapLength; }
} catch (e) {
catch (e) dump("### window.editorShell.wrapColumn exception text: " + e + " - failed\n");
{ }
dump("### window.editorShell.wrapColumn exception text: " + e + " - failed\n"); }
} CompFields2Recipients(msgCompose.compFields, msgCompose.type);
AdjustFocus();
CompFields2Recipients(msgCompose.compFields, msgCompose.type);
setupLdapAutocompleteSession();
SetComposeWindowTitle(13);
AdjustFocus();
try {
window.updateCommands("create");
} catch(e) {}
} }
function ComposeStartup() function ComposeStartup()
{ {
dump("Compose: ComposeStartup\n");
var params = null; // New way to pass parameters to the compose window as a nsIMsgComposeParameters object var params = null; // New way to pass parameters to the compose window as a nsIMsgComposeParameters object
var args = null; // old way, parameters are passed as a string var args = null; // old way, parameters are passed as a string
if (window.arguments && window.arguments[0]) {
if (window.arguments && window.arguments[0])
{
try { try {
params = window.arguments[0].QueryInterface(Components.interfaces.nsIMsgComposeParams); params = window.arguments[0].QueryInterface(Components.interfaces.nsIMsgComposeParams);
} }
catch(ex){} catch(ex) {
if (params == null) }
args = GetArgs(window.arguments[0]); if (!params)
args = GetArgs(window.arguments[0]);
} }
//dump("fill in Identity menulist\n");
var identityList = document.getElementById("msgIdentity"); var identityList = document.getElementById("msgIdentity");
var identityListPopup = document.getElementById("msgIdentityPopup"); var identityListPopup = document.getElementById("msgIdentityPopup");
@ -926,15 +840,13 @@ function ComposeStartup()
fillIdentityListPopup(identityListPopup); fillIdentityListPopup(identityListPopup);
} }
if (!params) if (!params) {
{ // This code will go away soon as now arguments are passed to the window using a object of type nsMsgComposeParams instead of a string
/* This code will go away soon as now arguments are passed to the window using a object of type nsMsgComposeParams instead of a string */
params = Components.classes["@mozilla.org/messengercompose/composeparams;1"].createInstance(Components.interfaces.nsIMsgComposeParams); params = Components.classes["@mozilla.org/messengercompose/composeparams;1"].createInstance(Components.interfaces.nsIMsgComposeParams);
params.composeFields = Components.classes["@mozilla.org/messengercompose/composefields;1"].createInstance(Components.interfaces.nsIMsgCompFields); params.composeFields = Components.classes["@mozilla.org/messengercompose/composefields;1"].createInstance(Components.interfaces.nsIMsgCompFields);
if (args) //Convert old fashion arguments into params if (args) { //Convert old fashion arguments into params
{
var composeFields = params.composeFields; var composeFields = params.composeFields;
if (args.bodyislink == "true") if (args.bodyislink == "true")
params.bodyIsLink = true; params.bodyIsLink = true;
@ -965,7 +877,7 @@ function ComposeStartup()
} }
} }
if (params.identity == null) { if (!params.identity) {
// no pre selected identity, so use the default account // no pre selected identity, so use the default account
var identities = accountManager.defaultAccount.identities; var identities = accountManager.defaultAccount.identities;
if (identities.Count() >= 1) if (identities.Count() >= 1)
@ -986,7 +898,6 @@ function ComposeStartup()
} }
} }
LoadIdentity(true); LoadIdentity(true);
if (msgComposeService) if (msgComposeService)
{ {
msgCompose = msgComposeService.InitCompose(window, params); msgCompose = msgComposeService.InitCompose(window, params);
@ -1014,7 +925,6 @@ function ComposeStartup()
if (msgCompose.composeHTML) if (msgCompose.composeHTML)
{ {
window.editorShell.editorType = "htmlmail"; window.editorShell.editorType = "htmlmail";
// dump("editor initialized in HTML mode\n");
} }
else else
{ {
@ -1071,10 +981,7 @@ function ComposeStartup()
msgCompose.RegisterStateListener(stateListener); msgCompose.RegisterStateListener(stateListener);
// call updateCommands to disable while we're loading the page
try {
window.updateCommands("create");
} catch(e) {}
} }
} }
} }
@ -1098,34 +1005,36 @@ function ComposeLoad()
AddMessageComposeOfflineObserver(); AddMessageComposeOfflineObserver();
AddDirectoryServerObserver(true); AddDirectoryServerObserver(true);
if (msgComposeService) if (DEBUG && msgComposeService)
msgComposeService.TimeStamp("Start Initializing the compose window (ComposeLoad)", false); msgComposeService.TimeStamp("Start Initializing the compose window (ComposeLoad)", false);
gComposeMsgsBundle = document.getElementById("bundle_composeMsgs"); gComposeMsgsBundle = document.getElementById("bundle_composeMsgs");
try { try {
SetupCommandUpdateHandlers(); SetupCommandUpdateHandlers();
var wizardcallback = true; var wizardcallback = true;
var state = verifyAccounts(wizardcallback); // this will do migration, or create a new account if we need to. var state = verifyAccounts(wizardcallback); // this will do migration, or create a new account if we need to.
if (other_header != "") { if (other_header != "") {
var selectNode = document.getElementById('msgRecipientType#1'); var selectNode = document.getElementById('msgRecipientType#1');
selectNode = selectNode.childNodes[0]; selectNode = selectNode.childNodes[0];
var opt = document.createElement('menuitem'); var opt = document.createElement('menuitem');
opt.setAttribute("value", "addr_other"); opt.setAttribute("value", "addr_other");
opt.setAttribute("label", other_header + ":"); opt.setAttribute("label", other_header + ":");
selectNode.appendChild(opt); selectNode.appendChild(opt);
} }
if(state) if (state)
ComposeStartup(); ComposeStartup();
} }
catch (ex) { catch (ex) {
dump("###ERROR WHILE LOADING MESSAGE COMPOSE: " + ex + "\n");
var errorTitle = gComposeMsgsBundle.getString("initErrorDlogTitle"); var errorTitle = gComposeMsgsBundle.getString("initErrorDlogTitle");
var errorMsg = gComposeMsgsBundle.getFormattedString("initErrorDlogMessage", var errorMsg = gComposeMsgsBundle.getFormattedString("initErrorDlogMessage",
[ex]); [ex]);
if (promptService) if (!gPromptService) {
promptService.alert(window, errorTitle, errorMsg); gPromptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].getService();
gPromptService = gPromptService.QueryInterface(Components.interfaces.nsIPromptService);
}
if (gPromptService)
gPromptService.alert(window, errorTitle, errorMsg);
else else
window.alert(errorMsg); window.alert(errorMsg);
@ -1135,8 +1044,8 @@ function ComposeLoad()
window.close(); window.close();
return; return;
} }
window.tryToClose=ComposeCanClose; window.tryToClose=ComposeCanClose;
if (msgComposeService) if (DEBUG && msgComposeService)
msgComposeService.TimeStamp("Done with the initialization (ComposeLoad). Waiting on editor to load about::blank", false); msgComposeService.TimeStamp("Done with the initialization (ComposeLoad). Waiting on editor to load about::blank", false);
} }
@ -1145,7 +1054,7 @@ function ComposeUnload()
dump("\nComposeUnload from XUL\n"); dump("\nComposeUnload from XUL\n");
RemoveMessageComposeOfflineObserver(); RemoveMessageComposeOfflineObserver();
RemoveDirectoryServerObserver(null); RemoveDirectoryServerObserver(null);
RemoveDirectoryServerObserver("mail.identity." + currentIdentity.key); RemoveDirectoryServerObserver("mail.identity." + gCurrentIdentity.key);
if (currentAutocompleteDirectory) if (currentAutocompleteDirectory)
RemoveDirectorySettingsObserver(currentAutocompleteDirectory); RemoveDirectorySettingsObserver(currentAutocompleteDirectory);
msgCompose.UnregisterStateListener(stateListener); msgCompose.UnregisterStateListener(stateListener);
@ -1291,10 +1200,14 @@ function GenericSendMessage( msgType )
//Check if we have a subject, else ask user for confirmation //Check if we have a subject, else ask user for confirmation
if (subject == "") if (subject == "")
{ {
if (promptService) if (!gPromptService) {
gPromptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].getService();
gPromptService = gPromptService.QueryInterface(Components.interfaces.nsIPromptService);
}
if (gPromptService)
{ {
var result = {value:gComposeMsgsBundle.getString("defaultSubject")}; var result = {value:gComposeMsgsBundle.getString("defaultSubject")};
if (promptService.prompt( if (gPromptService.prompt(
window, window,
gComposeMsgsBundle.getString("subjectDlogTitle"), gComposeMsgsBundle.getString("subjectDlogTitle"),
gComposeMsgsBundle.getString("subjectDlogMessage"), gComposeMsgsBundle.getString("subjectDlogMessage"),
@ -1625,12 +1538,8 @@ function SetComposeWindowTitle(event)
{ {
/* dump("event = " + event + "\n"); */ /* dump("event = " + event + "\n"); */
/* only set the title when they hit return (or tab?) if /* only set the title when they hit return (or tab?)
mail.update_compose_title_as_you_type == false
*/ */
if ((event != 13) && (update_compose_title_as_you_type == false)) {
return;
}
var newTitle = document.getElementById('msgSubject').value; var newTitle = document.getElementById('msgSubject').value;
@ -1649,13 +1558,18 @@ function SetComposeWindowTitle(event)
// This is hooked up to the OS's window close widget (e.g., "X" for Windows) // This is hooked up to the OS's window close widget (e.g., "X" for Windows)
function ComposeCanClose() function ComposeCanClose()
{ {
if (!gPromptService) {
gPromptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].getService();
gPromptService = gPromptService.QueryInterface(Components.interfaces.nsIPromptService);
}
if (sendOrSaveOperationInProgress) if (sendOrSaveOperationInProgress)
{ {
if (promptService)
if (gPromptService)
{ {
var promptTitle = gComposeMsgsBundle.getString("quitComposeWindowTitle"); var promptTitle = gComposeMsgsBundle.getString("quitComposeWindowTitle");
var promptMsg = gComposeMsgsBundle.getString("quitComposeWindowMessage"); var promptMsg = gComposeMsgsBundle.getString("quitComposeWindowMessage");
if (promptService.confirm(window, promptTitle, promptMsg)) if (gPromptService.confirm(window, promptTitle, promptMsg))
{ {
msgCompose.abort(); msgCompose.abort();
return true; return true;
@ -1672,16 +1586,15 @@ function ComposeCanClose()
// call window.focus, since we need to pop up a dialog // call window.focus, since we need to pop up a dialog
// and therefore need to be visible (to prevent user confusion) // and therefore need to be visible (to prevent user confusion)
window.focus(); window.focus();
if (gPromptService)
if (promptService)
{ {
var result = {value:0}; var result = {value:0};
promptService.confirmEx(window, gPromptService.confirmEx(window,
gComposeMsgsBundle.getString("saveDlogTitle"), gComposeMsgsBundle.getString("saveDlogTitle"),
gComposeMsgsBundle.getString("saveDlogMessage"), gComposeMsgsBundle.getString("saveDlogMessage"),
(promptService.BUTTON_TITLE_SAVE * promptService.BUTTON_POS_0) + (gPromptService.BUTTON_TITLE_SAVE * gPromptService.BUTTON_POS_0) +
(promptService.BUTTON_TITLE_CANCEL * promptService.BUTTON_POS_1) + (gPromptService.BUTTON_TITLE_CANCEL * gPromptService.BUTTON_POS_1) +
(promptService.BUTTON_TITLE_DONT_SAVE * promptService.BUTTON_POS_2), (gPromptService.BUTTON_TITLE_DONT_SAVE * gPromptService.BUTTON_POS_2),
null, null, null, null, null, null,
null, {value:0}, result); null, {value:0}, result);
@ -1739,9 +1652,12 @@ function AttachFile()
dump("###ERROR ADDING DUPLICATE FILE \n"); dump("###ERROR ADDING DUPLICATE FILE \n");
var errorTitle = gComposeMsgsBundle.getString("DuplicateFileErrorDlogTitle"); var errorTitle = gComposeMsgsBundle.getString("DuplicateFileErrorDlogTitle");
var errorMsg = gComposeMsgsBundle.getString("DuplicateFileErrorDlogMessage"); var errorMsg = gComposeMsgsBundle.getString("DuplicateFileErrorDlogMessage");
if (!gPromptService) {
if (promptService) gPromptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].getService();
promptService.alert(window, errorTitle, errorMsg); gPromptService = gPromptService.QueryInterface(Components.interfaces.nsIPromptService);
}
if (gPromptService)
gPromptService.alert(window, errorTitle, errorMsg);
else else
window.alert(errorMsg); window.alert(errorMsg);
} }
@ -1776,10 +1692,15 @@ function AddAttachment(attachment, prettyName)
function AttachPage() function AttachPage()
{ {
if (promptService) if (!gPromptService) {
{ gPromptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].getService();
gPromptService = gPromptService.QueryInterface(Components.interfaces.nsIPromptService);
}
if (gPromptService)
{
var result = {value:"http://"}; var result = {value:"http://"};
if (promptService.prompt( if (gPromptService.prompt(
window, window,
gComposeMsgsBundle.getString("attachPageDlogTitle"), gComposeMsgsBundle.getString("attachPageDlogTitle"),
gComposeMsgsBundle.getString("attachPageDlogMessage"), gComposeMsgsBundle.getString("attachPageDlogMessage"),
@ -1789,7 +1710,7 @@ function AttachPage()
{ {
AddAttachment(result.value, null); AddAttachment(result.value, null);
} }
} }
} }
function DuplicateFileCheck(FileUrl) function DuplicateFileCheck(FileUrl)
{ {
@ -1972,12 +1893,12 @@ function DetermineConvertibility()
function LoadIdentity(startup) function LoadIdentity(startup)
{ {
var identityElement = document.getElementById("msgIdentity"); var identityElement = document.getElementById("msgIdentity");
var prevIdentity = currentIdentity; var prevIdentity = gCurrentIdentity;
if (identityElement) { if (identityElement) {
var item = identityElement.selectedItem; var item = identityElement.selectedItem;
var idKey = item.getAttribute('id'); var idKey = item.getAttribute('id');
currentIdentity = accountManager.getIdentity(idKey); gCurrentIdentity = accountManager.getIdentity(idKey);
if (!startup && prevIdentity && idKey != prevIdentity.key) if (!startup && prevIdentity && idKey != prevIdentity.key)
{ {
@ -1994,15 +1915,15 @@ function LoadIdentity(startup)
prevBcc += prevIdentity.bccList; prevBcc += prevIdentity.bccList;
} }
var newReplyTo = currentIdentity.replyTo; var newReplyTo = gCurrentIdentity.replyTo;
var newBcc = ""; var newBcc = "";
if (currentIdentity.bccSelf) if (gCurrentIdentity.bccSelf)
newBcc += currentIdentity.email; newBcc += gCurrentIdentity.email;
if (currentIdentity.bccOthers) if (gCurrentIdentity.bccOthers)
{ {
if (newBcc != "") if (newBcc != "")
newBcc += "," newBcc += ","
newBcc += currentIdentity.bccList; newBcc += gCurrentIdentity.bccList;
} }
var needToCleanUp = false; var needToCleanUp = false;
@ -2030,18 +1951,10 @@ function LoadIdentity(startup)
awCleanupRows(); awCleanupRows();
try { try {
msgCompose.SetSignature(currentIdentity); msgCompose.SetSignature(gCurrentIdentity);
} catch (ex) { dump("### Cannot set the signature: " + ex + "\n");} } catch (ex) { dump("### Cannot set the signature: " + ex + "\n");}
} }
//Setup autocomplete session, we can doit from here as it's use as a service
var session = Components.classes["@mozilla.org/autocompleteSession;1?type=addrbook"].getService(Components.interfaces.nsIAbAutoCompleteSession);
if (session)
{
var emailAddr = currentIdentity.email;
var start = emailAddr.lastIndexOf("@");
session.defaultDomain = emailAddr.slice(start + 1, emailAddr.length);
}
AddDirectoryServerObserver(false); AddDirectoryServerObserver(false);
if (!startup) if (!startup)
setupLdapAutocompleteSession(); setupLdapAutocompleteSession();
@ -2049,8 +1962,26 @@ function LoadIdentity(startup)
} }
function subjectKeyPress(event) function setupAutocomplete()
{ {
//Setup autocomplete session if we haven't done so already
if (!gAutocompleteSession) {
gAutocompleteSession = Components.classes["@mozilla.org/autocompleteSession;1?type=addrbook"].getService(Components.interfaces.nsIAbAutoCompleteSession);
if (gAutocompleteSession) {
var emailAddr = gCurrentIdentity.email;
var start = emailAddr.lastIndexOf("@");
gAutocompleteSession.defaultDomain = emailAddr.slice(start + 1, emailAddr.length);
}
else {
gAutocompleteSession = 1;
}
}
if (!gSetupLdapAutocomplete)
setupLdapAutocompleteSession();
}
function subjectKeyPress(event)
{
switch(event.keyCode) { switch(event.keyCode) {
case 9: case 9:
if (!event.shiftKey) { if (!event.shiftKey) {
@ -2103,9 +2034,12 @@ var attachmentBucketObserver = {
else { else {
var errorTitle = gComposeMsgsBundle.getString("DuplicateFileErrorDlogTitle"); var errorTitle = gComposeMsgsBundle.getString("DuplicateFileErrorDlogTitle");
var errorMsg = gComposeMsgsBundle.getString("DuplicateFileErrorDlogMessage"); var errorMsg = gComposeMsgsBundle.getString("DuplicateFileErrorDlogMessage");
if (!gPromptService) {
if (promptService) gPromptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].getService();
promptService.alert(window, errorTitle, errorMsg); gPromptService = gPromptService.QueryInterface(Components.interfaces.nsIPromptService);
}
if (gPromptService)
gPromptService.alert(window, errorTitle, errorMsg);
else else
window.alert(errorMsg); window.alert(errorMsg);
} }
@ -2149,7 +2083,7 @@ function GetMsgFolderFromUri(uri)
function DisplaySaveFolderDlg(folderURI) function DisplaySaveFolderDlg(folderURI)
{ {
try{ try{
showDialog = currentIdentity.showSaveMsgDlg; showDialog = gCurrentIdentity.showSaveMsgDlg;
}//try }//try
catch (e){ catch (e){
return; return;
@ -2166,13 +2100,16 @@ function DisplaySaveFolderDlg(folderURI)
msgfolder.hostname]); msgfolder.hostname]);
var CheckMsg = gComposeMsgsBundle.getString("CheckMsg"); var CheckMsg = gComposeMsgsBundle.getString("CheckMsg");
if (!gPromptService) {
if (promptService) gPromptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].getService();
promptService.alertCheck(window, SaveDlgTitle, dlgMsg, CheckMsg, checkbox); gPromptService = gPromptService.QueryInterface(Components.interfaces.nsIPromptService);
}
if (gPromptService)
gPromptService.alertCheck(window, SaveDlgTitle, dlgMsg, CheckMsg, checkbox);
else else
window.alert(dlgMsg); window.alert(dlgMsg);
try { try {
currentIdentity.showSaveMsgDlg = !checkbox.value; gCurrentIdentity.showSaveMsgDlg = !checkbox.value;
}//try }//try
catch (e) { catch (e) {
return; return;

Просмотреть файл

@ -62,6 +62,7 @@ Rights Reserved.
type="autocomplete" allowevents="true" flex="1" type="autocomplete" allowevents="true" flex="1"
searchSessions="addrbook" timeout="300" maxrows="4" autoFill="true" searchSessions="addrbook" timeout="300" maxrows="4" autoFill="true"
ontextcommand="awRecipientTextCommand(userAction, this)" ontextcommand="awRecipientTextCommand(userAction, this)"
oninput="setupAutocomplete();"
onkeypress="awRecipientKeyPress(event, this)" onkeypress="awRecipientKeyPress(event, this)"
onkeydown="awRecipientKeyDown(event, this)"> onkeydown="awRecipientKeyDown(event, this)">
<image onclick="awNotAnEmptyArea(event)" class="person-icon"/> <image onclick="awNotAnEmptyArea(event)" class="person-icon"/>

Просмотреть файл

@ -67,22 +67,17 @@
<script type="application/x-javascript" src="chrome://messenger/content/widgetglue.js"/> <script type="application/x-javascript" src="chrome://messenger/content/widgetglue.js"/>
<script type="application/x-javascript" src="chrome://messenger/content/mail-offline.js"/> <script type="application/x-javascript" src="chrome://messenger/content/mail-offline.js"/>
<script type="application/x-javascript" src="chrome://editor/content/editor.js"/> <script type="application/x-javascript" src="chrome://editor/content/editor.js"/>
<script type="application/x-javascript" src="chrome://editor/content/ComposerCommands.js"/>
<script type="application/x-javascript" src="chrome://editor/content/EditorCommandsDebug.js"/>
<script type="application/x-javascript" src="chrome://messenger/content/messengercompose/MsgComposeCommands.js"/> <script type="application/x-javascript" src="chrome://messenger/content/messengercompose/MsgComposeCommands.js"/>
<!-- drag and drop --> <!-- drag and drop -->
<script type="application/x-javascript" src="chrome://global/content/nsDragAndDrop.js"/> <script type="application/x-javascript" src="chrome://global/content/nsDragAndDrop.js"/>
<script type="application/x-javascript" src="chrome://global/content/nsJSSupportsUtils.js"/>
<script type="application/x-javascript" src="chrome://global/content/nsJSComponentManager.js"/>
<script type="application/x-javascript" src="chrome://global/content/nsTransferable.js"/> <script type="application/x-javascript" src="chrome://global/content/nsTransferable.js"/>
<commandset id="composeCommands"> <commandset id="composeCommands">
<commandset id="msgComposeCommandUpdate" <commandset id="msgComposeCommandUpdate"
commandupdater="true" commandupdater="true"
events="focus" events="focus"
oncommandupdate="CommandUpdate_MsgCompose()" oncommandupdate="CommandUpdate_MsgCompose()"/>
/>
<commandset id="globalEditMenuItems"/> <commandset id="globalEditMenuItems"/>
<commandset id="selectEditMenuItems"/> <commandset id="selectEditMenuItems"/>
@ -130,78 +125,15 @@
<command id="cmd_outputFormat" oncommand="OutputFormatMenuSelect(event.target)"/> <command id="cmd_outputFormat" oncommand="OutputFormatMenuSelect(event.target)"/>
<!-- command id="cmd_quoteMessage" oncommand="goDoCommand('cmd_quoteMessage')"/ --> <!-- command id="cmd_quoteMessage" oncommand="goDoCommand('cmd_quoteMessage')"/ -->
<command id="cmd_rewrap" oncommand="goDoCommand('cmd_rewrap')"/> <command id="cmd_rewrap" oncommand="goDoCommand('cmd_rewrap')"/>
<command id="cmd_insert"/>
</commandset> </commandset>
<broadcasterset id="composeBroadcasters"> <broadcasterset id="composeBroadcasters">
<!-- Insert Menu -->
<broadcaster id="cmd_insert"/>
<!--broadcaster id="cmd_link"/-->
<!--broadcaster id="cmd_anchor"/-->
<!--broadcaster id="cmd_image"/-->
<!--broadcaster id="cmd_hline"/-->
<!--broadcaster id="cmd_table"/-->
<!--broadcaster id="cmd_insertHTML"/-->
<!--broadcaster id="cmd_insertChars"/-->
<!--broadcaster id="cmd_insertBreak"/-->
<!--broadcaster id="cmd_insertBreakAll"/-->
<!-- Format Menu -->
<broadcaster id="cmd_format"/>
<!--broadcaster id="cmd_decreaseFont"/-->
<!--broadcaster id="cmd_increaseFont"/-->
<!--broadcaster id="cmd_bold"/-->
<!--broadcaster id="cmd_italic"/-->
<!--broadcaster id="cmd_underline"/-->
<!--broadcaster id="cmd_strikethrough"/-->
<!--broadcaster id="cmd_superscript"/-->
<!--broadcaster id="cmd_subscript"/-->
<!--broadcaster id="cmd_nobreak"/-->
<!--broadcaster id="cmd_em"/-->
<!--broadcaster id="cmd_strong"/-->
<!--broadcaster id="cmd_cite"/-->
<!--broadcaster id="cmd_abbr"/-->
<!--broadcaster id="cmd_acronym"/-->
<!--broadcaster id="cmd_code"/-->
<!--broadcaster id="cmd_samp"/-->
<!--broadcaster id="cmd_var"/-->
<!--broadcaster id="cmd_removeList"/-->
<!--broadcaster id="cmd_ul"/-->
<!--broadcaster id="cmd_ol"/-->
<!--broadcaster id="cmd_dt"/-->
<!--broadcaster id="cmd_dd"/-->
<!--broadcaster id="cmd_listProperties"/-->
<!--broadcaster id="cmd_indent"/-->
<!--broadcaster id="cmd_outdent"/-->
<!--broadcaster id="cmd_objectProperties"/-->
<!--broadcaster id="cmd_InsertTable"/-->
<!--broadcaster id="cmd_InsertRowAbove"/-->
<!--broadcaster id="cmd_InsertRowBelow"/-->
<!--broadcaster id="cmd_InsertColumnBefore"/-->
<!--broadcaster id="cmd_InsertColumnAfter"/-->
<!--broadcaster id="cmd_SelectTable"/-->
<!--broadcaster id="cmd_SelectRow"/-->
<!--broadcaster id="cmd_SelectColumn"/-->
<!--broadcaster id="cmd_SelectCell"/-->
<!--broadcaster id="cmd_SelectAllCells"/-->
<!--broadcaster id="cmd_DeleteTable"/-->
<!--broadcaster id="cmd_DeleteRow"/-->
<!--broadcaster id="cmd_DeleteColumn"/-->
<!--broadcaster id="cmd_DeleteCell"/-->
<!--broadcaster id="cmd_DeleteCellContents"/-->
<!--broadcaster id="cmd_NormalizeTable"/-->
<!--broadcaster id="cmd_tableJoinCells"/-->
<!--broadcaster id="cmd_tableSplitCell"/-->
<!--broadcaster id="cmd_editTable"/-->
<broadcaster id="Editor:Throbber" busy="false"/> <broadcaster id="Editor:Throbber" busy="false"/>
<broadcaster id="Communicator:WorkMode"/> <broadcaster id="Communicator:WorkMode"/>
<broadcaster id="args" value="editorType=default"/>
</broadcasterset> </broadcasterset>
<broadcaster id="args" value="editorType=default"/>
<popupset> <popupset>
<popup id="TextColorPopup"/> <popup id="TextColorPopup"/>
<popup id="BackColorPopup"/> <popup id="BackColorPopup"/>
@ -228,12 +160,12 @@
<key id="pastequotationkb"/> <key id="pastequotationkb"/>
<key id="key_delete"/> <key id="key_delete"/>
<key id="key_selectAll"/> <key id="key_selectAll"/>
<key id="key_find" key="&findCmd.key;" observes="cmd_find" modifiers="accel"/> <key id="key_find" key="&findCmd.key;" command="cmd_find" modifiers="accel"/>
<key id="key_findNext" key="&findAgainCmd.key;" observes="cmd_findNext" modifiers="accel"/> <key id="key_findNext" key="&findAgainCmd.key;" command="cmd_findNext" modifiers="accel"/>
<!-- Options Menu --> <!-- Options Menu -->
<!-- key id="key_selectAddresses" xulkey="true" key="&selectAddressCmd.key;" command="cmd_selectAddress"/ --> <!-- key id="key_selectAddresses" xulkey="true" key="&selectAddressCmd.key;" command="cmd_selectAddress"/ -->
<key id="key_checkspelling" key="&checkSpellingCmd.key;" observes="cmd_spelling" modifiers="accel"/> <key id="key_checkspelling" key="&checkSpellingCmd.key;" command="cmd_spelling" modifiers="accel"/>
</keyset> </keyset>
<keyset id="editorKeys"/> <keyset id="editorKeys"/>
@ -278,7 +210,7 @@
</menupopup> </menupopup>
</menu> </menu>
<menu id="menu_Edit"> <menu id="menu_Edit">
<menupopup> <menupopup oncreate="updateEditItems();">
<menuitem id="menu_undo"/> <menuitem id="menu_undo"/>
<menuitem id="menu_redo"/> <menuitem id="menu_redo"/>
<menuseparator/> <menuseparator/>
@ -290,8 +222,8 @@
<menuseparator/> <menuseparator/>
<menuitem id="menu_selectAll"/> <menuitem id="menu_selectAll"/>
<menuseparator/> <menuseparator/>
<menuitem label="&findCmd.label;" key="key_find" accesskey="&findCmd.accesskey;" observes="cmd_find"/> <menuitem label="&findCmd.label;" key="key_find" accesskey="&findCmd.accesskey;" command="cmd_find"/>
<menuitem label="&findAgainCmd.label;" key="key_findNext" accesskey="&findAgainCmd.accesskey;" observes="cmd_findNext"/> <menuitem label="&findAgainCmd.label;" key="key_findNext" accesskey="&findAgainCmd.accesskey;" command="cmd_findNext"/>
<menuseparator/> <menuseparator/>
<menuitem label="&accountManagerCmd.label;" accesskey="&accountManagerCmd.accesskey;" command="cmd_account"/> <menuitem label="&accountManagerCmd.label;" accesskey="&accountManagerCmd.accesskey;" command="cmd_account"/>
<menuitem id="menu_preferences" oncommand="goDoCommand('cmd_preferences')"/> <menuitem id="menu_preferences" oncommand="goDoCommand('cmd_preferences')"/>
@ -322,9 +254,9 @@
</menupopup> </menupopup>
</menu> </menu>
<menu id="insertMenu" observes="cmd_insert"/> <menu id="insertMenu" command="cmd_insert"/>
<menu id="formatMenu" label="&formatMenu.label;" accesskey="&formatMenu.accesskey;" observes="cmd_format"> <menu id="formatMenu" label="&formatMenu.label;" accesskey="&formatMenu.accesskey;" command="cmd_insert">
<menupopup id="formatMenuPopup"> <menupopup id="formatMenuPopup">
<menu id="tableMenu"/> <menu id="tableMenu"/>
<menuseparator/> <menuseparator/>
@ -336,7 +268,7 @@
<menu label="&optionsMenu.label;" accesskey="&optionsMenu.accesskey;"> <menu label="&optionsMenu.label;" accesskey="&optionsMenu.accesskey;">
<menupopup> <menupopup>
<menuitem label="&selectAddressCmd.label;" accesskey="&selectAddressCmd.accesskey;" command="cmd_selectAddress"/> <menuitem label="&selectAddressCmd.label;" accesskey="&selectAddressCmd.accesskey;" command="cmd_selectAddress"/>
<menuitem label="&checkSpellingCmd.label;" id="menu_checkspelling" accesskey="&checkSpellingCmd.accesskey;" key="key_checkspelling" observes="cmd_spelling"/> <menuitem label="&checkSpellingCmd.label;" id="menu_checkspelling" accesskey="&checkSpellingCmd.accesskey;" key="key_checkspelling" command="cmd_spelling"/>
<!--menuitem label="&quoteOrigCmd.label;" accesskey="&quoteOrigCmd.accesskey;" command="cmd_quoteMessage"/--> <!--menuitem label="&quoteOrigCmd.label;" accesskey="&quoteOrigCmd.accesskey;" command="cmd_quoteMessage"/-->
<menuitem label="&editRewrapCmd.label;" accesskey="&editRewrapCmd.accesskey;" command="cmd_rewrap" oncommand="editorShell.Rewrap(false)"/> <menuitem label="&editRewrapCmd.label;" accesskey="&editRewrapCmd.accesskey;" command="cmd_rewrap" oncommand="editorShell.Rewrap(false)"/>
<menuseparator/> <menuseparator/>
@ -438,7 +370,7 @@
command="cmd_attachFile"/> command="cmd_attachFile"/>
<button class="button-toolbar-2 top" <button class="button-toolbar-2 top"
id="spellingButton" label="&spellingButton.label;" id="spellingButton" label="&spellingButton.label;"
observes="cmd_spelling"/> command="cmd_spelling"/>
<toolbarseparator class="toolbarseparator-primary"/> <toolbarseparator class="toolbarseparator-primary"/>
<button class="button-toolbar-2 top" <button class="button-toolbar-2 top"
id="button-save" label="&saveButton.label;" id="button-save" label="&saveButton.label;"

Просмотреть файл

@ -1,5 +1,5 @@
<!--LOCALIZATION NOTE messengercompose.dtd Main UI for message composition --> <!--LOCALIZATION NOTE messengercompose.dtd Main UI for message composition -->
<!ENTITY msgComposeWindow.title "Message Compose"> <!ENTITY msgComposeWindow.title "Compose: (no subject)">
<!ENTITY fromAddr.label "From:"> <!ENTITY fromAddr.label "From:">
<!ENTITY subject.label "Subject:"> <!ENTITY subject.label "Subject:">