Bug 365529: Take advantage of new yes/no constant in nsIPrompt, patch by Ryan Jones <bugs@ryan-jones.com>, r+sr=biesi for /netwerk, r+sr=neil for mailnews, r=me for the rest

git-svn-id: svn://10.0.0.236/trunk@217742 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
gavin%gavinsharp.com
2007-01-04 18:48:53 +00:00
parent 22d2dce1af
commit 85761db8d8
5 changed files with 8 additions and 18 deletions

View File

@@ -1358,10 +1358,8 @@ EmbedPasswordMgr::Notify(nsIContent* aFormNode,
formatArgs,
1);
PRInt32 selection;
prompt->ConfirmEx(dialogTitle.get(),
dialogText.get(),
(nsIPrompt::BUTTON_TITLE_YES * nsIPrompt::BUTTON_POS_0) +
(nsIPrompt::BUTTON_TITLE_NO * nsIPrompt::BUTTON_POS_1),
prompt->ConfirmEx(dialogTitle.get(), dialogText.get(),
nsIPrompt::STD_YES_NO_BUTTONS,
nsnull, nsnull, nsnull, nsnull, nsnull,
&selection);
if (selection == 0)

View File

@@ -494,9 +494,7 @@ Wallet_ConfirmYN(PRUnichar * szMessage, nsIDOMWindowInternal* window) {
PRInt32 buttonPressed = 1; /* in case user exits dialog by clickin X */
PRUnichar * confirm_string = Wallet_Localize("Confirm");
res = dialog->ConfirmEx(confirm_string, szMessage,
(nsIPrompt::BUTTON_TITLE_YES * nsIPrompt::BUTTON_POS_0) +
(nsIPrompt::BUTTON_TITLE_NO * nsIPrompt::BUTTON_POS_1),
res = dialog->ConfirmEx(confirm_string, szMessage, nsIPrompt::STD_YES_NO_BUTTONS,
nsnull, nsnull, nsnull, nsnull, nsnull, &buttonPressed);
WALLET_FREE(confirm_string);
@@ -519,8 +517,7 @@ Wallet_3ButtonConfirm(PRUnichar * szMessage, nsIDOMWindowInternal* window)
res = dialog->ConfirmEx(confirm_string, szMessage,
nsIPrompt::BUTTON_POS_1_DEFAULT +
(nsIPrompt::BUTTON_TITLE_YES * nsIPrompt::BUTTON_POS_0) +
(nsIPrompt::BUTTON_TITLE_NO * nsIPrompt::BUTTON_POS_1) +
nsIPrompt::STD_YES_NO_BUTTONS +
(nsIPrompt::BUTTON_TITLE_IS_STRING * nsIPrompt::BUTTON_POS_2),
nsnull, nsnull, never_string, nsnull, nsnull, &buttonPressed);
@@ -572,9 +569,7 @@ Wallet_CheckConfirmYN
PRInt32 buttonPressed = 1; /* in case user exits dialog by clickin X */
PRUnichar * confirm_string = Wallet_Localize("Confirm");
res = dialog->ConfirmEx(confirm_string, szMessage,
(nsIPrompt::BUTTON_TITLE_YES * nsIPrompt::BUTTON_POS_0) +
(nsIPrompt::BUTTON_TITLE_NO * nsIPrompt::BUTTON_POS_1),
res = dialog->ConfirmEx(confirm_string, szMessage, nsIPrompt::STD_YES_NO_BUTTONS,
nsnull, nsnull, nsnull, szCheckMessage, checkValue, &buttonPressed);
if (NS_FAILED(res)) {

View File

@@ -1622,8 +1622,7 @@ nsMsgDBFolder::AutoCompact(nsIMsgWindow *aWindow)
rv = aWindow->GetPromptDialog(getter_AddRefs(dialog));
NS_ENSURE_SUCCESS(rv, rv);
rv = dialog->ConfirmEx(dialogTitle.get(), confirmString.get(),
(nsIPrompt::BUTTON_TITLE_YES * nsIPrompt::BUTTON_POS_0 + nsIPrompt::BUTTON_TITLE_NO * nsIPrompt::BUTTON_POS_1),
rv = dialog->ConfirmEx(dialogTitle.get(), confirmString.get(), nsIPrompt::STD_YES_NO_BUTTONS,
nsnull, nsnull, nsnull, checkboxText.get(), &checkValue, &buttonPressed);
NS_ENSURE_SUCCESS(rv, rv);
if (!buttonPressed)

View File

@@ -2803,8 +2803,7 @@ nsHttpChannel::ConfirmAuth(const nsString &bundleKey, PRBool doYesNoPrompt)
PRInt32 choice;
rv = prompt->ConfirmEx(nsnull, msg,
nsIPrompt::BUTTON_POS_1_DEFAULT +
nsIPrompt::BUTTON_TITLE_YES * nsIPrompt::BUTTON_POS_0 +
nsIPrompt::BUTTON_TITLE_NO * nsIPrompt::BUTTON_POS_1,
nsIPrompt::STD_YES_NO_BUTTONS,
nsnull, nsnull, nsnull, nsnull, nsnull, &choice);
if (NS_FAILED(rv))
return PR_TRUE;

View File

@@ -1160,8 +1160,7 @@ nsPasswordManager::Notify(nsIContent* aFormNode,
PRInt32 selection;
prompt->ConfirmEx(dialogTitle.get(),
dialogText.get(),
(nsIPrompt::BUTTON_TITLE_YES * nsIPrompt::BUTTON_POS_0) +
(nsIPrompt::BUTTON_TITLE_NO * nsIPrompt::BUTTON_POS_1),
nsIPrompt::STD_YES_NO_BUTTONS,
nsnull, nsnull, nsnull, nsnull, nsnull,
&selection);