зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
42ef3160d4
Коммит
8cf69f8955
|
@ -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)
|
||||
|
|
Загрузка…
Ссылка в новой задаче