fix notification of filter folders

This commit is contained in:
bienvenu%netscape.com 1999-08-02 21:33:00 +00:00
Родитель d9d149c1c7
Коммит 3e30ba523a
2 изменённых файлов: 16 добавлений и 21 удалений

Просмотреть файл

@ -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);

Просмотреть файл

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