Bug 195248 set some default attributes in XUL instead of localstore now that bug123285 persists them correctly p=me/Standard8 r=Mnyromyr sr=bienvenu r+sr=mscott

This commit is contained in:
neil%parkwaycc.co.uk 2005-04-29 13:04:53 +00:00
Родитель 0911e83759
Коммит 81832e4ab9
7 изменённых файлов: 53 добавлений и 219 удалений

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

@ -2,38 +2,4 @@
<RDF:RDF
xmlns:NC="http://home.netscape.com/NC-rdf#"
xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<RDF:Description about="chrome://messenger/content/messenger.xul#flaggedCol">
<hidden>true</hidden>
</RDF:Description>
<RDF:Description about="chrome://messenger/content/messenger.xul#unreadCol">
<hidden>true</hidden>
</RDF:Description>
<RDF:Description about="chrome://messenger/content/messenger.xul#totalCol">
<hidden>true</hidden>
</RDF:Description>
<RDF:Description about="chrome://messenger/content/messenger.xul#OrderReceivedColumn">
<hidden>true</hidden>
</RDF:Description>
<RDF:Description about="chrome://messenger/content/messenger.xul#statusCol">
<hidden>true</hidden>
</RDF:Description>
<RDF:Description about="chrome://messenger/content/messenger.xul#sizeCol">
<hidden>true</hidden>
</RDF:Description>
</RDF:Description>
<RDF:Description about="chrome://messenger/content/addressbook/addressbook.xul">
<NC:persist resource="chrome://messenger/content/addressbook/addressbook.xul#abResultsOutliner"/>
</RDF:Description>
<RDF:Description about="chrome://messenger/content/addressbook/addressbook.xul#abResultsOutliner" height="94" />
<RDF:Description about="chrome://messenger/content/messenger.xul">
<NC:persist resource="chrome://messenger/content/messenger.xul#statusCol"/>
<NC:persist resource="chrome://messenger/content/messenger.xul#sizeCol"/>
<NC:persist resource="chrome://messenger/content/messenger.xul#unreadCol"/>
<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#messengerWindow"/>
<NC:persist resource="chrome://messenger/content/messenger.xul#threadOutliner"/>
</RDF:Description>
<RDF:Description about="chrome://messenger/content/messenger.xul#threadOutliner" height="94" />
</RDF:RDF>

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

@ -1127,12 +1127,6 @@ function UpgradeThreadPaneUI()
// date column.
var dateCol = document.getElementById("dateCol");
threadTree._reorderColumn(junkCol, dateCol, true);
// hide labels column by default
if (threadPaneUIVersion == 1) {
labelCol = document.getElementById("labelCol");
labelCol.setAttribute("hidden", "true");
}
}
var senderCol = document.getElementById("senderCol");

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

@ -280,30 +280,10 @@ function InitCommonJS()
gAddressBookBundle = document.getElementById("bundle_addressBook");
}
// builds prior to 12-08-2001 did not use an tree for
// the results pane. so for any existing profiles will
// get all columns, whereas new profile only get a select few
// because we hide them by default in localStore.rdf
// to work around this, we hide the non-default columns once.
// there is more than one results pane (addressbook, select addresses,
// addressbook sidebar channel, etc) so we'll pass in the
// the pref so that we'll migrate each of them once.
function UpgradeAddressBookResultsPaneUI(prefName)
{
try {
var resultsPaneUIVersion = gPrefs.getIntPref(prefName);
if (resultsPaneUIVersion == 1) {
// hide all columns with hiddenbydefault="true"
var elements = document.getElementsByAttribute("hiddenbydefault","true");
for (var i=0; i<elements.length; i++) {
elements[i].setAttribute("hidden","true");
}
gPrefs.setIntPref(prefName, 2);
}
}
catch (ex) {
dump("UpgradeAddressBookResultsPaneUI " + prefName + " ex = " + ex + "\n");
}
// placeholder in case any new columns get added to the address book
// var resultsPaneUIVersion = gPrefs.getIntPref(prefName);
}
function SetupAbCommandUpdateHandlers()

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

@ -57,69 +57,64 @@
<treecols id="abResultsTreeCols">
<!-- these column ids must match up to the mork column names, except for GeneratedName, see nsIAddrDatabase.idl -->
<treecol id="GeneratedName" class="sortDirectionIndicator"
<treecol id="GeneratedName" class="sortDirectionIndicator"
persist="hidden ordinal width sortDirection" flex="1"
label="&GeneratedName.label;" primary="true"/>
<splitter class="tree-splitter"/>
<treecol id="PrimaryEmail" class="sortDirectionIndicator"
persist="hidden ordinal width sortDirection" flex="1" label="&PrimaryEmail.label;"/>
<splitter class="tree-splitter"/>
<treecol id="_AimScreenName" class="sortDirectionIndicator"
persist="hidden ordinal width sortDirection" flex="1" label="&ScreenName.label;"/>
<splitter class="tree-splitter"/>
<treecol id="Company" class="sortDirectionIndicator"
persist="hidden ordinal width sortDirection" flex="1" label="&Company.label;"/>
<splitter class="tree-splitter"/>
<treecol id="NickName" class="sortDirectionIndicator"
persist="hidden ordinal width sortDirection"
hiddenbydefault="true"
flex="1" label="&NickName.label;"/>
<splitter class="tree-splitter"/>
<splitter class="tree-splitter"/>
<treecol id="PrimaryEmail" class="sortDirectionIndicator"
persist="hidden ordinal width sortDirection" flex="1"
label="&PrimaryEmail.label;"/>
<splitter class="tree-splitter"/>
<treecol id="_AimScreenName" class="sortDirectionIndicator"
persist="hidden ordinal width sortDirection" flex="1"
label="&ScreenName.label;"/>
<splitter class="tree-splitter"/>
<treecol id="Company" class="sortDirectionIndicator"
persist="hidden ordinal width sortDirection" flex="1"
label="&Company.label;"/>
<splitter class="tree-splitter"/>
<treecol id="NickName" class="sortDirectionIndicator"
persist="hidden ordinal width sortDirection" flex="1"
label="&NickName.label;" hidden="true"/>
<splitter class="tree-splitter"/>
<treecol id="SecondEmail" class="sortDirectionIndicator"
persist="hidden ordinal width sortDirection"
hiddenbydefault="true"
flex="1" label="&SecondEmail.label;"/>
<splitter class="tree-splitter"/>
persist="hidden ordinal width sortDirection" flex="1"
label="&SecondEmail.label;" hidden="true"/>
<splitter class="tree-splitter"/>
<treecol id="Department" class="sortDirectionIndicator"
persist="hidden ordinal width sortDirection"
hiddenbydefault="true"
flex="1" label="&Department.label;"/>
<splitter class="tree-splitter"/>
persist="hidden ordinal width sortDirection" flex="1"
label="&Department.label;" hidden="true"/>
<splitter class="tree-splitter"/>
<treecol id="JobTitle" class="sortDirectionIndicator"
persist="hidden ordinal width sortDirection"
hiddenbydefault="true"
flex="1" label="&JobTitle.label;"/>
<splitter class="tree-splitter"/>
<treecol id="CellularNumber" class="sortDirectionIndicator"
persist="hidden ordinal width sortDirection"
hiddenbydefault="true"
flex="1" label="&CellularNumber.label;"/>
<splitter class="tree-splitter"/>
persist="hidden ordinal width sortDirection" flex="1"
label="&JobTitle.label;" hidden="true"/>
<splitter class="tree-splitter"/>
<treecol id="CellularNumber" class="sortDirectionIndicator"
persist="hidden ordinal width sortDirection" flex="1"
label="&CellularNumber.label;" hidden="true"/>
<splitter class="tree-splitter"/>
<treecol id="PagerNumber" class="sortDirectionIndicator"
persist="hidden ordinal width sortDirection"
hiddenbydefault="true"
flex="1" label="&PagerNumber.label;"/>
<splitter class="tree-splitter"/>
persist="hidden ordinal width sortDirection" flex="1"
label="&PagerNumber.label;" hidden="true"/>
<splitter class="tree-splitter"/>
<treecol id="FaxNumber" class="sortDirectionIndicator"
persist="hidden ordinal width sortDirection"
hiddenbydefault="true"
flex="1" label="&FaxNumber.label;"/>
<splitter class="tree-splitter"/>
persist="hidden ordinal width sortDirection" flex="1"
label="&FaxNumber.label;" hidden="true"/>
<splitter class="tree-splitter"/>
<treecol id="HomePhone" class="sortDirectionIndicator"
persist="hidden ordinal width sortDirection"
hiddenbydefault="true"
flex="1" label="&HomePhone.label;"/>
persist="hidden ordinal width sortDirection" flex="1"
label="&HomePhone.label;" hidden="true"/>
<splitter class="tree-splitter"/>
<treecol id="WorkPhone" class="sortDirectionIndicator"
persist="hidden ordinal width sortDirection" flex="1" label="&WorkPhone.label;"/>
persist="hidden ordinal width sortDirection" flex="1"
label="&WorkPhone.label;"/>
<!-- LOCALIZATION NOTE: _PhoneticName may be enabled for Japanese builds. -->
<!--
<treecol id="_PhoneticName" class="sortDirectionIndicator"
persist="hidden ordinal width sortDirection"
hiddenbydefault="true"
flex="1" label="&_PhoneticName.label;"/>
<splitter class="tree-splitter"/>
<treecol id="_PhoneticName" class="sortDirectionIndicator"
persist="hidden ordinal width sortDirection" flex="1"
label="&_PhoneticName.label;" hidden="true"/>
-->
</treecols>

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

@ -154,16 +154,19 @@
sortDirection="ascending"/>
<splitter class="tree-splitter"/>
<treecol id="folderUnreadCol"
hidden="true"
persist="hidden width"
flex="1"
label="&unreadColumn.label;"/>
<splitter class="tree-splitter"/>
<treecol id="folderTotalCol"
hidden="true"
persist="hidden width"
flex="1"
label="&totalColumn.label;"/>
<splitter class="tree-splitter"/>
<treecol id="folderSizeCol"
hidden="true"
persist="hidden width"
flex="1"
label="&folderSizeColumn.label;"/>

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

@ -918,28 +918,11 @@ function OnFolderUnreadColAttrModified(event)
}
}
// builds prior to 8-14-2001 did not have the unread and total columns
// in the folder pane. so if a user ran an old build, and then
// upgraded, they get the new columns, and this causes problems
// because it looks like all the folder names are gone (see bug #96979)
// to work around this, we hide those columns once, using the
// "mail.ui.folderpane.version" pref.
function UpgradeFolderPaneUI()
{
var folderPaneUIVersion = pref.getIntPref("mail.ui.folderpane.version");
if (folderPaneUIVersion == 1) {
var folderUnreadCol = document.getElementById("folderUnreadCol");
folderUnreadCol.setAttribute("hidden", "true");
var folderTotalCol = document.getElementById("folderTotalCol");
folderTotalCol.setAttribute("hidden", "true");
pref.setIntPref("mail.ui.folderpane.version", 2);
} // we fall through to the == 2 case so we'll upgrade v 1 profiles correctly
if (folderPaneUIVersion <= 2) {
var folderSizeCol = document.getElementById("folderSizeCol");
folderSizeCol.setAttribute("hidden", "true");
pref.setIntPref("mail.ui.folderpane.version", 3);
}
// placeholder in case any new columns get added to the folder pane
// note that this function fails to notice a pane layout switch
// var folderPaneUIVersion = pref.getIntPref("mail.ui.folderpane.version");
}
function OnLoadFolderPane()
@ -979,7 +962,6 @@ function OnLoadFolderPane()
// "mailnews.ui.threadpane.version" pref.
function UpgradeThreadPaneUI()
{
var labelCol;
var threadPaneUIVersion;
try {
@ -997,11 +979,6 @@ function UpgradeThreadPaneUI()
threadTree._reorderColumn(junkCol, beforeCol, true);
else // subjectCol was the last column, put it after
threadTree._reorderColumn(junkCol, subjectCol, false);
if (threadPaneUIVersion == 1) {
labelCol = document.getElementById("labelCol");
labelCol.setAttribute("hidden", "true");
}
}
var senderCol = document.getElementById("senderCol");
@ -1016,7 +993,7 @@ function UpgradeThreadPaneUI()
pref.setIntPref("mailnews.ui.threadpane.version", 4);
}
}
}
catch (ex) {
dump("UpgradeThreadPane: ex = " + ex + "\n");
}

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

@ -1,81 +0,0 @@
<?xml version="1.0"?>
<RDF:RDF
xmlns:NC="http://home.netscape.com/NC-rdf#"
xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<RDF:Description about="chrome://messenger/content/messenger.xul#flaggedCol">
<hidden>true</hidden>
</RDF:Description>
<RDF:Description about="chrome://messenger/content/messenger.xul#unreadCol">
<hidden>true</hidden>
</RDF:Description>
<RDF:Description about="chrome://messenger/content/messenger.xul#totalCol">
<hidden>true</hidden>
</RDF:Description>
<RDF:Description about="chrome://messenger/content/messenger.xul#OrderReceivedColumn">
<hidden>true</hidden>
</RDF:Description>
<RDF:Description about="chrome://messenger/content/messenger.xul#statusCol">
<hidden>true</hidden>
</RDF:Description>
<RDF:Description about="chrome://messenger/content/messenger.xul#sizeCol">
<hidden>true</hidden>
</RDF:Description>
<RDF:Description about="chrome://messenger/content/addressbook/addressbook.xul">
<NC:persist resource="chrome://messenger/content/addressbook/addressbook.xul#abResultsOutliner"/>
</RDF:Description>
<RDF:Description about="chrome://messenger/content/addressbook/addressbook.xul#abResultsOutliner" height="94" />
<RDF:Description about="chrome://messenger/content/messenger.xul">
<NC:persist resource="chrome://messenger/content/messenger.xul#statusCol"/>
<NC:persist resource="chrome://messenger/content/messenger.xul#sizeCol"/>
<NC:persist resource="chrome://messenger/content/messenger.xul#unreadCol"/>
<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#threadOutliner"/>
</RDF:Description>
<RDF:Description about="chrome://messenger/content/messenger.xul#threadOutliner" height="94" />
<RDF:Description about="chrome://messenger/content/mail3PaneWindowVertLayout.xul">
<NC:persist resource="chrome://messenger/content/mail3PaneWindowVertLayout.xul#threadOutliner"/>
</RDF:Description>
<RDF:Description about="chrome://messenger/content/mail3PaneWindowVertLayout.xul#threadOutliner" height="94" />
<RDF:Description about="chrome://navigator/content/navigator.xul#sidebar-panels">
<last-selected-panel>urn:sidebar:panel:bookmarks</last-selected-panel>
</RDF:Description>
<RDF:Description about="chrome://navigator/content/navigator.xul#sidebar-box">
<hidden>true</hidden>
</RDF:Description>
<RDF:Description about="chrome://navigator/content/navigator.xul#sidebar-splitter">
<hidden>true</hidden>
</RDF:Description>
<RDF:Description about="chrome://navigator/content/navigator.xul">
<NC:persist resource="chrome://navigator/content/navigator.xul#sidebar-panels"/>
<NC:persist resource="chrome://navigator/content/navigator.xul#sidebar-box"/>
<NC:persist resource="chrome://navigator/content/navigator.xul#sidebar-splitter"/>
</RDF:Description>
<RDF:Description about="chrome://messenger/content/mail3PaneWindowVertLayout.xul#flaggedCol">
<hidden>true</hidden>
</RDF:Description>
<RDF:Description about="chrome://messenger/content/mail3PaneWindowVertLayout.xul#unreadCol">
<hidden>true</hidden>
</RDF:Description>
<RDF:Description about="chrome://messenger/content/mail3PaneWindowVertLayout.xul#totalCol">
<hidden>true</hidden>
</RDF:Description>
<RDF:Description about="chrome://messenger/content/mail3PaneWindowVertLayout.xul#OrderReceivedColumn">
<hidden>true</hidden>
</RDF:Description>
<RDF:Description about="chrome://messenger/content/mail3PaneWindowVertLayout.xul#statusCol">
<hidden>true</hidden>
</RDF:Description>
<RDF:Description about="chrome://messenger/content/mail3PaneWindowVertLayout.xul#sizeCol">
<hidden>true</hidden>
</RDF:Description>
<RDF:Description about="chrome://messenger/content/mail3PaneWindowVertLayout.xul">
<NC:persist resource="chrome://messenger/content/mail3PaneWindowVertLayout.xul#statusCol"/>
<NC:persist resource="chrome://messenger/content/mail3PaneWindowVertLayout.xul#sizeCol"/>
<NC:persist resource="chrome://messenger/content/mail3PaneWindowVertLayout.xul#unreadCol"/>
<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"/>
</RDF:Description>
</RDF:RDF>