зеркало из https://github.com/mozilla/gecko-dev.git
Bug 128905 nsIPromptService.idl confirmEx is poorly prototyped
[api] change confirmEx from void w/ out of buttonPressed to PRInt32 buttonPressed w/ one less parameter. updated last callers r=brade sr=kin
This commit is contained in:
Родитель
7c6fe87ed8
Коммит
c1e6c65c47
|
@ -69,7 +69,6 @@ try {
|
|||
// checking the confirmEx method.
|
||||
|
||||
var checkbox = {value:1};
|
||||
var buttonPressed = {value:0};
|
||||
// first variation.
|
||||
/*
|
||||
var std_buttons = (promptObj.BUTTON_TITLE_OK * promptObj.BUTTON_POS_0) +
|
||||
|
@ -81,11 +80,11 @@ try {
|
|||
var std_buttons = (promptObj.BUTTON_TITLE_IS_STRING * promptObj.BUTTON_POS_0) +
|
||||
(promptObj.BUTTON_TITLE_IS_STRING * promptObj.BUTTON_POS_1) +
|
||||
(promptObj.BUTTON_TITLE_IS_STRING * promptObj.BUTTON_POS_2);
|
||||
promptObj.confirmEx("confirmEx dialog", "text message", std_buttons,
|
||||
var buttonPressed = promptObj.confirmEx("confirmEx dialog", "text message", std_buttons,
|
||||
"Button0", "Button1", "Button2",
|
||||
"check or uncheck", checkbox, buttonPressed);
|
||||
"check or uncheck", checkbox);
|
||||
alert("Checkbox checked: " + checkbox.value);
|
||||
alert("Button pressed: " + buttonPressed.value);
|
||||
alert("Button pressed: " + buttonPressed);
|
||||
*/
|
||||
|
||||
// checking the prompt method.
|
||||
|
|
|
@ -340,11 +340,10 @@
|
|||
} catch (ex) {
|
||||
}
|
||||
if (warn && !browseWithCaretOn) {
|
||||
var buttonPressed = {value:1};
|
||||
var checkValue = {value:false};
|
||||
promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].getService(Components.interfaces.nsIPromptService);
|
||||
|
||||
promptService.confirmEx(window,
|
||||
var buttonPressed = promptService.confirmEx(window,
|
||||
this.mStrBundle.GetStringFromName('browsewithcaret.checkWindowTitle'),
|
||||
this.mStrBundle.GetStringFromName('browsewithcaret.checkLabel'),
|
||||
(promptService.BUTTON_TITLE_IS_STRING * promptService.BUTTON_POS_0) +
|
||||
|
@ -352,8 +351,8 @@
|
|||
this.mStrBundle.GetStringFromName('browsewithcaret.checkButtonLabel'),
|
||||
null, null,
|
||||
this.mStrBundle.GetStringFromName('browsewithcaret.checkMsg'),
|
||||
checkValue, buttonPressed);
|
||||
if (!buttonPressed || buttonPressed.value != 0)
|
||||
checkValue);
|
||||
if (buttonPressed != 0)
|
||||
return;
|
||||
if (checkValue.value) {
|
||||
try {
|
||||
|
|
Загрузка…
Ссылка в новой задаче