Mercurial > pidgin
comparison console/libgnt/gnttree.c @ 13865:d78ab363e02d
[gaim-migrate @ 16331]
Make the tooltips move to the right place when the selected item goes up/down when someone signs on/off.
committer: Tailor Script <tailor@pidgin.im>
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Sat, 24 Jun 2006 20:06:37 +0000 |
parents | c7d84d4c5afa |
children | 0d0ab1e39d0a |
comparison
equal
deleted
inserted
replaced
13864:c7d84d4c5afa | 13865:d78ab363e02d |
---|---|
4 #include <string.h> | 4 #include <string.h> |
5 | 5 |
6 enum | 6 enum |
7 { | 7 { |
8 SIG_SELECTION_CHANGED, | 8 SIG_SELECTION_CHANGED, |
9 SIG_SCROLLED, | |
9 SIGS, | 10 SIGS, |
10 }; | 11 }; |
11 | 12 |
12 #define TAB_SIZE 3 | 13 #define TAB_SIZE 3 |
13 | 14 |
343 G_SIGNAL_RUN_LAST, | 344 G_SIGNAL_RUN_LAST, |
344 G_STRUCT_OFFSET(GntTreeClass, selection_changed), | 345 G_STRUCT_OFFSET(GntTreeClass, selection_changed), |
345 NULL, NULL, | 346 NULL, NULL, |
346 gnt_closure_marshal_VOID__POINTER_POINTER, | 347 gnt_closure_marshal_VOID__POINTER_POINTER, |
347 G_TYPE_NONE, 2, G_TYPE_POINTER, G_TYPE_POINTER); | 348 G_TYPE_NONE, 2, G_TYPE_POINTER, G_TYPE_POINTER); |
349 signals[SIG_SCROLLED] = | |
350 g_signal_new("scrolled", | |
351 G_TYPE_FROM_CLASS(klass), | |
352 G_SIGNAL_RUN_LAST, | |
353 0, | |
354 NULL, NULL, | |
355 g_cclosure_marshal_VOID__INT, | |
356 G_TYPE_NONE, 1, G_TYPE_INT); | |
348 | 357 |
349 DEBUG; | 358 DEBUG; |
350 } | 359 } |
351 | 360 |
352 static void | 361 static void |
443 get_next_n_opt(tree->bottom, count, &count); | 452 get_next_n_opt(tree->bottom, count, &count); |
444 tree->top = get_next_n(tree->top, count); | 453 tree->top = get_next_n(tree->top, count); |
445 } | 454 } |
446 | 455 |
447 redraw_tree(tree); | 456 redraw_tree(tree); |
457 g_signal_emit(tree, signals[SIG_SCROLLED], 0, count); | |
448 } | 458 } |
449 | 459 |
450 static int | 460 static int |
451 find_depth(GntTreeRow *row) | 461 find_depth(GntTreeRow *row) |
452 { | 462 { |