From 5139d46ef48a06216eabb2a591fb5bf16bcac0fa Mon Sep 17 00:00:00 2001 From: "mscott%netscape.com" Date: Wed, 9 Aug 2000 22:32:45 +0000 Subject: [PATCH] Bug #44163 --> FEAlert and FEAlertFromServer need a message window r=bienvenu git-svn-id: svn://10.0.0.236/trunk@75914 18797224-902f-48f8-a5cc-f745e15eee43 --- .../mailnews/imap/public/nsIImapServerSink.idl | 4 ++-- mozilla/mailnews/imap/src/nsImapProtocol.cpp | 18 ++++++++++++------ 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/mozilla/mailnews/imap/public/nsIImapServerSink.idl b/mozilla/mailnews/imap/public/nsIImapServerSink.idl index 804fec7b58b..3b02ebce408 100644 --- a/mozilla/mailnews/imap/public/nsIImapServerSink.idl +++ b/mozilla/mailnews/imap/public/nsIImapServerSink.idl @@ -42,8 +42,8 @@ interface nsIImapServerSink : nsISupports { void LoadNextQueuedUrl(out boolean urlRun); void GetImapStringByID(in long aMsgId, out wstring aString); - void FEAlert(in wstring aString); - void FEAlertFromServer(in string aString); + void FEAlert(in wstring aString, in nsIMsgWindow aMsgWindow); + void FEAlertFromServer(in string aString, in nsIMsgWindow aMsgWindow); void CommitNamespaces(); void PromptForPassword(out string aString, in nsIMsgWindow aMsgWindow); void SetUserAuthenticated(in boolean authenticated); diff --git a/mozilla/mailnews/imap/src/nsImapProtocol.cpp b/mozilla/mailnews/imap/src/nsImapProtocol.cpp index 56a6cb53ec5..926da0cd98a 100644 --- a/mozilla/mailnews/imap/src/nsImapProtocol.cpp +++ b/mozilla/mailnews/imap/src/nsImapProtocol.cpp @@ -3946,8 +3946,9 @@ nsImapProtocol::AlertUserEventUsingId(PRUint32 aMessageId) { PRUnichar *progressString = nsnull; m_imapServerSink->GetImapStringByID(aMessageId, &progressString); - - m_imapServerSink->FEAlert(progressString); + nsCOMPtr msgWindow; + GetMsgWindow(getter_AddRefs(msgWindow)); + m_imapServerSink->FEAlert(progressString, msgWindow); PR_FREEIF(progressString); } } @@ -3955,10 +3956,11 @@ nsImapProtocol::AlertUserEventUsingId(PRUint32 aMessageId) void nsImapProtocol::AlertUserEvent(const char * message) { - if (m_imapServerSink) + if (m_imapServerSink) { - nsAutoString uniString; uniString.AssignWithConversion(message); - m_imapServerSink->FEAlert(uniString.GetUnicode()); + nsCOMPtr msgWindow; + GetMsgWindow(getter_AddRefs(msgWindow)); + m_imapServerSink->FEAlert(NS_LITERAL_STRING(message), msgWindow); } } @@ -3966,7 +3968,11 @@ void nsImapProtocol::AlertUserEventFromServer(const char * aServerEvent) { if (m_imapServerSink) - m_imapServerSink->FEAlertFromServer(aServerEvent); + { + nsCOMPtr msgWindow; + GetMsgWindow(getter_AddRefs(msgWindow)); + m_imapServerSink->FEAlertFromServer(aServerEvent, msgWindow); + } } void nsImapProtocol::ResetProgressInfo()