rem: switch (result.value) { case 0: if (LastToClose()) NotifyQuitApplication(); gCloseWindowAfterSave = true; SaveAsDraft(); return false; case 1: return false; case 2: break; } 
add: case 0: if (LastToClose()) NotifyQuitApplication(); gCloseWindowAfterSave = true; SaveAsDraft(); return false; case 1: return false; case 2: break; 
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 = {value:0};        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}, result);        if (result.value == 1)          {            gMsgCompose.abort();            return true;          }        else           {            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 = {value:0};            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}, result);      if (result)      {        switch (result.value)        {          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/c3b4db921a0ab444658a6af9e53ee67d1ebea5a0/MsgComposeCommands.js/buggy/mailnews/compose/resources/content/MsgComposeCommands.js