151819 152406 r=cavin sr=bienvenu a=valeski fixing aol "Sent mail" and webmail "Draft" and "Sent" folder to show Recipient

instead of Sender and localizing webmail "Sent" and "Draft" folder


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_0_BRANCH@123637 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
naving%netscape.com
2002-06-19 23:02:34 +00:00
parent cac2e2c5d4
commit 527788efa4
2 changed files with 15 additions and 1 deletions

View File

@@ -876,7 +876,9 @@ NS_IMETHODIMP nsMsgFolder::SetPrettyName(const PRUnichar *name)
else if (mFlags & MSG_FOLDER_FLAG_SENTMAIL && unicodeName.Equals(NS_LITERAL_STRING("Sent"), nsCaseInsensitiveStringComparator()))
rv = SetName(kLocalizedSentName);
else if (mFlags & MSG_FOLDER_FLAG_DRAFTS && unicodeName.Equals(NS_LITERAL_STRING("Drafts"), nsCaseInsensitiveStringComparator()))
//netscape webmail uses "Draft" instead of "Drafts"
else if (mFlags & MSG_FOLDER_FLAG_DRAFTS && (unicodeName.Equals(NS_LITERAL_STRING("Drafts"), nsCaseInsensitiveStringComparator())
|| unicodeName.Equals(NS_LITERAL_STRING("Draft"), nsCaseInsensitiveStringComparator())))
rv = SetName(kLocalizedDraftsName);
else if (mFlags & MSG_FOLDER_FLAG_TEMPLATES && unicodeName.Equals(NS_LITERAL_STRING("Templates"), nsCaseInsensitiveStringComparator()))

View File

@@ -1333,6 +1333,18 @@ NS_IMETHODIMP nsImapIncomingServer::PossibleImapMailbox(const char *folderPath,
else
{
rv = ConvertFolderName(onlineName.get(), getter_Copies(convertedName));
//make sure rv value is not crunched, it is used to SetPrettyName
nsXPIDLCString redirectorType;
GetRedirectorType(getter_Copies(redirectorType)); //Sent mail folder as per netscape webmail and aol server
if ((redirectorType.Equals(NS_LITERAL_CSTRING("aol")) && convertedName.Equals(NS_LITERAL_STRING("Sent Mail"))) ||
(redirectorType.Equals(NS_LITERAL_CSTRING("netscape")) && onlineName.Equals(NS_LITERAL_CSTRING("Sent"))))
//we know that we don't allowConversion for netscape webmail so just use the onlineName
child->SetFlag(MSG_FOLDER_FLAG_SENTMAIL);
else if (redirectorType.Equals(NS_LITERAL_CSTRING("netscape")) && onlineName.Equals(NS_LITERAL_CSTRING("Draft")))
child->SetFlag(MSG_FOLDER_FLAG_DRAFTS);
if (NS_SUCCEEDED(rv))
child->SetPrettyName(convertedName);
}