Mercurial > pidgin.yaz
comparison console/libgnt/gnttree.c @ 13952:841a5ffbfee4
[gaim-migrate @ 16500]
uiops for GaimConnections. This only shows an error message for a disconnect.
uiops for GaimNotify. I have not done the notifications for searchresults
yet. That will require multi-column GntTree's, which will also allow for
improved email-notifications. I hope to complete it by next week.
committer: Tailor Script <tailor@pidgin.im>
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Mon, 17 Jul 2006 03:45:24 +0000 |
parents | 25be562aaca8 |
children | 0a0d2a1fd2bc |
comparison
equal
deleted
inserted
replaced
13951:614c56622453 | 13952:841a5ffbfee4 |
---|---|
714 | 714 |
715 row->flags = flags; | 715 row->flags = flags; |
716 redraw_tree(tree); /* XXX: It shouldn't be necessary to redraw the whole darned tree */ | 716 redraw_tree(tree); /* XXX: It shouldn't be necessary to redraw the whole darned tree */ |
717 } | 717 } |
718 | 718 |
719 void gnt_tree_set_selected(GntTree *tree , void *key) | |
720 { | |
721 int dist; | |
722 GntTreeRow *row = g_hash_table_lookup(tree->hash, key); | |
723 if (!row) | |
724 return; | |
725 | |
726 if (tree->top == NULL) | |
727 tree->top = row; | |
728 if (tree->bottom == NULL) | |
729 tree->bottom = row; | |
730 | |
731 tree->current = row; | |
732 if ((dist = get_distance(tree->current, tree->bottom)) < 0) | |
733 gnt_tree_scroll(tree, -dist); | |
734 else if ((dist = get_distance(tree->current, tree->top)) > 0) | |
735 gnt_tree_scroll(tree, -dist); | |
736 else | |
737 redraw_tree(tree); | |
738 } | |
739 |