rem: windowLocked = false; 
add: gWindowLocked = false; 
context: function GenericSendMessage( msgType ){	dump("GenericSendMessage from XUL\n");  dump("Identity = " + getCurrentIdentity() + "\n");	if (msgCompose != null)	{	    var msgCompFields = msgCompose.compFields;	    if (msgCompFields)	    {			Recipients2CompFields(msgCompFields);			var subject = document.getElementById("msgSubject").value;			msgCompFields.subject = subject;			dump("attachments = " + GenerateAttachmentsString() + "\n");			try {				msgCompFields.attachments = GenerateAttachmentsString();			}			catch (ex) {				dump("failed to SetAttachments\n");			}			if (msgType == msgCompDeliverMode.Now || msgType == msgCompDeliverMode.Later)			{			  //Do we need to check the spelling?        if (prefs.GetBoolPref("mail.SpellCheckBeforeSend"))	        goDoCommand('cmd_spelling');				//Check if we have a subject, else ask user for confirmation				if (subject == "")				{				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")};        				if (gPromptService.prompt(        					window,        					gComposeMsgsBundle.getString("subjectDlogTitle"),        					gComposeMsgsBundle.getString("subjectDlogMessage"),                            result,        					null,        					{value:0}        					))        				{        					msgCompFields.subject = result.value;        					var subjectInputElem = document.getElementById("msgSubject");        					subjectInputElem.value = result.value;        				}        				else        				  return;        			}    			}				// Before sending the message, check what to do with HTML message, eventually abort.        var convert = DetermineConvertibility();        var action = DetermineHTMLAction(convert);        if (action == msgCompSendFormat.AskUser)				{                    var recommAction = convert == msgCompConvertible.No                                   ? msgCompSendFormat.AskUser                                   : msgCompSendFormat.PlainText;                    var result2 = {action:recommAction,                                  convertible:convert,                                  abort:false};                    window.openDialog("chrome://messenger/content/messengercompose/askSendFormat.xul",                                      "askSendFormatDialog", "chrome,modal,titlebar,centerscreen",                                      result2);					if (result2.abort)						return;					action = result2.action;				}				switch (action)				{					case msgCompSendFormat.PlainText:						msgCompFields.forcePlainText = true;						msgCompFields.useMultipartAlternative = false;						break;					case msgCompSendFormat.HTML:						msgCompFields.forcePlainText = false;						msgCompFields.useMultipartAlternative = false;						break;					case msgCompSendFormat.Both:						msgCompFields.forcePlainText = false;						msgCompFields.useMultipartAlternative = true;						break;				   default: dump("\###SendMessage Error: invalid action value\n"); return;				}			}			try {        windowLocked = true;        CommandUpdate_MsgCompose();        disableEditableFields();        var progress = Components.classes["@mozilla.org/messenger/progress;1"].createInstance(Components.interfaces.nsIMsgProgress);        if (progress)        {          progress.registerListener(progressListener);          sendOrSaveOperationInProgress = true;        }				msgCompose.SendMsg(msgType, getCurrentIdentity(), progress);			}			catch (ex) {        dump("failed to SendMsg: " + ex + "\n");        windowLocked = false;        enableEditableFields();        CommandUpdate_MsgCompose();			}		}	}	else		dump("###SendMessage Error: composeAppCore is null!\n");}
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/27a0a07af2dca4bee515185aa04f28775138001f/MsgComposeCommands.js/clean/mailnews/compose/resources/content/MsgComposeCommands.js