From c6e58d56ae23a76f9af06e048f2980a6cc9b1637 Mon Sep 17 00:00:00 2001 From: "timeless%mac.com" Date: Thu, 14 Sep 2006 06:03:44 +0000 Subject: [PATCH] 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 --- suite/browser/navigatorDD.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/suite/browser/navigatorDD.js b/suite/browser/navigatorDD.js index 42f7241a8cef..866e7ac9707e 100644 --- a/suite/browser/navigatorDD.js +++ b/suite/browser/navigatorDD.js @@ -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); }