Mercurial > pidgin
diff console/libgnt/gnttree.c @ 13857:d341b5ac1a78
[gaim-migrate @ 16316]
Minor tweaks to the buddy-list. The list now updates if some account gets disconnected due to a connection error.
committer: Tailor Script <tailor@pidgin.im>
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Fri, 23 Jun 2006 09:38:48 +0000 |
parents | 3cdd05b9830a |
children | aa1c97f5e6eb |
line wrap: on
line diff
--- a/console/libgnt/gnttree.c Fri Jun 23 08:42:07 2006 +0000 +++ b/console/libgnt/gnttree.c Fri Jun 23 09:38:48 2006 +0000 @@ -13,9 +13,11 @@ char *text; void *data; /* XXX: unused */ + /* XXX: These are also unused */ GntTreeRow *parent; GntTreeRow *child; GntTreeRow *next; + GntTreeRow *prev; }; static GntWidgetClass *parent_class = NULL; @@ -268,7 +270,9 @@ pr = g_hash_table_lookup(tree->hash, bigbro); if (pr) { + if (pr->next) pr->next->prev = row; row->next = pr->next; + row->prev = pr; pr->next = row; row->parent = pr->parent; @@ -281,6 +285,7 @@ pr = g_hash_table_lookup(tree->hash, parent); if (pr) { + if (pr->child) pr->child->prev = row; row->next = pr->child; pr->child = row; row->parent = pr; @@ -291,6 +296,7 @@ if (pr == NULL) { + if (tree->root) tree->root->prev = row; row->next = tree->root; tree->root = row; @@ -316,6 +322,7 @@ return tree->current; } +/* XXX: Should this also remove all the children of the row being removed? */ void gnt_tree_remove(GntTree *tree, gpointer key) { GntTreeRow *row = g_hash_table_lookup(tree->hash, key);