changeset 15743:6d4c5218b90b

Sort the plugin list.
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Wed, 28 Feb 2007 11:24:59 +0000
parents 50c25be2563b
children 12778e2f7282 0efc23706de2
files console/libgnt/gnttree.c
diffstat 1 files changed, 14 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/console/libgnt/gnttree.c	Tue Feb 27 09:06:05 2007 +0000
+++ b/console/libgnt/gnttree.c	Wed Feb 28 11:24:59 2007 +0000
@@ -1275,16 +1275,20 @@
 	g_return_val_if_fail(!r || !r->choice, NULL);
 
 	if (bigbro == NULL) {
-		r = g_hash_table_lookup(tree->hash, parent);
-		if (!r)
-			r = tree->root;
-		else
-			r = r->child;
-		if (r) {
-			while (r->next)
-				r = r->next;
-			bigbro = r->key;
-		} 
+		if (tree->compare)
+			bigbro = find_position(tree, key, parent);
+		else {
+			r = g_hash_table_lookup(tree->hash, parent);
+			if (!r)
+				r = tree->root;
+			else
+				r = r->child;
+			if (r) {
+				while (r->next)
+					r = r->next;
+				bigbro = r->key;
+			} 
+		}
 	}
 	row = gnt_tree_add_row_after(tree, key, row, parent, bigbro);
 	row->choice = TRUE;