Backed out changeset 024c73a5eefd / Bug 545221 due to mozmill test failures
authorMark Banner <bugzilla@standard8.plus.com>
Wed, 17 Mar 2010 09:24:58 +0000
changeset 5194 e8c5c544d57cf3929decabb70246b853505644e3
parent 5193 024c73a5eefd43c52c40591679859f73bb96ec84
child 5195 c3a965df93aee8b4612e03d34a89d0cd084878a7
push idunknown
push userunknown
push dateunknown
bugs545221
backs out024c73a5eefd43c52c40591679859f73bb96ec84
Backed out changeset 024c73a5eefd / Bug 545221 due to mozmill test failures
mail/base/content/folderPane.js
mail/base/content/messenger.xul
--- a/mail/base/content/folderPane.js
+++ b/mail/base/content/folderPane.js
@@ -33,17 +33,17 @@
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 Components.utils.import("resource://gre/modules/iteratorUtils.jsm");
 Components.utils.import("resource://gre/modules/folderUtils.jsm");
 Components.utils.import("resource://app/modules/MailUtils.js");
-const kDefaultMode = "all";
+const kDefaultMode = "smart";
 
 var nsMsgFolderFlags = Components.interfaces.nsMsgFolderFlags;
 
 /**
  * This file contains the controls and functions for the folder pane.
  * The following definitions will be useful to know:
  *
  * gFolderTreeView - the controller for the folder tree.
@@ -136,30 +136,34 @@ let gFolderTreeView = {
    * Called when the window is initially loaded.  This function initializes the
    * folder-pane to the view last shown before the application was closed.
    */
   load: function ftv_load(aTree, aJSONFile) {
     const Cc = Components.classes;
     const Ci = Components.interfaces;
     this._treeElement = aTree;
 
+    let smartName = document.getElementById("bundle_messenger")
+                            .getString("folderPaneModeHeader_smart");
+
     // the folder pane can be used for other trees which may not have these elements.
     if (document.getElementById("folderpane_splitter"))
       document.getElementById("folderpane_splitter").collapsed = false;
     if (document.getElementById("folderPaneBox"))
       document.getElementById("folderPaneBox").collapsed = false;
 
     try {
       // Normally our tree takes care of keeping the last selected by itself.
       // However older versions of TB stored this in a preference, which we need
       // to migrate
       let prefB = Cc["@mozilla.org/preferences-service;1"]
                      .getService(Ci.nsIPrefBranch);
       let modeIndex = prefB.getIntPref("mail.ui.folderpane.view");
-      this._mode = this._modeNames[modeIndex];
+      // upgrade default All to Smart
+      this._mode = (modeIndex == 0) ? kDefaultMode : this._modeNames[modeIndex];
       prefB.deleteBranch("mail.ui.folderpane");
     } catch(ex) {
       // This is ok.  If we've already migrated we'll end up here
     }
 
     if (document.getElementById('folderpane-title')) {
       let string;
         if (this._mode in this._modeDisplayNames)
--- a/mail/base/content/messenger.xul
+++ b/mail/base/content/messenger.xul
@@ -261,17 +261,17 @@
                                onclick="gFolderTreeView.cycleMode(false);"/>
                 <toolbarbutton id="folderview-cycler-next"
                                dir="next"
                                class="folderview-cycler"
                                onclick="gFolderTreeView.cycleMode(true);"/>
               </sidebarheader>
 
               <tree id="folderTree" class="plain" flex="1"
-                    hidecolumnpicker="true" persist="mode" mode="all"
+                    hidecolumnpicker="true" persist="mode" mode="smart"
                     keepcurrentinview="true"
                     context="folderPaneContext"
                     disableKeyNavigation="true"
                     ondraggesture="gFolderTreeView._onDragStart(event);"
                     ondragover="gFolderTreeView._onDragOver(event);"
                     ondblclick="gFolderTreeView.onDoubleClick(event);"
                     onselect="FolderPaneSelectionChange();">
                 <treecols id="folderPaneCols">