rem: if (LastToClose()) NotifyQuitApplication(); 
context: function ComposeCanClose(){  if (gSendOrSaveOperationInProgress)  {    var result;    if (gPromptService)    {      var promptTitle = sComposeMsgsBundle.getString("quitComposeWindowTitle");      var promptMsg = sComposeMsgsBundle.getString("quitComposeWindowMessage");      var quitButtonLabel = sComposeMsgsBundle.getString("quitComposeWindowQuitButtonLabel");      var waitButtonLabel = sComposeMsgsBundle.getString("quitComposeWindowWaitButtonLabel");      result = gPromptService.confirmEx(window, promptTitle, promptMsg,          (gPromptService.BUTTON_TITLE_IS_STRING*gPromptService.BUTTON_POS_0) +          (gPromptService.BUTTON_TITLE_IS_STRING*gPromptService.BUTTON_POS_1),          waitButtonLabel, quitButtonLabel, null, null, {value:0});      if (result == 1)      {        gMsgCompose.abort();        return true;      }      return false;    }  }  dump("XXX changed? " + gContentChanged + "," + gMsgCompose.bodyModified + "\n");  // Returns FALSE only if user cancels save action  if (gContentChanged || gMsgCompose.bodyModified)  {    // call window.focus, since we need to pop up a dialog    // and therefore need to be visible (to prevent user confusion)    window.focus();    if (gPromptService)    {      result = gPromptService.confirmEx(window,                              sComposeMsgsBundle.getString("saveDlogTitle"),                              sComposeMsgsBundle.getString("saveDlogMessage"),                              (gPromptService.BUTTON_TITLE_SAVE * gPromptService.BUTTON_POS_0) +                              (gPromptService.BUTTON_TITLE_CANCEL * gPromptService.BUTTON_POS_1) +                              (gPromptService.BUTTON_TITLE_DONT_SAVE * gPromptService.BUTTON_POS_2),                              null, null, null,                              null, {value:0});      switch (result)      {        case 0: //Save          if (LastToClose())          NotifyQuitApplication();          gCloseWindowAfterSave = true;          SaveAsDraft();          return false;        case 1: //Cancel          return false;        case 2: //Don't Save          break;      }    }    SetContentAndBodyAsUnmodified();  }  return true;}
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8395/16b4006118c41162a8d147cb871dba5772d95bb0/MsgComposeCommands.js/buggy/mailnews/compose/resources/content/MsgComposeCommands.js