more hacking with the anipals. NOT PART OF THE BUILD.

This commit is contained in:
sspitzer%netscape.com 2001-02-08 22:43:29 +00:00
parent a907c4ffe0
commit b02818304f
3 changed files with 21 additions and 5 deletions

View File

@ -64,8 +64,22 @@ NS_IMETHODIMP nsMsgDBView::AddKeys(nsMsgKey *pKeys, PRInt32 *pFlags, const char
return NS_ERROR_NOT_IMPLEMENTED;
}
nsresult nsMsgDBView::ReverseThreads()
{
printf("XXX same sort type, just different sort order. just reverse threads\n");
return NS_OK;
}
nsresult nsMsgDBView::ReverseSort()
{
printf("XXX same sort type (but not threaded), just different sort order. just reverse it\n");
return NS_OK;
}
NS_IMETHODIMP nsMsgDBView::Sort(nsMsgViewSortTypeValue sortType, nsMsgViewSortOrderValue sortOrder)
{
nsresult rv;
printf("XXX nsMsgDBView::Sort(%d,%d)\n",(int)sortType,(int)sortOrder);
if (m_sortType == sortType && m_sortValid) {
if (m_sortOrder == sortOrder) {
@ -74,12 +88,12 @@ NS_IMETHODIMP nsMsgDBView::Sort(nsMsgViewSortTypeValue sortType, nsMsgViewSortOr
}
else {
if (m_sortType != nsMsgViewSortType::byThread) {
printf("XXX same sort type (but not threaded), just different sort order. just reverse it\n");
//ReverseSort();
rv = ReverseSort();
NS_ENSURE_SUCCESS(rv,rv);
}
else {
printf("XXX same sort type, just different sort order. just reverse threads\n");
//ReverseThreads();
rv = ReverseThreads();
NS_ENSURE_SUCCESS(rv,rv);
}
m_sortType = sortType;

View File

@ -43,6 +43,8 @@ public:
protected:
nsresult ExpandByIndex(nsMsgViewIndex index, PRUint32 *pNumExpanded);
nsresult ExpandAll();
nsresult ReverseSort();
nsresult ReverseThreads();
PRInt32 GetSize(void) {return(m_keys.GetSize());}

View File

@ -232,9 +232,9 @@ nsresult nsMsgThreadedDBView::ExpandAll()
// go through expanding in place
for (PRUint32 i = 0; i < m_keys.GetSize(); i++)
{
#ifdef HAVE_BRANCH_YET
PRUint32 numExpanded;
PRUint32 flags = m_flags[i];
#ifdef HAVE_BRANCH_YET
if (flags & kHasChildren && (flags & MSG_FLAG_ELIDED))
{
rv = ExpandByIndex(i, &numExpanded);