fixing bug 114076 - labels migration and new profile issues. r=bhuvan, sr=sspitzer, a=asa

This commit is contained in:
ssu%netscape.com 2001-12-14 02:57:31 +00:00
Родитель 4b4588d9a7
Коммит 9fc1685f86
4 изменённых файлов: 48 добавлений и 0 удалений

Просмотреть файл

@ -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();

Просмотреть файл

@ -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);

Просмотреть файл

@ -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);

Просмотреть файл

@ -5,6 +5,9 @@
<RDF:Description about="chrome://messenger/content/messenger.xul#flaggedCol">
<hidden>true</hidden>
</RDF:Description>
<RDF:Description about="chrome://messenger/content/messenger.xul#labelCol">
<hidden>true</hidden>
</RDF:Description>
<RDF:Description about="chrome://messenger/content/messenger.xul#unreadCol">
<hidden>true</hidden>
</RDF:Description>
@ -33,6 +36,7 @@
<NC:persist resource="chrome://messenger/content/messenger.xul#totalCol"/>
<NC:persist resource="chrome://messenger/content/messenger.xul#OrderReceivedColumn"/>
<NC:persist resource="chrome://messenger/content/messenger.xul#flaggedCol"/>
<NC:persist resource="chrome://messenger/content/messenger.xul#labelCol"/>
<NC:persist resource="chrome://messenger/content/messenger.xul#folderUnreadCol"/>
<NC:persist resource="chrome://messenger/content/messenger.xul#folderTotalCol"/>
<NC:persist resource="chrome://messenger/content/messenger.xul#messengerWindow"/>
@ -82,6 +86,9 @@
<RDF:Description about="chrome://messenger/content/mail3PaneWindowVertLayout.xul#flaggedCol">
<hidden>true</hidden>
</RDF:Description>
<RDF:Description about="chrome://messenger/content/mail3PaneWindowVertLayout.xul#labelCol">
<hidden>true</hidden>
</RDF:Description>
<RDF:Description about="chrome://messenger/content/mail3PaneWindowVertLayout.xul#unreadCol">
<hidden>true</hidden>
</RDF:Description>
@ -110,6 +117,7 @@
<NC:persist resource="chrome://messenger/content/mail3PaneWindowVertLayout.xul#totalCol"/>
<NC:persist resource="chrome://messenger/content/mail3PaneWindowVertLayout.xul#OrderReceivedColumn"/>
<NC:persist resource="chrome://messenger/content/mail3PaneWindowVertLayout.xul#flaggedCol"/>
<NC:persist resource="chrome://messenger/content/mail3PaneWindowVertLayout.xul#labelCol"/>
<NC:persist resource="chrome://messenger/content/mail3PaneWindowVertLayout.xul#folderUnreadCol"/>
<NC:persist resource="chrome://messenger/content/mail3PaneWindowVertLayout.xul#folderTotalCol"/>
</RDF:Description>