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()