зеркало из https://github.com/mozilla/pjs.git
fix notification of filter folders
This commit is contained in:
Родитель
d9d149c1c7
Коммит
3e30ba523a
|
@ -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)
|
||||
|
|
Загрузка…
Ссылка в новой задаче