diff --git a/mozilla/docshell/base/nsWebShell.cpp b/mozilla/docshell/base/nsWebShell.cpp index a8a11a68467..f9a9543d527 100644 --- a/mozilla/docshell/base/nsWebShell.cpp +++ b/mozilla/docshell/base/nsWebShell.cpp @@ -587,7 +587,7 @@ nsWebShell::nsWebShell() : nsDocShell() ++gNumberOfWebShells; #endif #ifdef NOISY_WEBSHELL_LEAKS - printf("WEBSHELL+ = %d\n", gNumberOfWebShells); + printf("WEBSHELL+ = %ld\n", gNumberOfWebShells); #endif NS_INIT_REFCNT(); @@ -671,7 +671,7 @@ nsWebShell::~nsWebShell() --gNumberOfWebShells; #endif #ifdef NOISY_WEBSHELL_LEAKS - printf("WEBSHELL- = %d\n", gNumberOfWebShells); + printf("WEBSHELL- = %ld\n", gNumberOfWebShells); #endif } @@ -2129,7 +2129,9 @@ nsWebShell::GoTo(PRInt32 aHistoryIndex) } } +#ifdef DEBUG printf("Goto %d\n", aHistoryIndex); +#endif mHistoryIndex = aHistoryIndex; ShowHistory(); diff --git a/mozilla/extensions/wallet/src/singsign.cpp b/mozilla/extensions/wallet/src/singsign.cpp index 0882ad9fa5a..6964d2924f9 100644 --- a/mozilla/extensions/wallet/src/singsign.cpp +++ b/mozilla/extensions/wallet/src/singsign.cpp @@ -2282,7 +2282,7 @@ SINGSIGN_PromptPassword /* do only the dialog if signon preference is not enabled */ if (!si_GetSignonRememberingPref()){ - return dialog->PromptPassword(text, pwd, returnValue); + return dialog->PromptPassword(text, nsnull /* window title */, pwd, returnValue); } /* convert to a uri so we can parse out the username and hostname */ @@ -2327,7 +2327,7 @@ SINGSIGN_PromptPassword } /* if no password found, get new password from user */ - res = dialog->PromptPassword(text, pwd, returnValue); + res = dialog->PromptPassword(text, nsnull /* window title */, pwd, returnValue); if (NS_FAILED(res) || !(*returnValue)) { /* user pressed Cancel */ if (colon) { diff --git a/mozilla/extensions/wallet/src/wallet.cpp b/mozilla/extensions/wallet/src/wallet.cpp index 906666c678d..8d85de0757f 100644 --- a/mozilla/extensions/wallet/src/wallet.cpp +++ b/mozilla/extensions/wallet/src/wallet.cpp @@ -832,7 +832,7 @@ char * wallet_GetString(PRUnichar * szMessage) const nsString message = szMessage; PRUnichar* pwd; retval = PR_FALSE; /* in case user exits dialog by clicking X */ - res = dialog->PromptPassword(message.GetUnicode(), &pwd, &retval); + res = dialog->PromptPassword(message.GetUnicode(), nsnull /* window title */, &pwd, &retval); if (NS_FAILED(res)) { return NULL; } @@ -867,7 +867,7 @@ char * wallet_GetDoubleString(PRUnichar * szMessage, PRUnichar * szMessage2, PRB res = dialog->PromptDoublePassword (message.GetUnicode(), message2.GetUnicode(), &pwd, &pwd2, &retval); #else - res = dialog->PromptPassword(message.GetUnicode(), &pwd, &retval); + res = dialog->PromptPassword(message.GetUnicode(), nsnull /* window title */, &pwd, &retval); if (NS_FAILED(res)) { return NULL; } @@ -875,7 +875,7 @@ char * wallet_GetDoubleString(PRUnichar * szMessage, PRUnichar * szMessage2, PRB delete[] pwd; return NULL; /* user pressed cancel */ } - res = dialog->PromptPassword(message2.GetUnicode(), &pwd2, &retval); + res = dialog->PromptPassword(message2.GetUnicode(), nsnull /* window title */, &pwd2, &retval); #endif if (NS_FAILED(res)) { return NULL; diff --git a/mozilla/mailnews/base/public/nsIMsgIncomingServer.idl b/mozilla/mailnews/base/public/nsIMsgIncomingServer.idl index 74775fee50d..2e97e5c7f9e 100644 --- a/mozilla/mailnews/base/public/nsIMsgIncomingServer.idl +++ b/mozilla/mailnews/base/public/nsIMsgIncomingServer.idl @@ -79,7 +79,7 @@ interface nsIMsgIncomingServer : nsISupports { attribute string password; /* prompt the user for a password */ - string getPasswordWithUI(in wstring aPromptString); + string getPasswordWithUI(in wstring aPromptString, in wstring aPromptTitle); /* should we download whole messages when biff goes off? */ attribute boolean downloadOnBiff; diff --git a/mozilla/mailnews/base/util/nsMsgIncomingServer.cpp b/mozilla/mailnews/base/util/nsMsgIncomingServer.cpp index fc034e9ab82..67df55ef7ed 100644 --- a/mozilla/mailnews/base/util/nsMsgIncomingServer.cpp +++ b/mozilla/mailnews/base/util/nsMsgIncomingServer.cpp @@ -557,7 +557,7 @@ NS_IMETHODIMP nsMsgIncomingServer::GetPassword(char ** aPassword) } NS_IMETHODIMP -nsMsgIncomingServer::GetPasswordWithUI(const PRUnichar * aPromptMessage, char **aPassword) +nsMsgIncomingServer::GetPasswordWithUI(const PRUnichar * aPromptMessage, const PRUnichar *aPromptTitle, char **aPassword) { nsXPIDLCString prefvalue; @@ -571,7 +571,7 @@ nsMsgIncomingServer::GetPasswordWithUI(const PRUnichar * aPromptMessage, char ** { PRUnichar * uniPassword; PRBool okayValue = PR_TRUE; - dialog->PromptPassword(aPromptMessage, &uniPassword, &okayValue); + dialog->PromptPassword(aPromptMessage, aPromptTitle, &uniPassword, &okayValue); if (!okayValue) // if the user pressed cancel, just return NULL; { diff --git a/mozilla/mailnews/imap/resources/locale/en-US/imapMsgs.properties b/mozilla/mailnews/imap/resources/locale/en-US/imapMsgs.properties index 8de919968bc..a5ef9000774 100644 --- a/mozilla/mailnews/imap/resources/locale/en-US/imapMsgs.properties +++ b/mozilla/mailnews/imap/resources/locale/en-US/imapMsgs.properties @@ -246,3 +246,7 @@ ## @loc None 5050=Document: Done +## @name IMAP_ENTER_PASSWORD_PROMPT_TITLE +## @loc None +5051=Enter your password + diff --git a/mozilla/mailnews/imap/src/nsImapIncomingServer.cpp b/mozilla/mailnews/imap/src/nsImapIncomingServer.cpp index 8f515b37cf7..b3f7c80ef8b 100644 --- a/mozilla/mailnews/imap/src/nsImapIncomingServer.cpp +++ b/mozilla/mailnews/imap/src/nsImapIncomingServer.cpp @@ -1282,6 +1282,7 @@ nsresult nsImapIncomingServer::GetUnverifiedSubFolders(nsIFolder *parentFolder, NS_IMETHODIMP nsImapIncomingServer::PromptForPassword(char ** aPassword) { PRUnichar *passwordTemplate = IMAPGetStringByID(IMAP_ENTER_PASSWORD_PROMPT); + PRUnichar *passwordTitle = IMAPGetStringByID(IMAP_ENTER_PASSWORD_PROMPT_TITLE); PRUnichar *passwordText = nsnull; nsXPIDLCString hostName; nsXPIDLCString userName; @@ -1290,9 +1291,10 @@ NS_IMETHODIMP nsImapIncomingServer::PromptForPassword(char ** aPassword) GetUsername(getter_Copies(userName)); passwordText = nsTextFormater::smprintf(passwordTemplate, (const char *) userName, (const char *) hostName); - nsresult rv = GetPasswordWithUI(passwordText, aPassword); + nsresult rv = GetPasswordWithUI(passwordText, passwordTitle, aPassword); nsTextFormater::smprintf_free(passwordText); nsCRT::free(passwordTemplate); + nsCRT::free(passwordTitle); return rv; } diff --git a/mozilla/mailnews/imap/src/nsImapMailFolder.cpp b/mozilla/mailnews/imap/src/nsImapMailFolder.cpp index a82eca82b8b..2456fe561c0 100644 --- a/mozilla/mailnews/imap/src/nsImapMailFolder.cpp +++ b/mozilla/mailnews/imap/src/nsImapMailFolder.cpp @@ -337,7 +337,7 @@ nsresult nsImapMailFolder::CreateSubFolders(nsFileSpec &path) { nsCAutoString leafName (currentFolderNameStr); nsCOMPtr msfFileSpec; - nsresult rv = NS_NewFileSpecWithSpec(currentFolderPath, getter_AddRefs(msfFileSpec)); + rv = NS_NewFileSpecWithSpec(currentFolderPath, getter_AddRefs(msfFileSpec)); if (NS_SUCCEEDED(rv) && msfFileSpec) { // leaf name is the db name w/o .msf (nsShouldIgnoreFile strips it off) diff --git a/mozilla/mailnews/imap/src/nsImapStringBundle.h b/mozilla/mailnews/imap/src/nsImapStringBundle.h index 9df2b17113d..655f45c773f 100644 --- a/mozilla/mailnews/imap/src/nsImapStringBundle.h +++ b/mozilla/mailnews/imap/src/nsImapStringBundle.h @@ -82,4 +82,5 @@ NS_END_EXTERN_C #define IMAP_SERVER_NOT_IMAP4 5048 #define IMAP_SERVER_SAID 5049 #define IMAP_DONE 5050 +#define IMAP_ENTER_PASSWORD_PROMPT_TITLE 5051 #endif /* _nsImapStringBundle_H__ */ diff --git a/mozilla/mailnews/local/resources/locale/en-US/localMsgs.properties b/mozilla/mailnews/local/resources/locale/en-US/localMsgs.properties index 392dbd16a77..b576e20dd27 100644 --- a/mozilla/mailnews/local/resources/locale/en-US/localMsgs.properties +++ b/mozilla/mailnews/local/resources/locale/en-US/localMsgs.properties @@ -123,3 +123,8 @@ ## @name POP3_NO_ANSWER ## @loc None 4019=No Answer + +## @name POP3_ENTER_PASSWORD_PROMPT_TITLE +## @loc None +4020=Enter your password + diff --git a/mozilla/mailnews/local/src/nsLocalStringBundle.h b/mozilla/mailnews/local/src/nsLocalStringBundle.h index 412cfd33019..eed044ddd05 100644 --- a/mozilla/mailnews/local/src/nsLocalStringBundle.h +++ b/mozilla/mailnews/local/src/nsLocalStringBundle.h @@ -49,5 +49,6 @@ NS_END_EXTERN_C #define POP3_ENTER_PASSWORD_PROMPT 4017 #define POP3_PREVIOUSLY_ENTERED_PASSWORD_IS_INVALID_ETC 4018 #define POP3_NO_ANSWER 4019 +#define POP3_ENTER_PASSWORD_PROMPT_TITLE 4020 #endif /* _nsImapStringBundle_H__ */ diff --git a/mozilla/mailnews/local/src/nsPop3Protocol.cpp b/mozilla/mailnews/local/src/nsPop3Protocol.cpp index 193145f5112..bf574451d61 100644 --- a/mozilla/mailnews/local/src/nsPop3Protocol.cpp +++ b/mozilla/mailnews/local/src/nsPop3Protocol.cpp @@ -372,10 +372,10 @@ net_pop3_free_state(Pop3UidlHost* host) nsPop3Protocol::nsPop3Protocol(nsIURI* aURL) : nsMsgProtocol(aURL, aURL), nsMsgLineBuffer(NULL, PR_FALSE), - m_totalBytesReceived(0), m_bytesInMsgReceived(0), m_totalFolderSize(0), m_totalDownloadSize(0), + m_totalBytesReceived(0), m_lineStreamBuffer(nsnull), m_pop3ConData(nsnull) { @@ -516,7 +516,9 @@ nsresult nsPop3Protocol::GetPassword(char ** aPassword) } // now go get the password!!!! - rv = server->GetPasswordWithUI(passwordPromptString, aPassword); + PRUnichar * passwordTitle = LocalGetStringByID(POP3_ENTER_PASSWORD_PROMPT_TITLE); + rv = server->GetPasswordWithUI(passwordPromptString, passwordTitle, aPassword); + nsCRT::free(passwordTitle); nsTextFormater::smprintf_free(passwordPromptString); ClearFlag(POP3_PASSWORD_FAILED); diff --git a/mozilla/mailnews/local/src/nsPop3Protocol.h b/mozilla/mailnews/local/src/nsPop3Protocol.h index 350c5b06272..4595e101a97 100644 --- a/mozilla/mailnews/local/src/nsPop3Protocol.h +++ b/mozilla/mailnews/local/src/nsPop3Protocol.h @@ -261,7 +261,6 @@ public: private: nsCString m_username; - Pop3ConData* m_pop3ConData; nsCString m_senderInfo; nsCString m_commandResponse; nsCOMPtr m_statusFeedback; @@ -288,6 +287,7 @@ private: nsCOMPtr m_pop3Server; nsMsgLineStreamBuffer * m_lineStreamBuffer; // used to efficiently extract lines from the incoming data stream + Pop3ConData* m_pop3ConData; void FreeMsgInfo(); ////////////////////////////////////////////////////////////////////////////////////////// diff --git a/mozilla/netwerk/base/public/nsIPrompt.idl b/mozilla/netwerk/base/public/nsIPrompt.idl index bbc44a6eaf7..778a8b49b02 100644 --- a/mozilla/netwerk/base/public/nsIPrompt.idl +++ b/mozilla/netwerk/base/public/nsIPrompt.idl @@ -80,7 +80,7 @@ interface nsIPrompt : nsISupports * Puts up a password dialog with OK and Cancel buttons. * @return true for OK, false for Cancel */ - boolean promptPassword(in wstring text, + boolean promptPassword(in wstring text, in wstring title, out wstring pwd); /* diff --git a/mozilla/suite/locales/en-US/chrome/mailnews/imapMsgs.properties b/mozilla/suite/locales/en-US/chrome/mailnews/imapMsgs.properties index 8de919968bc..a5ef9000774 100644 --- a/mozilla/suite/locales/en-US/chrome/mailnews/imapMsgs.properties +++ b/mozilla/suite/locales/en-US/chrome/mailnews/imapMsgs.properties @@ -246,3 +246,7 @@ ## @loc None 5050=Document: Done +## @name IMAP_ENTER_PASSWORD_PROMPT_TITLE +## @loc None +5051=Enter your password + diff --git a/mozilla/suite/locales/en-US/chrome/mailnews/localMsgs.properties b/mozilla/suite/locales/en-US/chrome/mailnews/localMsgs.properties index 392dbd16a77..b576e20dd27 100644 --- a/mozilla/suite/locales/en-US/chrome/mailnews/localMsgs.properties +++ b/mozilla/suite/locales/en-US/chrome/mailnews/localMsgs.properties @@ -123,3 +123,8 @@ ## @name POP3_NO_ANSWER ## @loc None 4019=No Answer + +## @name POP3_ENTER_PASSWORD_PROMPT_TITLE +## @loc None +4020=Enter your password + diff --git a/mozilla/webshell/src/nsWebShell.cpp b/mozilla/webshell/src/nsWebShell.cpp index a8a11a68467..f9a9543d527 100644 --- a/mozilla/webshell/src/nsWebShell.cpp +++ b/mozilla/webshell/src/nsWebShell.cpp @@ -587,7 +587,7 @@ nsWebShell::nsWebShell() : nsDocShell() ++gNumberOfWebShells; #endif #ifdef NOISY_WEBSHELL_LEAKS - printf("WEBSHELL+ = %d\n", gNumberOfWebShells); + printf("WEBSHELL+ = %ld\n", gNumberOfWebShells); #endif NS_INIT_REFCNT(); @@ -671,7 +671,7 @@ nsWebShell::~nsWebShell() --gNumberOfWebShells; #endif #ifdef NOISY_WEBSHELL_LEAKS - printf("WEBSHELL- = %d\n", gNumberOfWebShells); + printf("WEBSHELL- = %ld\n", gNumberOfWebShells); #endif } @@ -2129,7 +2129,9 @@ nsWebShell::GoTo(PRInt32 aHistoryIndex) } } +#ifdef DEBUG printf("Goto %d\n", aHistoryIndex); +#endif mHistoryIndex = aHistoryIndex; ShowHistory(); diff --git a/mozilla/webshell/tests/viewer/nsBrowserWindow.cpp b/mozilla/webshell/tests/viewer/nsBrowserWindow.cpp index 30ed80f5933..b5dc4515606 100644 --- a/mozilla/webshell/tests/viewer/nsBrowserWindow.cpp +++ b/mozilla/webshell/tests/viewer/nsBrowserWindow.cpp @@ -2273,6 +2273,7 @@ nsBrowserWindow::PromptUsernameAndPassword(const PRUnichar *text, NS_IMETHODIMP nsBrowserWindow::PromptPassword(const PRUnichar *text, + const PRUnichar *title, PRUnichar **pwd, PRBool *_retval) { diff --git a/mozilla/xpfe/appshell/public/nsICommonDialogs.idl b/mozilla/xpfe/appshell/public/nsICommonDialogs.idl index f35a12fdf65..c776a75c99e 100644 --- a/mozilla/xpfe/appshell/public/nsICommonDialogs.idl +++ b/mozilla/xpfe/appshell/public/nsICommonDialogs.idl @@ -104,4 +104,4 @@ enum { eButtonPressed = 0, eCheckboxState = 1, eNumberButtons = 2, eNumberEditfi %{C++ extern nsresult NS_NewCommonDialogsFactory(nsIFactory** aResult); -%} \ No newline at end of file +%} diff --git a/mozilla/xpfe/appshell/src/nsNetSupportDialog.cpp b/mozilla/xpfe/appshell/src/nsNetSupportDialog.cpp index 3fff471e6d1..01bb3728551 100644 --- a/mozilla/xpfe/appshell/src/nsNetSupportDialog.cpp +++ b/mozilla/xpfe/appshell/src/nsNetSupportDialog.cpp @@ -518,7 +518,8 @@ NS_IMETHODIMP nsNetSupportDialog::PromptUsernameAndPassword(const PRUnichar *tex #endif } -NS_IMETHODIMP nsNetSupportDialog::PromptPassword(const PRUnichar *text, +NS_IMETHODIMP nsNetSupportDialog::PromptPassword(const PRUnichar *text, + const PRUnichar *windowTitle, PRUnichar **pwd, PRBool *returnValue) { @@ -532,7 +533,7 @@ NS_IMETHODIMP nsNetSupportDialog::PromptPassword(const PRUnichar *text, rv = nsComponentManager::CreateInstance( kCommonDialogsCID,0, nsICommonDialogs::GetIID(), (void**)&dialogService ); if( NS_SUCCEEDED ( rv ) ) - rv = dialogService->PromptPassword( window, NULL,text, pwd, returnValue ); + rv = dialogService->PromptPassword( window, windowTitle,text, pwd, returnValue ); } return rv; diff --git a/mozilla/xpfe/appshell/src/nsWebShellWindow.cpp b/mozilla/xpfe/appshell/src/nsWebShellWindow.cpp index 1963808716c..5ebb207d63d 100644 --- a/mozilla/xpfe/appshell/src/nsWebShellWindow.cpp +++ b/mozilla/xpfe/appshell/src/nsWebShellWindow.cpp @@ -3005,7 +3005,7 @@ NS_IMETHODIMP nsWebShellWindow::PromptUsernameAndPassword(const PRUnichar *text, return rv; } -NS_IMETHODIMP nsWebShellWindow::PromptPassword(const PRUnichar *text, PRUnichar **pwd, PRBool *_retval) +NS_IMETHODIMP nsWebShellWindow::PromptPassword(const PRUnichar *text, const PRUnichar *title, PRUnichar **pwd, PRBool *_retval) { nsresult rv; nsCOMPtr domWindow; @@ -3020,7 +3020,7 @@ NS_IMETHODIMP nsWebShellWindow::PromptPassword(const PRUnichar *text, PRUnichar NS_WITH_SERVICE(nsICommonDialogs, dialog, kCommonDialogsCID, &rv); if ( NS_SUCCEEDED( rv ) ) - rv = dialog->PromptPassword( domWindow, NULL, text, pwd, _retval ); + rv = dialog->PromptPassword( domWindow, title, text, pwd, _retval ); return rv; } @@ -3080,7 +3080,7 @@ NS_IMETHODIMP nsWebShellWindow::PromptPassword(const char *url, const PRUnichar nsresult res; NS_WITH_SERVICE(nsIWalletService, wallet, kWalletServiceCID, &res); if (NS_FAILED(res)) { - return PromptPassword(text, pwd, _retval); + return PromptPassword(text, title, pwd, _retval); } nsCOMPtr prompter = this; return wallet->PromptPasswordURL(text, pwd, url, prompter, _retval);