From 3e30ba523ad0be7d6c63d113c427e4eb18651acd Mon Sep 17 00:00:00 2001 From: "bienvenu%netscape.com" Date: Mon, 2 Aug 1999 21:33:00 +0000 Subject: [PATCH] fix notification of filter folders --- mailnews/base/util/nsMsgFolder.cpp | 17 +++++++++++++++-- mailnews/imap/src/nsImapMailFolder.cpp | 20 +------------------- 2 files changed, 16 insertions(+), 21 deletions(-) diff --git a/mailnews/base/util/nsMsgFolder.cpp b/mailnews/base/util/nsMsgFolder.cpp index 08a8e843609..9ef69d5da0b 100644 --- a/mailnews/base/util/nsMsgFolder.cpp +++ b/mailnews/base/util/nsMsgFolder.cpp @@ -1372,17 +1372,30 @@ NS_IMETHODIMP nsMsgFolder::GetNewMessagesNotificationDescription(PRUnichar * *aD rv = GetServer(getter_AddRefs(server)); if(NS_SUCCEEDED(rv)) { + if (!(mFlags & MSG_FOLDER_FLAG_INBOX)) + { + PRUnichar *folderName = nsnull; + rv = GetPrettyName(&folderName); + if (NS_SUCCEEDED(rv) && folderName) + { + description = folderName; + description += " on "; + PR_Free(folderName); + } + + + } char *serverName = nsnull; rv = server->GetPrettyName(&serverName); if(NS_SUCCEEDED(rv) && PL_strcmp(serverName, "")) - description = serverName; + description += serverName; else { if(serverName) PR_Free(serverName); rv = server->GetHostName(&serverName); if(NS_SUCCEEDED(rv)) - description = serverName; + description += serverName; } if(serverName) PR_Free(serverName); diff --git a/mailnews/imap/src/nsImapMailFolder.cpp b/mailnews/imap/src/nsImapMailFolder.cpp index 8957aa6ece2..5b31c19392b 100644 --- a/mailnews/imap/src/nsImapMailFolder.cpp +++ b/mailnews/imap/src/nsImapMailFolder.cpp @@ -633,25 +633,7 @@ NS_IMETHODIMP nsImapMailFolder::GetName(PRUnichar ** name) NS_IMETHODIMP nsImapMailFolder::GetPrettyName(PRUnichar ** prettyName) { - if (mDepth == 1) { - char *hostName = nsnull; - GetHostname(&hostName); - nsString2 unicodePrettyName(hostName); - *prettyName = unicodePrettyName.ToNewUnicode(); - PR_FREEIF(hostName); - } - else { - nsresult rv = NS_ERROR_NULL_POINTER; - /**** what is this??? doesn't make sense to me - char *pName = prettyName.ToNewCString(); - if (pName) - rv = nsMsgFolder::GetPrettyName(&pName); - delete[] pName; - *****/ - return rv; - } - - return NS_OK; + return GetName(prettyName); } NS_IMETHODIMP nsImapMailFolder::BuildFolderURL(char **url)