mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 03:15:11 +00:00
Bug 274280: preference for sending unsent messages disregarded on startup: always asks, patch by Magnus Melin <mkmelin+mozilla@iki.fi>, r+sr=bienvenu
This commit is contained in:
parent
3ad309b247
commit
02228dfc50
@ -996,19 +996,22 @@ function loadStartFolder(initialUri)
|
||||
InitPrompts();
|
||||
InitServices();
|
||||
|
||||
if (gPromptService)
|
||||
var sendUnsentWhenGoingOnlinePref = pref.getIntPref("offline.send.unsent_messages");
|
||||
if(gPromptService && sendUnsentWhenGoingOnlinePref == 0) // pref is "ask"
|
||||
{
|
||||
var buttonPressed = gPromptService.confirmEx(window,
|
||||
gOfflinePromptsBundle.getString('sendMessagesOfflineWindowTitle'),
|
||||
gOfflinePromptsBundle.getString('sendMessagesLabel'),
|
||||
gPromptService.BUTTON_TITLE_IS_STRING * (gPromptService.BUTTON_POS_0 +
|
||||
gPromptService.BUTTON_POS_1),
|
||||
gPromptService.BUTTON_POS_1),
|
||||
gOfflinePromptsBundle.getString('sendMessagesSendButtonLabel'),
|
||||
gOfflinePromptsBundle.getString('sendMessagesNoSendButtonLabel'),
|
||||
null, null, {value:0});
|
||||
if (buttonPressed == 0)
|
||||
if (buttonPressed == 0)
|
||||
SendUnsentMessages();
|
||||
}
|
||||
else if(sendUnsentWhenGoingOnlinePref == 1) // pref is "yes"
|
||||
SendUnsentMessages();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -862,7 +862,8 @@ function loadStartFolder(initialUri)
|
||||
InitPrompts();
|
||||
InitServices();
|
||||
|
||||
if (gPromptService)
|
||||
var sendUnsentWhenGoingOnlinePref = pref.getIntPref("offline.send.unsent_messages");
|
||||
if(gPromptService && sendUnsentWhenGoingOnlinePref == 0) // pref is "ask"
|
||||
{
|
||||
var buttonPressed = gPromptService.confirmEx(window,
|
||||
gOfflinePromptsBundle.getString('sendMessagesOfflineWindowTitle'),
|
||||
@ -872,9 +873,11 @@ function loadStartFolder(initialUri)
|
||||
gOfflinePromptsBundle.getString('sendMessagesSendButtonLabel'),
|
||||
gOfflinePromptsBundle.getString('sendMessagesNoSendButtonLabel'),
|
||||
null, null, {value:0});
|
||||
if (buttonPressed == 0)
|
||||
if (buttonPressed == 0)
|
||||
SendUnsentMessages();
|
||||
}
|
||||
else if(sendUnsentWhenGoingOnlinePref == 1) // pref is "yes"
|
||||
SendUnsentMessages();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user