# HG changeset patch # User Daniel Atallah # Date 1172713553 0 # Node ID 0efc23706de29280b54fce40ef93234638eaba67 # Parent 6d4c5218b90b441c04a6d7fa4b3d6e7670c23807# Parent e118593504894ba1a18aba9315e6717cb22e7dcd merge of '0bbdd897525969f1b481b593dad32050b57f9033' and '8dee64564b04f629410f93246dc03044efc8a7c6' diff -r e11859350489 -r 0efc23706de2 console/libgnt/gnttree.c --- a/console/libgnt/gnttree.c Wed Feb 28 17:27:30 2007 +0000 +++ b/console/libgnt/gnttree.c Thu Mar 01 01:45:53 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;