diff --git a/mailnews/base/resources/content/msgMail3PaneWindow.js b/mailnews/base/resources/content/msgMail3PaneWindow.js index db97e5ea188..51acb077f56 100644 --- a/mailnews/base/resources/content/msgMail3PaneWindow.js +++ b/mailnews/base/resources/content/msgMail3PaneWindow.js @@ -611,6 +611,7 @@ function AddToSession() function InitPanes() { OnLoadFolderPane(); + OnLoadThreadPane(); SetupCommandUpdateHandlers(); } @@ -691,6 +692,35 @@ function OnLoadFolderPane() folderOutliner.addEventListener("click",FolderPaneOnClick,true); } +// builds prior to 12-08-2001 did not have the labels column +// in the thread pane. so if a user ran an old build, and then +// upgraded, they get the new column, and this causes problems. +// We're trying to avoid a similar problem to bug #96979. +// to work around this, we hide the column once, using the +// "mailnews.ui.threadpane.version" pref. +function UpgradeThreadPaneUI() +{ + var labelCol; + var threadPaneUIVersion; + + try { + threadPaneUIVersion = pref.getIntPref("mailnews.ui.threadpane.version"); + if (threadPaneUIVersion == 1) { + labelCol = document.getElementById("labelCol"); + labelCol.setAttribute("hidden", "true"); + pref.setIntPref("mailnews.ui.threadpane.version", 2); + } + } + catch (ex) { + dump("UpgradeThreadPane: ex = " + ex + "\n"); + } +} + +function OnLoadThreadPane() +{ + UpgradeThreadPaneUI(); +} + function GetFolderDatasource() { var folderOutliner = GetFolderOutliner(); diff --git a/mailnews/mailnews.js b/mailnews/mailnews.js index 6d824ce5544..49421c16e03 100644 --- a/mailnews/mailnews.js +++ b/mailnews/mailnews.js @@ -332,6 +332,11 @@ pref("mail.server.default.retainBy", 1); // unread and total columns, see msgMail3PaneWindow.js pref("mail.ui.folderpane.version", 1); +// for manual upgrades of certain UI features. +// 1 -> 2 is for the thread pane outliner landing, to hide the +// labels column, see msgMail3PaneWindow.js +pref("mailnews.ui.threadpane.version", 1); + //If set to a number greater than 0, msg compose windows will be recycled in order to open them quickly pref("mail.compose.max_recycled_windows", 0); diff --git a/modules/libpref/src/init/mailnews.js b/modules/libpref/src/init/mailnews.js index 6d824ce5544..49421c16e03 100644 --- a/modules/libpref/src/init/mailnews.js +++ b/modules/libpref/src/init/mailnews.js @@ -332,6 +332,11 @@ pref("mail.server.default.retainBy", 1); // unread and total columns, see msgMail3PaneWindow.js pref("mail.ui.folderpane.version", 1); +// for manual upgrades of certain UI features. +// 1 -> 2 is for the thread pane outliner landing, to hide the +// labels column, see msgMail3PaneWindow.js +pref("mailnews.ui.threadpane.version", 1); + //If set to a number greater than 0, msg compose windows will be recycled in order to open them quickly pref("mail.compose.max_recycled_windows", 0); diff --git a/profile/defaults/localstore.rdf b/profile/defaults/localstore.rdf index b43c47bb164..ab7ec702f8b 100644 --- a/profile/defaults/localstore.rdf +++ b/profile/defaults/localstore.rdf @@ -5,6 +5,9 @@ true + + true + true @@ -33,6 +36,7 @@ + @@ -82,6 +86,9 @@ true + + true + true @@ -110,6 +117,7 @@ +