Bug 480546 - "Archive folders could have the SpecialFolder attribute "Archive" for better skin proposes" [r+sr=Standard8]
authorPardal Freudenthal <pardal@gmx.de>
Mon, 02 Mar 2009 11:54:38 +0000
changeset 2107 ca77c5330e07
parent 2106 d527cea45fc5
child 2108 8a16c5a6c298
push id1703
push userbugzilla@standard8.plus.com
push dateMon, 02 Mar 2009 11:55:01 +0000
treeherdercomm-central@ca77c5330e07 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs480546
Bug 480546 - "Archive folders could have the SpecialFolder attribute "Archive" for better skin proposes" [r+sr=Standard8]
mailnews/base/resources/content/folderWidgets.xml
mailnews/base/util/folderUtils.jsm
--- a/mailnews/base/resources/content/folderWidgets.xml
+++ b/mailnews/base/resources/content/folderWidgets.xml
@@ -609,16 +609,18 @@
           else if (aFolder.flags & Ci.nsMsgFolderFlags.SentMail)
             aMenuNode.setAttribute("SpecialFolder", "Sent");
           else if (aFolder.flags & Ci.nsMsgFolderFlags.Drafts)
             aMenuNode.setAttribute("SpecialFolder", "Drafts");
           else if (aFolder.flags & Ci.nsMsgFolderFlags.Templates)
             aMenuNode.setAttribute("SpecialFolder", "Templates");
           else if (aFolder.flags & Ci.nsMsgFolderFlags.Junk)
             aMenuNode.setAttribute("SpecialFolder", "Junk");
+          else if (aFolder.flags & Ci.nsMsgFolderFlags.Archive)
+            aMenuNode.setAttribute("SpecialFolder", "Archive");
           else if (aFolder.flags & Ci.nsMsgFolderFlags.Virtual)
             aMenuNode.setAttribute("SpecialFolder", "Virtual");
           else
             aMenuNode.setAttribute("SpecialFolder", "none");
 
           // Now set the biffState
           var biffStates = ["NewMail", "NoMail", "UnknownMail"];
           for each (var state in biffStates) {
--- a/mailnews/base/util/folderUtils.jsm
+++ b/mailnews/base/util/folderUtils.jsm
@@ -59,16 +59,18 @@ function getSpecialFolderString(aFolder)
   if (aFolder.flags & Ci.nsMsgFolderFlags.Drafts)
     return "Drafts";
   if (aFolder.flags & Ci.nsMsgFolderFlags.Templates)
     return "Templates";
   if (aFolder.flags & Ci.nsMsgFolderFlags.Junk)
     return "Junk";
   if (aFolder.flags & Ci.nsMsgFolderFlags.Virtual)
     return "Virtual";
+  if (aFolder.flags & Ci.nsMsgFolderFlags.Archive)
+    return "Archive";
   return "none";
 }
 
 /**
  * This function is meant to be used with trees. It adds atoms for all of the
  * common properties that css styling is based off of.
  *
  * @param aFolder     the folder whose properties should be added as atoms