Mercurial > pidgin.yaz
comparison console/gntblist.c @ 13858:aa1c97f5e6eb
[gaim-migrate @ 16317]
Do the indentation in GntTree properly.
committer: Tailor Script <tailor@pidgin.im>
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Fri, 23 Jun 2006 10:25:47 +0000 |
parents | d341b5ac1a78 |
children | c1e3f7c75c3f |
comparison
equal
deleted
inserted
replaced
13857:d341b5ac1a78 | 13858:aa1c97f5e6eb |
---|---|
7 #include "gntgaim.h" | 7 #include "gntgaim.h" |
8 #include "gntbox.h" | 8 #include "gntbox.h" |
9 #include "gnttree.h" | 9 #include "gnttree.h" |
10 | 10 |
11 #include "gntblist.h" | 11 #include "gntblist.h" |
12 | |
13 #define TAB_SIZE 3 | |
14 | 12 |
15 typedef struct | 13 typedef struct |
16 { | 14 { |
17 GntWidget *window; | 15 GntWidget *window; |
18 GntWidget *tree; | 16 GntWidget *tree; |
98 } | 96 } |
99 | 97 |
100 static void | 98 static void |
101 add_buddy(GaimBuddy *buddy, GGBlist *ggblist) | 99 add_buddy(GaimBuddy *buddy, GGBlist *ggblist) |
102 { | 100 { |
103 char *text; | |
104 GaimGroup *group; | 101 GaimGroup *group; |
105 GaimBlistNode *node = (GaimBlistNode *)buddy; | 102 GaimBlistNode *node = (GaimBlistNode *)buddy; |
106 if (node->ui_data) | 103 if (node->ui_data) |
107 return; | 104 return; |
108 | 105 |
109 node->ui_data = GINT_TO_POINTER(TRUE); | 106 node->ui_data = GINT_TO_POINTER(TRUE); |
110 group = gaim_buddy_get_group(buddy); | 107 group = gaim_buddy_get_group(buddy); |
111 add_group(group, ggblist); | 108 add_group(group, ggblist); |
112 | 109 |
113 text = g_strdup_printf("%*s%s", TAB_SIZE, "", gaim_buddy_get_alias(buddy)); | 110 gnt_tree_add_row_after(GNT_TREE(ggblist->tree), buddy, gaim_buddy_get_alias(buddy), group, NULL); |
114 gnt_tree_add_row_after(GNT_TREE(ggblist->tree), buddy, text, group, NULL); | |
115 g_free(text); | |
116 } | 111 } |
117 | 112 |
118 static void | 113 static void |
119 buddy_signed_on(GaimBuddy *buddy, GGBlist *ggblist) | 114 buddy_signed_on(GaimBuddy *buddy, GGBlist *ggblist) |
120 { | 115 { |