зеркало из https://github.com/mozilla/pjs.git
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:
Родитель
f0650ae67f
Коммит
750ade5aee
|
@ -191,7 +191,7 @@ nsTreeColFrame::AttributeChanged(nsIPresContext* aPresContext,
|
||||||
EnsureTree();
|
EnsureTree();
|
||||||
if (mTree)
|
if (mTree)
|
||||||
mTree->Invalidate();
|
mTree->Invalidate();
|
||||||
} else if (aAttribute == nsXULAtoms::ordinal) {
|
} else if (aAttribute == nsXULAtoms::ordinal || aAttribute == nsXULAtoms::primary) {
|
||||||
InvalidateColumnCache(aPresContext);
|
InvalidateColumnCache(aPresContext);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -208,8 +208,8 @@ function restorePreSearchView()
|
||||||
if (sortType != gDBView.sortType || sortOrder != gDBView.sortOrder)
|
if (sortType != gDBView.sortType || sortOrder != gDBView.sortOrder)
|
||||||
{
|
{
|
||||||
gDBView.sort(sortType, sortOrder);
|
gDBView.sort(sortType, sortOrder);
|
||||||
UpdateSortIndicators(sortType, sortOrder);
|
|
||||||
}
|
}
|
||||||
|
UpdateSortIndicators(sortType, sortOrder);
|
||||||
|
|
||||||
gPreQuickSearchView = null;
|
gPreQuickSearchView = null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -258,12 +258,22 @@ function MsgSortDescending()
|
||||||
|
|
||||||
function UpdateSortIndicators(sortType, sortOrder)
|
function UpdateSortIndicators(sortType, sortOrder)
|
||||||
{
|
{
|
||||||
var colID = ConvertSortTypeToColumnID(sortType);
|
// show the twisties if the view is threaded
|
||||||
var sortedColumn;
|
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
|
// set the sort indicator on the column we are sorted by
|
||||||
|
var colID = ConvertSortTypeToColumnID(sortType);
|
||||||
if (colID) {
|
if (colID) {
|
||||||
sortedColumn = document.getElementById(colID);
|
var sortedColumn = document.getElementById(colID);
|
||||||
if (sortedColumn) {
|
if (sortedColumn) {
|
||||||
if (sortOrder == nsMsgViewSortOrder.ascending) {
|
if (sortOrder == nsMsgViewSortOrder.ascending) {
|
||||||
sortedColumn.setAttribute("sortDirection","ascending");
|
sortedColumn.setAttribute("sortDirection","ascending");
|
||||||
|
@ -271,15 +281,6 @@ function UpdateSortIndicators(sortType, sortOrder)
|
||||||
else {
|
else {
|
||||||
sortedColumn.setAttribute("sortDirection","descending");
|
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();">
|
onselect="ThreadPaneSelectionChanged();">
|
||||||
<treecols>
|
<treecols>
|
||||||
<treecol id="threadCol" display="&threadColumn.label;" class="treecol-image threadColumnHeader" currentView="unthreaded" cycler="true" persist="hidden ordinal" fixed="true" />
|
<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"/>
|
<splitter class="tree-splitter"/>
|
||||||
<treecol id="senderOrRecipientCol" class="sortDirectionIndicator" persist="hidden ordinal width" flex="4" label="&senderColumn.label;"/>
|
<treecol id="senderOrRecipientCol" class="sortDirectionIndicator" persist="hidden ordinal width" flex="4" label="&senderColumn.label;"/>
|
||||||
<splitter class="tree-splitter"/>
|
<splitter class="tree-splitter"/>
|
||||||
|
|
Загрузка…
Ссылка в новой задаче