default "remember decision" button in cookie prompt dialog to on.

This commit is contained in:
pinkerton%netscape.com 2003-04-25 06:16:35 +00:00
parent ce35b9bcd9
commit 823f54faaf

View File

@ -466,6 +466,8 @@ CocoaPromptService::GetButtonStringFromFlags(PRUint32 btnFlags,
NS_IMETHODIMP
CocoaPromptService::CookieDialog(nsIDOMWindow *parent, nsICookie *cookie, const nsACString & hostname, PRInt32 cookiesFromHost, PRBool changingCookie, PRBool *rememberDecision, PRBool *_retval)
{
NS_ENSURE_ARG_POINTER(rememberDecision && _retval);
NSString* dialogText = [NSString stringWithFormat:NSLocalizedString(@"CookieText",@"CookieText"),
PromiseFlatCString(hostname).get()];
PRUnichar* textStr = [dialogText createNewUnicodeBuffer];
@ -480,6 +482,7 @@ CocoaPromptService::CookieDialog(nsIDOMWindow *parent, nsICookie *cookie, const
long buttonFlags = (BUTTON_TITLE_IS_STRING << kButton0) | (BUTTON_TITLE_IS_STRING << kButton1);
PRInt32 buttonPressed = 0;
*rememberDecision = PR_TRUE; // "remember this decision" should be checked when we show the dialog
ConfirmEx(parent, titleStr, textStr, buttonFlags, allowStr, denyStr, nil, checkboxStr, rememberDecision, &buttonPressed);
*_retval = (buttonPressed == 0); // button 0 is allow, button 1 is deny, so return true if allow is clicked