mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 11:55:49 +00:00
fix for bug #44823.
when not in threaded mode, don't take up space for the twisty in the subject column. thanks to neil@parkwaycc.co.uk for the fix. r=varga, sr=sspitzer
This commit is contained in:
parent
b77d77180d
commit
3507f7dc38
@ -191,7 +191,7 @@ nsTreeColFrame::AttributeChanged(nsIPresContext* aPresContext,
|
||||
EnsureTree();
|
||||
if (mTree)
|
||||
mTree->Invalidate();
|
||||
} else if (aAttribute == nsXULAtoms::ordinal) {
|
||||
} else if (aAttribute == nsXULAtoms::ordinal || aAttribute == nsXULAtoms::primary) {
|
||||
InvalidateColumnCache(aPresContext);
|
||||
}
|
||||
|
||||
|
@ -208,8 +208,8 @@ function restorePreSearchView()
|
||||
if (sortType != gDBView.sortType || sortOrder != gDBView.sortOrder)
|
||||
{
|
||||
gDBView.sort(sortType, sortOrder);
|
||||
UpdateSortIndicators(sortType, sortOrder);
|
||||
}
|
||||
UpdateSortIndicators(sortType, sortOrder);
|
||||
|
||||
gPreQuickSearchView = null;
|
||||
}
|
||||
|
@ -258,12 +258,22 @@ function MsgSortDescending()
|
||||
|
||||
function UpdateSortIndicators(sortType, sortOrder)
|
||||
{
|
||||
var colID = ConvertSortTypeToColumnID(sortType);
|
||||
var sortedColumn;
|
||||
// show the twisties if the view is threaded
|
||||
var currCol = document.getElementById("subjectCol");
|
||||
var primary = (sortType == nsMsgViewSortType.byThread) && gDBView.supportsThreading;
|
||||
currCol.setAttribute("primary", primary);
|
||||
|
||||
// remove the sort indicator from all the columns
|
||||
currCol = document.getElementById("threadCol");
|
||||
while (currCol) {
|
||||
currCol.removeAttribute("sortDirection");
|
||||
currCol = currCol.nextSibling;
|
||||
}
|
||||
|
||||
// set the sort indicator on the column we are sorted by
|
||||
var colID = ConvertSortTypeToColumnID(sortType);
|
||||
if (colID) {
|
||||
sortedColumn = document.getElementById(colID);
|
||||
var sortedColumn = document.getElementById(colID);
|
||||
if (sortedColumn) {
|
||||
if (sortOrder == nsMsgViewSortOrder.ascending) {
|
||||
sortedColumn.setAttribute("sortDirection","ascending");
|
||||
@ -271,15 +281,6 @@ function UpdateSortIndicators(sortType, sortOrder)
|
||||
else {
|
||||
sortedColumn.setAttribute("sortDirection","descending");
|
||||
}
|
||||
|
||||
// remove the sort indicator from all the columns
|
||||
// except the one we are sorted by
|
||||
var currCol = sortedColumn.parentNode.firstChild;
|
||||
while (currCol) {
|
||||
if (currCol != sortedColumn && currCol.localName == "treecol")
|
||||
currCol.removeAttribute("sortDirection");
|
||||
currCol = currCol.nextSibling;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -36,7 +36,7 @@ Rights Reserved.
|
||||
onselect="ThreadPaneSelectionChanged();">
|
||||
<treecols>
|
||||
<treecol id="threadCol" display="&threadColumn.label;" class="treecol-image threadColumnHeader" currentView="unthreaded" cycler="true" persist="hidden ordinal" fixed="true" />
|
||||
<treecol id="subjectCol" class="sortDirectionIndicator" persist="hidden ordinal width" flex="7" label="&subjectColumn.label;" primary="true"/>
|
||||
<treecol id="subjectCol" class="sortDirectionIndicator" persist="hidden ordinal width" flex="7" label="&subjectColumn.label;" ignoreincolumnpicker="true"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="senderOrRecipientCol" class="sortDirectionIndicator" persist="hidden ordinal width" flex="4" label="&senderColumn.label;"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
|
Loading…
Reference in New Issue
Block a user