don't override GetPrettyName in nsNoIncomingServer. I was being silly. All I really needed to do was call SetPrettyName with 'Local Mail' to get the desired effect.

This commit is contained in:
sspitzer%netscape.com 1999-09-14 05:10:53 +00:00
Родитель 5c02cdebcc
Коммит 6fc8de9da5
2 изменённых файлов: 6 добавлений и 18 удалений

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

@ -1551,6 +1551,11 @@ nsMsgAccountManager::MigrateLocalMailAccounts(nsIMsgIdentity *identity)
server->SetType("none");
server->SetHostName(LOCAL_MAIL_FAKE_HOST_NAME);
// we don't want "nobody at Local Mail" to show up in the
// folder pane, so we set the pretty name to "Local Mail"
nsString localMailFakeHostName(LOCAL_MAIL_FAKE_HOST_NAME);
server->SetPrettyName(localMailFakeHostName.ToNewUnicode());
// create the directory structure for old 4.x "Local Mail"
// under <profile dir>/Mail/Local Mail or
// <"mail.directory" pref>/Local Mail

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

@ -41,7 +41,6 @@ public:
virtual ~nsNoIncomingServer();
NS_IMETHOD GetServerURI(char * *uri);
NS_IMETHOD GetPrettyName(PRUnichar **retval);
};
NS_IMPL_ISUPPORTS_INHERITED(nsNoIncomingServer,
@ -78,22 +77,6 @@ nsNoIncomingServer::GetServerURI(char **uri)
return rv;
}
// we don't want to see "nobody at Local Mail" so we need to over ride this
NS_IMETHODIMP
nsNoIncomingServer::GetPrettyName(PRUnichar **retval)
{
nsresult rv;
nsXPIDLCString hostname;
rv = GetHostName(getter_Copies(hostname));
if (NS_FAILED(rv)) return rv;
nsString prettyName = (const char *)hostname;
*retval = prettyName.ToNewUnicode();
return NS_OK;
}
nsresult NS_NewNoIncomingServer(const nsIID& iid,
void **result)
{