mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-05 00:25:27 +00:00
make starting up mail with unsent messages to send prompt the user, sr=mscott 232516
This commit is contained in:
parent
86ffc7a929
commit
c3e6c29441
@ -150,13 +150,8 @@ var folderListener = {
|
||||
if (gRerootOnFolderLoad)
|
||||
RerootFolder(uri, msgFolder, gCurrentLoadingFolderViewType, gCurrentLoadingFolderViewFlags, gCurrentLoadingFolderSortType, gCurrentLoadingFolderSortOrder);
|
||||
|
||||
var db = msgFolder.getMsgDatabase(msgWindow);
|
||||
if (db)
|
||||
db.resetHdrCacheSize(100);
|
||||
|
||||
if (gDBView) {
|
||||
if (gDBView)
|
||||
gDBView.suppressCommandUpdating = false;
|
||||
}
|
||||
|
||||
gIsEditableMsgFolder = IsSpecialFolder(msgFolder, MSG_FOLDER_FLAG_DRAFTS);
|
||||
|
||||
@ -673,6 +668,29 @@ function OnLoadMessenger()
|
||||
messengerBox.setAttribute("width","500px");
|
||||
}
|
||||
|
||||
if (CheckForUnsentMessages())
|
||||
{
|
||||
var ioService = Components.classes["@mozilla.org/network/io-service;1"].getService(Components.interfaces.nsIIOService);
|
||||
if (!ioService.offline)
|
||||
{
|
||||
InitPrompts();
|
||||
InitServices();
|
||||
|
||||
if (gPromptService)
|
||||
{
|
||||
var buttonPressed = gPromptService.confirmEx(window,
|
||||
gOfflinePromptsBundle.getString('sendMessagesOfflineWindowTitle'),
|
||||
gOfflinePromptsBundle.getString('sendMessagesLabel'),
|
||||
gPromptService.BUTTON_TITLE_IS_STRING * (gPromptService.BUTTON_POS_0 +
|
||||
gPromptService.BUTTON_POS_1),
|
||||
gOfflinePromptsBundle.getString('sendMessagesSendButtonLabel'),
|
||||
gOfflinePromptsBundle.getString('sendMessagesNoSendButtonLabel'),
|
||||
null, null, {value:0});
|
||||
if (buttonPressed == 0)
|
||||
SendUnsentMessages();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Set focus to the Thread Pane the first time the window is opened.
|
||||
SetFocusThreadPane();
|
||||
|
@ -42,7 +42,7 @@ sendMessagesWindowTitle=Work Online
|
||||
|
||||
# LOCALIZATION NOTE :
|
||||
# do not localize "\n". use "\n" to make the text fit nicely in the dialog.
|
||||
sendMessagesLabel=Would you like to send the messages \nin your Unsent Messages folder once you are online?\n\n
|
||||
sendMessagesLabel=Would you like to send the messages \nin your Unsent Messages folder?\n\n
|
||||
sendMessagesCheckboxLabel=Always ask me when I go online
|
||||
sendMessagesSendButtonLabel=Send
|
||||
sendMessagesNoSendButtonLabel=Don't Send
|
||||
|
Loading…
Reference in New Issue
Block a user