From db751ce8fe1e54e63fa6a2435a445de5160ea891 Mon Sep 17 00:00:00 2001 From: "danm%netscape.com" Date: Thu, 12 Apr 2001 02:18:06 +0000 Subject: [PATCH] moving implementation details mistakenly placed in public promptservice interface to the private one. r=hyatt,jack git-svn-id: svn://10.0.0.236/trunk@92054 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/editor/base/nsEditorShell.cpp | 16 ++++++++-------- mozilla/editor/composer/src/nsEditorShell.cpp | 16 ++++++++-------- .../windowwatcher/public/nsIPromptService.idl | 9 --------- .../windowwatcher/public/nsPIPromptService.idl | 9 +++++++++ 4 files changed, 25 insertions(+), 25 deletions(-) diff --git a/mozilla/editor/base/nsEditorShell.cpp b/mozilla/editor/base/nsEditorShell.cpp index 4b65500025a..da9491f4bf5 100644 --- a/mozilla/editor/base/nsEditorShell.cpp +++ b/mozilla/editor/base/nsEditorShell.cpp @@ -2835,9 +2835,9 @@ nsEditorShell::ConfirmWithCancel(const nsString& aTitle, const nsString& aQuesti if ( NS_SUCCEEDED(rv) ) { // Stuff in Parameters - block->SetString( nsIPromptService::eMsg, aQuestion.GetUnicode()); + block->SetString( nsPIPromptService::eMsg, aQuestion.GetUnicode()); nsAutoString url; url.AssignWithConversion( "chrome://global/skin/question-icon.gif" ); - block->SetString( nsIPromptService::eIconURL, url.GetUnicode()); + block->SetString( nsPIPromptService::eIconURL, url.GetUnicode()); nsAutoString yesStr, noStr; // Default is Yes, No, Cancel @@ -2851,22 +2851,22 @@ nsEditorShell::ConfirmWithCancel(const nsString& aTitle, const nsString& aQuesti if (aNoString && aNoString->Length() > 0) { noStr.Assign(*aNoString); - block->SetString( nsIPromptService::eButton2Text, noStr.GetUnicode() ); + block->SetString( nsPIPromptService::eButton2Text, noStr.GetUnicode() ); } else { // No string for "No" means we only want Yes, Cancel numberOfButtons = 2; } - block->SetInt( nsIPromptService::eNumberButtons, numberOfButtons ); + block->SetInt( nsPIPromptService::eNumberButtons, numberOfButtons ); nsAutoString cancelStr; GetBundleString(NS_LITERAL_STRING("Cancel"), cancelStr); - block->SetString( nsIPromptService::eDialogTitle, aTitle.GetUnicode() ); + block->SetString( nsPIPromptService::eDialogTitle, aTitle.GetUnicode() ); //Note: "button0" is always Ok or Yes action, "button1" is Cancel - block->SetString( nsIPromptService::eButton0Text, yesStr.GetUnicode() ); - block->SetString( nsIPromptService::eButton1Text, cancelStr.GetUnicode() ); + block->SetString( nsPIPromptService::eButton0Text, yesStr.GetUnicode() ); + block->SetString( nsPIPromptService::eButton1Text, cancelStr.GetUnicode() ); nsCOMPtr dialog(do_GetService("@mozilla.org/embedcomp/prompt-service;1")); if (dialog) @@ -2877,7 +2877,7 @@ nsEditorShell::ConfirmWithCancel(const nsString& aTitle, const nsString& aQuesti nsCOMPtr cwP = do_QueryReferent(mContentWindow); if (!cwP) return result; rv = dialog->DoDialog( cwP, block, "chrome://global/content/commonDialog.xul" ); - block->GetInt( nsIPromptService::eButtonPressed, &buttonPressed ); + block->GetInt( nsPIPromptService::eButtonPressed, &buttonPressed ); // NOTE: If order of buttons changes in nsIPromptService, // then we must change the EConfirmResult enums in nsEditorShell.h result = nsEditorShell::EConfirmResult(buttonPressed); diff --git a/mozilla/editor/composer/src/nsEditorShell.cpp b/mozilla/editor/composer/src/nsEditorShell.cpp index 4b65500025a..da9491f4bf5 100644 --- a/mozilla/editor/composer/src/nsEditorShell.cpp +++ b/mozilla/editor/composer/src/nsEditorShell.cpp @@ -2835,9 +2835,9 @@ nsEditorShell::ConfirmWithCancel(const nsString& aTitle, const nsString& aQuesti if ( NS_SUCCEEDED(rv) ) { // Stuff in Parameters - block->SetString( nsIPromptService::eMsg, aQuestion.GetUnicode()); + block->SetString( nsPIPromptService::eMsg, aQuestion.GetUnicode()); nsAutoString url; url.AssignWithConversion( "chrome://global/skin/question-icon.gif" ); - block->SetString( nsIPromptService::eIconURL, url.GetUnicode()); + block->SetString( nsPIPromptService::eIconURL, url.GetUnicode()); nsAutoString yesStr, noStr; // Default is Yes, No, Cancel @@ -2851,22 +2851,22 @@ nsEditorShell::ConfirmWithCancel(const nsString& aTitle, const nsString& aQuesti if (aNoString && aNoString->Length() > 0) { noStr.Assign(*aNoString); - block->SetString( nsIPromptService::eButton2Text, noStr.GetUnicode() ); + block->SetString( nsPIPromptService::eButton2Text, noStr.GetUnicode() ); } else { // No string for "No" means we only want Yes, Cancel numberOfButtons = 2; } - block->SetInt( nsIPromptService::eNumberButtons, numberOfButtons ); + block->SetInt( nsPIPromptService::eNumberButtons, numberOfButtons ); nsAutoString cancelStr; GetBundleString(NS_LITERAL_STRING("Cancel"), cancelStr); - block->SetString( nsIPromptService::eDialogTitle, aTitle.GetUnicode() ); + block->SetString( nsPIPromptService::eDialogTitle, aTitle.GetUnicode() ); //Note: "button0" is always Ok or Yes action, "button1" is Cancel - block->SetString( nsIPromptService::eButton0Text, yesStr.GetUnicode() ); - block->SetString( nsIPromptService::eButton1Text, cancelStr.GetUnicode() ); + block->SetString( nsPIPromptService::eButton0Text, yesStr.GetUnicode() ); + block->SetString( nsPIPromptService::eButton1Text, cancelStr.GetUnicode() ); nsCOMPtr dialog(do_GetService("@mozilla.org/embedcomp/prompt-service;1")); if (dialog) @@ -2877,7 +2877,7 @@ nsEditorShell::ConfirmWithCancel(const nsString& aTitle, const nsString& aQuesti nsCOMPtr cwP = do_QueryReferent(mContentWindow); if (!cwP) return result; rv = dialog->DoDialog( cwP, block, "chrome://global/content/commonDialog.xul" ); - block->GetInt( nsIPromptService::eButtonPressed, &buttonPressed ); + block->GetInt( nsPIPromptService::eButtonPressed, &buttonPressed ); // NOTE: If order of buttons changes in nsIPromptService, // then we must change the EConfirmResult enums in nsEditorShell.h result = nsEditorShell::EConfirmResult(buttonPressed); diff --git a/mozilla/embedding/components/windowwatcher/public/nsIPromptService.idl b/mozilla/embedding/components/windowwatcher/public/nsIPromptService.idl index a335ab4028c..ca97b0689b0 100644 --- a/mozilla/embedding/components/windowwatcher/public/nsIPromptService.idl +++ b/mozilla/embedding/components/windowwatcher/public/nsIPromptService.idl @@ -37,15 +37,6 @@ interface nsIDOMWindow; [scriptable, uuid(1630C61A-325E-49ca-8759-A31B16C47AA5)] interface nsIPromptService : nsISupports { -%{C++ - enum {eMsg=0, eCheckboxMsg=1, eIconURL=2, eTitleMessage=3, eEditfield1Msg=4, - eEditfield2Msg=5, eEditfield1Value=6, eEditfield2Value=7, - eButton0Text=8, eButton1Text=9, eButton2Text=10, eButton3Text=11, - eDialogTitle=12}; - enum {eButtonPressed=0, eCheckboxState=1, eNumberButtons=2, - eNumberEditfields=3, eEditField1Password=4}; -%} - void alert(in nsIDOMWindow parent, in wstring dialogTitle, in wstring text); diff --git a/mozilla/embedding/components/windowwatcher/public/nsPIPromptService.idl b/mozilla/embedding/components/windowwatcher/public/nsPIPromptService.idl index 9d90346b87a..4e949c4d3cd 100644 --- a/mozilla/embedding/components/windowwatcher/public/nsPIPromptService.idl +++ b/mozilla/embedding/components/windowwatcher/public/nsPIPromptService.idl @@ -31,6 +31,15 @@ interface nsIDialogParamBlock; [uuid(d16e906d-bab3-49e0-8688-7f49a6f4293a)] interface nsPIPromptService : nsISupports { +%{C++ + enum {eMsg=0, eCheckboxMsg=1, eIconURL=2, eTitleMessage=3, eEditfield1Msg=4, + eEditfield2Msg=5, eEditfield1Value=6, eEditfield2Value=7, + eButton0Text=8, eButton1Text=9, eButton2Text=10, eButton3Text=11, + eDialogTitle=12}; + enum {eButtonPressed=0, eCheckboxState=1, eNumberButtons=2, + eNumberEditfields=3, eEditField1Password=4}; +%} + void doDialog(in nsIDOMWindow aParent, in nsIDialogParamBlock aParamBlock, in string aChromeURL); };