pidgin/plugins/gevolution/add_buddy_dialog.c

branch
soc.2013.gobjectification.plugins
changeset 36545
23b59a16c808
parent 34728
8efd73063ecf
child 36637
9b0109ae118d
equal deleted inserted replaced
36544:1bf8b6ef5aea 36545:23b59a16c808
30 #include <stdlib.h> 30 #include <stdlib.h>
31 31
32 enum 32 enum
33 { 33 {
34 COLUMN_NAME, 34 COLUMN_NAME,
35 COLUMN_PRPL_ICON, 35 COLUMN_PROTOCOL_ICON,
36 COLUMN_USERNAME, 36 COLUMN_USERNAME,
37 COLUMN_DATA, 37 COLUMN_DATA,
38 NUM_COLUMNS 38 NUM_COLUMNS
39 }; 39 };
40 40
145 145
146 /* Protocol icon */ 146 /* Protocol icon */
147 renderer = gtk_cell_renderer_pixbuf_new(); 147 renderer = gtk_cell_renderer_pixbuf_new();
148 gtk_tree_view_column_pack_start(column, renderer, FALSE); 148 gtk_tree_view_column_pack_start(column, renderer, FALSE);
149 gtk_tree_view_column_add_attribute(column, renderer, 149 gtk_tree_view_column_add_attribute(column, renderer,
150 "pixbuf", COLUMN_PRPL_ICON); 150 "pixbuf", COLUMN_PROTOCOL_ICON);
151 151
152 /* Account name */ 152 /* Account name */
153 renderer = gtk_cell_renderer_text_new(); 153 renderer = gtk_cell_renderer_text_new();
154 gtk_tree_view_column_pack_start(column, renderer, TRUE); 154 gtk_tree_view_column_pack_start(column, renderer, TRUE);
155 gtk_tree_view_column_add_attribute(column, renderer, 155 gtk_tree_view_column_add_attribute(column, renderer,
181 } 181 }
182 182
183 if (account == NULL) 183 if (account == NULL)
184 return; 184 return;
185 185
186 pixbuf = pidgin_create_prpl_icon(account, PIDGIN_PRPL_ICON_SMALL); 186 pixbuf = pidgin_create_protocol_icon(account, PIDGIN_PROTOCOL_ICON_SMALL);
187 187
188 for (l = list; l != NULL; l = l->next) 188 for (l = list; l != NULL; l = l->next)
189 { 189 {
190 char *account_name = (char *)l->data; 190 char *account_name = (char *)l->data;
191 191
197 197
198 gtk_list_store_append(dialog->model, &iter); 198 gtk_list_store_append(dialog->model, &iter);
199 199
200 gtk_list_store_set(dialog->model, &iter, 200 gtk_list_store_set(dialog->model, &iter,
201 COLUMN_NAME, name, 201 COLUMN_NAME, name,
202 COLUMN_PRPL_ICON, pixbuf, 202 COLUMN_PROTOCOL_ICON, pixbuf,
203 COLUMN_USERNAME, account_name, 203 COLUMN_USERNAME, account_name,
204 COLUMN_DATA, contact, 204 COLUMN_DATA, contact,
205 -1); 205 -1);
206 206
207 if (!strcmp(purple_account_get_protocol_id(account), 207 if (!strcmp(purple_account_get_protocol_id(account),
600 PurpleAccount *account, const char *screenname) 600 PurpleAccount *account, const char *screenname)
601 { 601 {
602 GdkPixbuf *pixbuf; 602 GdkPixbuf *pixbuf;
603 GtkTreeIter iter; 603 GtkTreeIter iter;
604 604
605 pixbuf = pidgin_create_prpl_icon(account, PIDGIN_PRPL_ICON_SMALL); 605 pixbuf = pidgin_create_protocol_icon(account, PIDGIN_PROTOCOL_ICON_SMALL);
606 606
607 gtk_list_store_append(dialog->model, &iter); 607 gtk_list_store_append(dialog->model, &iter);
608 608
609 gtk_list_store_set(dialog->model, &iter, 609 gtk_list_store_set(dialog->model, &iter,
610 COLUMN_NAME, name, 610 COLUMN_NAME, name,
611 COLUMN_PRPL_ICON, pixbuf, 611 COLUMN_PROTOCOL_ICON, pixbuf,
612 COLUMN_DATA, contact, 612 COLUMN_DATA, contact,
613 COLUMN_USERNAME, screenname, 613 COLUMN_USERNAME, screenname,
614 -1); 614 -1);
615 615
616 if (contact != NULL) 616 if (contact != NULL)

mercurial