Eliminate progress dialog flash saving draft while closing window r+sr=bienvenu
authorNeil Rashbrook <neil@parkwaycc.co.uk>
Fri, 30 Jan 2009 00:23:32 +0000
changeset 1795 6da4fcb1f5559b3cb5b37ca18e62a0299aef87f9
parent 1794 36e0e9b4396208a4b3e591e259d576541f0830ef
child 1796 f28e295d14fb32d3268a5f1c1da2f45d7fc079ec
push idunknown
push userunknown
push dateunknown
Eliminate progress dialog flash saving draft while closing window r+sr=bienvenu
mail/components/compose/content/MsgComposeCommands.js
mailnews/compose/resources/content/MsgComposeCommands.js
--- a/mail/components/compose/content/MsgComposeCommands.js
+++ b/mail/components/compose/content/MsgComposeCommands.js
@@ -2378,17 +2378,17 @@ function ComposeCanClose()
                               (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
           gCloseWindowAfterSave = true;
-          SaveAsDraft();
+          GenericSendMessage(nsIMsgCompDeliverMode.AutoSaveAsDraft);
           return false;
         case 1: //Cancel
           return false;
         case 2: //Don't Save
           // don't delete the draft if we didn't start off editing a draft
           // and the user hasn't explicitly saved it.
           if (!gEditingDraft && gAutoSaveKickedIn)
             RemoveDraft();
--- a/mailnews/compose/resources/content/MsgComposeCommands.js
+++ b/mailnews/compose/resources/content/MsgComposeCommands.js
@@ -2397,17 +2397,17 @@ function ComposeCanClose()
                               null, {value:0});
       switch (result)
       {
         case 0: //Save
           // we can close immediately if we already autosaved the draft
           if (!gContentChanged && !gMsgCompose.bodyModified)
             break;
           gCloseWindowAfterSave = true;
-          SaveAsDraft();
+          GenericSendMessage(nsIMsgCompDeliverMode.AutoSaveAsDraft);
           return false;
         case 1: //Cancel
           return false;
         case 2: //Don't Save
           // only delete the draft if we didn't start off editing a draft
           if (!gEditingDraft && gAutoSaveKickedIn)
             RemoveDraft();            
           break;