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
This commit is contained in:
Родитель
5d2d1a1d5b
Коммит
a61e3d7300
|
@ -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)
|
||||
|
|
|
@ -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)) {
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче