Bug 830175 - Turn buttons in the prompt service from objects with labels to just strings. r=wesj
This commit is contained in:
@@ -134,8 +134,8 @@ Prompt.prototype = {
|
||||
if (aTitle) msg.title = aTitle;
|
||||
if (aText) msg.text = aText;
|
||||
msg.buttons = aButtons || [
|
||||
{ label: PromptUtils.getLocaleString("OK") },
|
||||
{ label: PromptUtils.getLocaleString("Cancel") }
|
||||
PromptUtils.getLocaleString("OK"),
|
||||
PromptUtils.getLocaleString("Cancel")
|
||||
];
|
||||
msg.inputs = aInputs;
|
||||
return PromptUtils.sendMessageToJava(msg);
|
||||
@@ -181,17 +181,17 @@ Prompt.prototype = {
|
||||
/* ---------- nsIPrompt ---------- */
|
||||
|
||||
alert: function alert(aTitle, aText) {
|
||||
this.commonPrompt(aTitle, aText, [{ label: PromptUtils.getLocaleString("OK") }], "", {value: false}, []);
|
||||
this.commonPrompt(aTitle, aText, [ PromptUtils.getLocaleString("OK") ], "", { value: false }, []);
|
||||
},
|
||||
|
||||
alertCheck: function alertCheck(aTitle, aText, aCheckMsg, aCheckState) {
|
||||
let data = this.commonPrompt(aTitle, aText, [{ label: PromptUtils.getLocaleString("OK") }], aCheckMsg, aCheckState, []);
|
||||
let data = this.commonPrompt(aTitle, aText, [ PromptUtils.getLocaleString("OK") ], aCheckMsg, aCheckState, []);
|
||||
if (aCheckMsg)
|
||||
aCheckState.value = data.checkbox == "true";
|
||||
},
|
||||
|
||||
confirm: function confirm(aTitle, aText) {
|
||||
let data = this.commonPrompt(aTitle, aText, null, "", {value: false}, []);
|
||||
let data = this.commonPrompt(aTitle, aText, null, "", { value: false }, []);
|
||||
return (data.button == 0);
|
||||
},
|
||||
|
||||
@@ -237,7 +237,7 @@ Prompt.prototype = {
|
||||
}
|
||||
|
||||
if (bTitle)
|
||||
buttons.push({label:bTitle});
|
||||
buttons.push(bTitle);
|
||||
|
||||
aButtonFlags >>= 8;
|
||||
}
|
||||
@@ -289,11 +289,8 @@ Prompt.prototype = {
|
||||
},
|
||||
|
||||
select: function select(aTitle, aText, aCount, aSelectList, aOutSelection) {
|
||||
let data = this.commonPrompt(aTitle, aText, [
|
||||
{ label: PromptUtils.getLocaleString("OK") }
|
||||
], "", {value: false}, [
|
||||
{ type: "menulist", values: aSelectList },
|
||||
]);
|
||||
let data = this.commonPrompt(aTitle, aText, [ PromptUtils.getLocaleString("OK") ], "",
|
||||
{ value: false }, [{ type: "menulist", values: aSelectList }]);
|
||||
|
||||
let ok = data.button == 0;
|
||||
if (ok)
|
||||
|
||||
Reference in New Issue
Block a user