Bug 128905 nsIPromptService.idl confirmEx is poorly prototyped

[api] change confirmEx from void w/ out of buttonPressed to PRInt32 buttonPressed w/ one less parameter.
fixes and cleans up callers
r=ccarlen sr=scc a=asa
This commit is contained in:
timeless%mac.com 2006-09-14 06:03:44 +00:00
parent 23055922bf
commit c6e58d56ae

View File

@ -369,17 +369,15 @@ var homeButtonObserver = {
function openHomeDialog(aURL)
{
var promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].getService(Components.interfaces.nsIPromptService);
var pressedVal = { };
var promptTitle = gNavigatorBundle.getString("droponhometitle");
var promptMsg = gNavigatorBundle.getString("droponhomemsg");
var okButton = gNavigatorBundle.getString("droponhomeokbutton");
promptService.confirmEx(window, promptTitle, promptMsg,
var pressedVal = promptService.confirmEx(window, promptTitle, promptMsg,
(promptService.BUTTON_TITLE_IS_STRING * promptService.BUTTON_POS_0) +
(promptService.BUTTON_TITLE_CANCEL * promptService.BUTTON_POS_1),
okButton, null, null, null, {value:0}, pressedVal);
okButton, null, null, null, {value:0});
if (pressedVal.value == 0) {
if (pressedVal == 0) {
nsPreferences.setUnicharPref("browser.startup.homepage", aURL);
setTooltipText("home-button", aURL);
}