Supplementary patch to bug 232452 to move the unsent message check to a function called after the window has fully opened r/sr=bienvenu

This commit is contained in:
neil%parkwaycc.co.uk 2004-03-05 16:15:37 +00:00
Родитель 42ef3160d4
Коммит 8cf69f8955
1 изменённых файлов: 24 добавлений и 24 удалений

Просмотреть файл

@ -665,30 +665,6 @@ 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();
}
@ -819,6 +795,30 @@ function loadStartFolder(initialUri)
}
MsgGetMessagesForAllServers(defaultServer);
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();
}
}
}
}
function TriggerGetMessages(server)