Bug 473529 Archives folder doesn't use localized name in L10n builds. r/sr=bienvenu
authorMark Banner <bugzilla@standard8.plus.com>
Thu, 22 Jan 2009 16:39:47 +0000
changeset 1718 b3045b2abbb0c9a7d88f41d0977f43b84658f31c
parent 1717 b03f3642d52700bbd9d2588e536af8473e5a470d
child 1719 3335d5d6ae7d73c7adeadd493c481c109c6c9052
push idunknown
push userunknown
push dateunknown
bugs473529
Bug 473529 Archives folder doesn't use localized name in L10n builds. r/sr=bienvenu
mailnews/base/src/nsMsgFolderDataSource.cpp
mailnews/local/src/nsLocalMailFolder.cpp
mailnews/local/src/nsMovemailIncomingServer.cpp
mailnews/local/src/nsNoIncomingServer.cpp
mailnews/local/src/nsPop3IncomingServer.cpp
--- a/mailnews/base/src/nsMsgFolderDataSource.cpp
+++ b/mailnews/base/src/nsMsgFolderDataSource.cpp
@@ -1119,16 +1119,18 @@ nsMsgFolderDataSource::createFolderSpeci
   else if (flags & nsMsgFolderFlags::Drafts)
     specialFolderString.AssignLiteral("Drafts");
   else if (flags & nsMsgFolderFlags::Templates)
     specialFolderString.AssignLiteral("Templates");
   else if (flags & nsMsgFolderFlags::Junk)
     specialFolderString.AssignLiteral("Junk");
   else if (flags & nsMsgFolderFlags::Virtual)
     specialFolderString.AssignLiteral("Virtual");
+  else if (flags & nsMsgFolderFlags::Archive)
+    specialFolderString.AssignLiteral("Archives");
   else {
     // XXX why do this at all? or just ""
     specialFolderString.AssignLiteral("none");
   }
 
   createNode(specialFolderString.get(), target, getRDFService());
   return NS_OK;
 }
--- a/mailnews/local/src/nsLocalMailFolder.cpp
+++ b/mailnews/local/src/nsLocalMailFolder.cpp
@@ -3364,16 +3364,19 @@ nsMsgLocalMailFolder::SetFlagsOnDefaultM
     setSubfolderFlag(NS_LITERAL_STRING("Trash"), nsMsgFolderFlags::Trash);
 
   if (flags & nsMsgFolderFlags::Queue)
     setSubfolderFlag(NS_LITERAL_STRING("Unsent Messages"), nsMsgFolderFlags::Queue);
 
   if (flags & nsMsgFolderFlags::Junk)
     setSubfolderFlag(NS_LITERAL_STRING("Junk"), nsMsgFolderFlags::Junk);
 
+  if (flags & nsMsgFolderFlags::Archive)
+    setSubfolderFlag(NS_LITERAL_STRING("Archives"), nsMsgFolderFlags::Archive);
+
   return NS_OK;
 }
 
 nsresult
 nsMsgLocalMailFolder::setSubfolderFlag(const nsAString& aFolderName, PRUint32 flags)
 {
   // FindSubFolder() expects the folder name to be escaped
   // see bug #192043
--- a/mailnews/local/src/nsMovemailIncomingServer.cpp
+++ b/mailnews/local/src/nsMovemailIncomingServer.cpp
@@ -143,16 +143,17 @@ nsMovemailIncomingServer::SetFlagsOnDefa
     nsresult rv = GetRootFolder(getter_AddRefs(rootFolder));
     NS_ENSURE_SUCCESS(rv, rv);
 
     nsCOMPtr<nsIMsgLocalMailFolder> localFolder =
         do_QueryInterface(rootFolder, &rv);
     NS_ENSURE_SUCCESS(rv, rv);
 
     localFolder->SetFlagsOnDefaultMailboxes(nsMsgFolderFlags::Inbox |
+                                            nsMsgFolderFlags::Archive |
                                             nsMsgFolderFlags::SentMail |
                                             nsMsgFolderFlags::Drafts |
                                             nsMsgFolderFlags::Templates |
                                             nsMsgFolderFlags::Trash |
                                             nsMsgFolderFlags::Junk |
                                             // hmm?
                                             nsMsgFolderFlags::Queue);
     return NS_OK;
--- a/mailnews/local/src/nsNoIncomingServer.cpp
+++ b/mailnews/local/src/nsNoIncomingServer.cpp
@@ -83,16 +83,17 @@ nsNoIncomingServer::SetFlagsOnDefaultMai
   nsresult rv = GetRootFolder(getter_AddRefs(rootFolder));
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsCOMPtr<nsIMsgLocalMailFolder> localFolder =
       do_QueryInterface(rootFolder, &rv);
   NS_ENSURE_SUCCESS(rv, rv);
 
   PRUint32 mailboxFlags = nsMsgFolderFlags::SentMail |
+                          nsMsgFolderFlags::Archive |
                           nsMsgFolderFlags::Drafts |
                           nsMsgFolderFlags::Templates |
                           nsMsgFolderFlags::Trash |
                           nsMsgFolderFlags::Junk |
                           nsMsgFolderFlags::Queue;
 
   // "none" may have a inbox if it is getting deferred to.
   PRBool isDeferredTo;
--- a/mailnews/local/src/nsPop3IncomingServer.cpp
+++ b/mailnews/local/src/nsPop3IncomingServer.cpp
@@ -363,16 +363,17 @@ nsPop3IncomingServer::SetFlagsOnDefaultM
   nsresult rv = GetRootFolder(getter_AddRefs(rootFolder));
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsCOMPtr<nsIMsgLocalMailFolder> localFolder = do_QueryInterface(rootFolder, &rv);
   NS_ENSURE_SUCCESS(rv, rv);
 
   // pop3 gets an inbox, but no queue (unsent messages)
   localFolder->SetFlagsOnDefaultMailboxes(nsMsgFolderFlags::Inbox |
+                                          nsMsgFolderFlags::Archive |
                                           nsMsgFolderFlags::SentMail |
                                           nsMsgFolderFlags::Drafts |
                                           nsMsgFolderFlags::Templates |
                                           nsMsgFolderFlags::Trash |
                                           nsMsgFolderFlags::Junk);
   return NS_OK;
 }