From 6fc8de9da52a65587f0640ca89dcb59f42cd096c Mon Sep 17 00:00:00 2001 From: "sspitzer%netscape.com" Date: Tue, 14 Sep 1999 05:10:53 +0000 Subject: [PATCH] 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. --- mailnews/base/src/nsMsgAccountManager.cpp | 7 ++++++- mailnews/local/src/nsNoIncomingServer.cpp | 17 ----------------- 2 files changed, 6 insertions(+), 18 deletions(-) diff --git a/mailnews/base/src/nsMsgAccountManager.cpp b/mailnews/base/src/nsMsgAccountManager.cpp index 0b439ea21c45..13df56dcfd3e 100644 --- a/mailnews/base/src/nsMsgAccountManager.cpp +++ b/mailnews/base/src/nsMsgAccountManager.cpp @@ -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 /Mail/Local Mail or // <"mail.directory" pref>/Local Mail diff --git a/mailnews/local/src/nsNoIncomingServer.cpp b/mailnews/local/src/nsNoIncomingServer.cpp index c9d31abc68e1..3790d3733051 100644 --- a/mailnews/local/src/nsNoIncomingServer.cpp +++ b/mailnews/local/src/nsNoIncomingServer.cpp @@ -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) {