From 34d41ad783f6a80e6c5ec15e8e6abc45d4223747 Mon Sep 17 00:00:00 2001 From: "syd%netscape.com" Date: Fri, 8 Dec 2000 07:07:45 +0000 Subject: [PATCH] Pass an nsIPrompt instance to the login redirector. r=jelwell, sr=mscott git-svn-id: svn://10.0.0.236/trunk@83398 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/mailnews/compose/src/nsSmtpProtocol.cpp | 5 ++++- mozilla/mailnews/imap/public/nsIMsgLogonRedirector.idl | 3 ++- mozilla/mailnews/imap/src/nsImapIncomingServer.cpp | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/mozilla/mailnews/compose/src/nsSmtpProtocol.cpp b/mozilla/mailnews/compose/src/nsSmtpProtocol.cpp index a0d6d266c30..243e85a894c 100644 --- a/mozilla/mailnews/compose/src/nsSmtpProtocol.cpp +++ b/mozilla/mailnews/compose/src/nsSmtpProtocol.cpp @@ -1660,7 +1660,10 @@ nsresult nsSmtpProtocol::RequestOverrideInfo(nsISmtpServer * aSmtpServer) m_logonRedirector->RequiresPassword(userName, &requiresPassword); if (requiresPassword) GetPassword(getter_Copies(password)); - rv = m_logonRedirector->Logon(userName, password, NS_STATIC_CAST(nsIMsgLogonRedirectionRequester *, this), nsMsgLogonRedirectionServiceIDs::Smtp); + + nsCOMPtr prompter; + m_runningURL->GetPrompt(getter_AddRefs(prompter)); + rv = m_logonRedirector->Logon(userName, password, prompter, NS_STATIC_CAST(nsIMsgLogonRedirectionRequester *, this), nsMsgLogonRedirectionServiceIDs::Smtp); } // this protocol instance now needs to wait until diff --git a/mozilla/mailnews/imap/public/nsIMsgLogonRedirector.idl b/mozilla/mailnews/imap/public/nsIMsgLogonRedirector.idl index cc73e7be639..4de353972d1 100644 --- a/mozilla/mailnews/imap/public/nsIMsgLogonRedirector.idl +++ b/mozilla/mailnews/imap/public/nsIMsgLogonRedirector.idl @@ -1,6 +1,7 @@ #include "nsISupports.idl" typedef long nsMsgLogonRedirectionState; +interface nsIPrompt; [scriptable, uuid(e20261f6-df4f-11d3-b9f9-00108335942a)] interface nsMsgLogonRedirectionStates @@ -46,7 +47,7 @@ interface nsIMsgLogonRedirector : nsISupports // wishes to log on. // aUserName --> the user name we wish to log in under... boolean requiresPassword(in string aUserName); - void logon(in string userName, in string password, in nsIMsgLogonRedirectionRequester listener, in nsMsgLogonRedirectionServiceID aServiceID); + void logon(in string userName, in string password, in nsIPrompt aPrompt, in nsIMsgLogonRedirectionRequester listener, in nsMsgLogonRedirectionServiceID aServiceID); void logoff(in string userName); /* might not need this one */ }; diff --git a/mozilla/mailnews/imap/src/nsImapIncomingServer.cpp b/mozilla/mailnews/imap/src/nsImapIncomingServer.cpp index ceacda3e4f5..4f9558f178e 100644 --- a/mozilla/mailnews/imap/src/nsImapIncomingServer.cpp +++ b/mozilla/mailnews/imap/src/nsImapIncomingServer.cpp @@ -2002,7 +2002,9 @@ nsresult nsImapIncomingServer::RequestOverrideInfo(nsIMsgWindow *aMsgWindow) return NS_OK; } - rv = m_logonRedirector->Logon(userName, password, logonRedirectorRequester, nsMsgLogonRedirectionServiceIDs::Imap); + nsCOMPtr dialogPrompter; + aMsgWindow->GetPromptDialog(getter_AddRefs(dialogPrompter)); + rv = m_logonRedirector->Logon(userName, password, dialogPrompter, logonRedirectorRequester, nsMsgLogonRedirectionServiceIDs::Imap); } }