mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-07 15:12:28 +00:00
fix confirmEx api's (smoketest blocker bug 135672), r=ccarlen, sr=kin, a=leaf
This commit is contained in:
parent
fb28b6190a
commit
fd10559242
@ -1102,14 +1102,14 @@ var gEditorOutputProgressListener =
|
||||
if (!promptServ)
|
||||
return;
|
||||
|
||||
outButtonPressed = promptServ.confirmEx(window, dlgTitle, text, nsIPromptService.STD_OK_CANCEL_BUTTONS,
|
||||
promptServ.confirmEx(window, dlgTitle, text, nsIPromptService.STD_OK_CANCEL_BUTTONS,
|
||||
"", "", "", checkBoxLabel, checkObj);
|
||||
},
|
||||
confirmEx : function(dlgTitle, text, btnFlags, btn0Title, btn1Title, btn2Title, checkBoxLabel, checkVal)
|
||||
{
|
||||
var promptServ = GetPromptService();
|
||||
if (!promptServ)
|
||||
return;
|
||||
return 0;
|
||||
|
||||
return promptServ.confirmEx(window, dlgTitle, text, btnFlags,
|
||||
btn0Title, btn1Title, btn2Title,
|
||||
@ -1764,8 +1764,6 @@ var nsRevertCommand =
|
||||
|
||||
if (promptService)
|
||||
{
|
||||
var result = {value:0};
|
||||
|
||||
// Put the page title in the message string
|
||||
var title = window.editorShell.GetDocumentTitle();
|
||||
if (!title)
|
||||
@ -1773,13 +1771,13 @@ var nsRevertCommand =
|
||||
|
||||
var msg = GetString("AbandonChanges").replace(/%title%/,title);
|
||||
|
||||
result = promptService.confirmEx(window, GetString("RevertCaption"), msg,
|
||||
var result = promptService.confirmEx(window, GetString("RevertCaption"), msg,
|
||||
(promptService.BUTTON_TITLE_REVERT * promptService.BUTTON_POS_0) +
|
||||
(promptService.BUTTON_TITLE_CANCEL * promptService.BUTTON_POS_1),
|
||||
null, null, null, null, {value:0});
|
||||
|
||||
// Reload page if first button (Revert) was pressed
|
||||
if(result.value == 0)
|
||||
if(result == 0)
|
||||
{
|
||||
FinishHTMLSource();
|
||||
window.editorShell.LoadUrl(GetDocumentUrl());
|
||||
|
@ -511,13 +511,11 @@ function CheckAndSaveDocument(command, allowDontSave)
|
||||
promptFlags += doPublish ?
|
||||
(promptService.BUTTON_TITLE_IS_STRING * promptService.BUTTON_POS_2)
|
||||
: (promptService.BUTTON_TITLE_DONT_SAVE * promptService.BUTTON_POS_2);
|
||||
|
||||
result = promptService.confirmEx(window, dialogTitle, dialogMsg, promptFlags,
|
||||
button1Title, null, button3Title, null, {value:0});
|
||||
|
||||
result = promptService.confirmEx(
|
||||
window, dialogTitle, dialogMsg, promptFlags,
|
||||
button1Title, null, button3Title, null, {value:0}
|
||||
);
|
||||
|
||||
if (result.value == 0)
|
||||
if (result == 0)
|
||||
{
|
||||
// Save, but first finish HTML source mode
|
||||
if (gHTMLSourceChanged)
|
||||
@ -538,10 +536,10 @@ function CheckAndSaveDocument(command, allowDontSave)
|
||||
return success;
|
||||
}
|
||||
|
||||
if (result.value == 2) // "Don't Save"
|
||||
if (result == 2) // "Don't Save"
|
||||
return true;
|
||||
|
||||
// Default or result.value == 1 (Cancel)
|
||||
// Default or result == 1 (Cancel)
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -117,7 +117,7 @@ function showNeedSetupInfo()
|
||||
|
||||
if (promptService && gBundle && gBrandBundle) {
|
||||
var dummy = new Object;
|
||||
var buttonPressed = new Object;
|
||||
var buttonPressed =
|
||||
promptService.confirmEx(window,
|
||||
gBrandBundle.getString("brandShortName"),
|
||||
gBundle.getString("NeedSetup"),
|
||||
@ -127,10 +127,9 @@ function showNeedSetupInfo()
|
||||
0,
|
||||
0,
|
||||
null,
|
||||
dummy,
|
||||
buttonPressed);
|
||||
dummy);
|
||||
|
||||
if (0 == buttonPressed.value) {
|
||||
if (0 == buttonPressed) {
|
||||
openHelp("sign-encrypt");
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user