зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
5c02cdebcc
Коммит
6fc8de9da5
|
@ -1550,7 +1550,12 @@ nsMsgAccountManager::MigrateLocalMailAccounts(nsIMsgIdentity *identity)
|
|||
// "none" is the type we use for migrate Local Mail
|
||||
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)
|
||||
{
|
||||
|
|
Загрузка…
Ссылка в новой задаче