From 08d6a11376a8f200bc310f811503d8950632201d Mon Sep 17 00:00:00 2001 From: "benjamin%smedbergs.us" Date: Tue, 18 Jul 2006 17:16:16 +0000 Subject: [PATCH] Bug 333450 r=beng Add bookmark indices to result nodes. Original committer: brettw%gmail.com Original revision: 1.25 Original date: 2006/04/17 18:57:52 git-svn-id: svn://10.0.0.236/trunk@202785 18797224-902f-48f8-a5cc-f745e15eee43 --- .../components/places/src/nsNavHistoryResult.h | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/mozilla/toolkit/components/places/src/nsNavHistoryResult.h b/mozilla/toolkit/components/places/src/nsNavHistoryResult.h index 5721840913c..590fa7cf9c5 100644 --- a/mozilla/toolkit/components/places/src/nsNavHistoryResult.h +++ b/mozilla/toolkit/components/places/src/nsNavHistoryResult.h @@ -222,7 +222,9 @@ public: NS_IMETHOD GetViewIndex(PRInt32* aViewIndex) \ { *aViewIndex = mViewIndex; return NS_OK; } \ NS_IMETHOD SetViewIndex(PRInt32 aViewIndex) \ - { mViewIndex = aViewIndex; return NS_OK; } + { mViewIndex = aViewIndex; return NS_OK; } \ + NS_IMETHOD GetBookmarkIndex(PRInt32* aIndex) \ + { *aIndex = mBookmarkIndex; return NS_OK; } // This is used by the base classes instead of // NS_FORWARD_NSINAVHISTORYRESULTNODE(nsNavHistoryResultNode) because they @@ -362,6 +364,7 @@ public: PRUint32 mAccessCount; PRInt64 mTime; nsCString mFaviconURI; + PRInt32 mBookmarkIndex; // The indent level of this node. The root node will have a value of -1. The // root's children will have a value of 0, and so on. @@ -549,6 +552,8 @@ public: PRUint32 FindInsertionPoint(nsNavHistoryResultNode* aNode, SortComparator aComparator); PRBool DoesChildNeedResorting(PRUint32 aIndex, SortComparator aComparator); + PR_STATIC_CALLBACK(int) SortComparison_Bookmark( + nsNavHistoryResultNode* a, nsNavHistoryResultNode* b, void* closure); PR_STATIC_CALLBACK(int) SortComparison_TitleLess( nsNavHistoryResultNode* a, nsNavHistoryResultNode* b, void* closure); PR_STATIC_CALLBACK(int) SortComparison_TitleGreater( @@ -706,10 +711,6 @@ public: virtual void OnRemoving(); - // Override the sorting implementation to remove separators if we are sorted. - virtual void RecursiveSort(nsICollation* aCollation, - SortComparator aComparator); - public: // this indicates whether the folder contents are valid, they don't go away @@ -724,6 +725,7 @@ public: nsresult Refresh(); PRBool StartIncrementalUpdate(); + void ReindexRange(PRInt32 aStartIndex, PRInt32 aEndIndex, PRInt32 aDelta); }; // nsNavHistorySeparatorResultNode