Mercurial > pidgin
comparison src/buddy.c @ 4691:d78f7cb8ae4f
[gaim-migrate @ 5002]
Open source at work. Thanks, Ha-King, Ethan. I also shrunk the group folder
icon a bit.
committer: Tailor Script <tailor@pidgin.im>
author | Sean Egan <seanegan@gmail.com> |
---|---|
date | Mon, 10 Mar 2003 06:35:40 +0000 |
parents | e19f91053ad0 |
children | a81443d3516b |
comparison
equal
deleted
inserted
replaced
4690:e19f91053ad0 | 4691:d78f7cb8ae4f |
---|---|
168 GtkTreeSelection *sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(gtkblist->treeview)); | 168 GtkTreeSelection *sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(gtkblist->treeview)); |
169 GtkTreeIter iter; | 169 GtkTreeIter iter; |
170 GaimBlistNode *node; | 170 GaimBlistNode *node; |
171 GValue val; | 171 GValue val; |
172 | 172 |
173 gtk_tree_selection_get_selected(sel, NULL, &iter); | 173 if (gtk_tree_selection_get_selected(sel, NULL, &iter)) { |
174 gtk_tree_model_get_value (GTK_TREE_MODEL(gtkblist->treemodel), &iter, NODE_COLUMN, &val); | 174 gtk_tree_model_get_value (GTK_TREE_MODEL(gtkblist->treemodel), &iter, NODE_COLUMN, &val); |
175 node = g_value_get_pointer(&val); | 175 node = g_value_get_pointer(&val); |
176 | 176 |
177 if (GAIM_BLIST_NODE_IS_BUDDY(node)) | 177 if (GAIM_BLIST_NODE_IS_BUDDY(node)) |
178 show_add_buddy(NULL, NULL, ((struct group*)node->parent)->name, NULL); | 178 show_add_buddy(NULL, NULL, ((struct group*)node->parent)->name, NULL); |
179 else if (GAIM_BLIST_NODE_IS_GROUP(node)) | 179 else if (GAIM_BLIST_NODE_IS_GROUP(node)) |
180 show_add_buddy(NULL, NULL, ((struct group*)node)->name, NULL); | 180 show_add_buddy(NULL, NULL, ((struct group*)node)->name, NULL); |
181 } else { | |
182 show_add_buddy(NULL,NULL,NULL,NULL); | |
183 } | |
181 | 184 |
182 } | 185 } |
183 | 186 |
184 | 187 |
185 /*************************************************** | 188 /*************************************************** |
237 GdkPixbuf *scale = NULL; | 240 GdkPixbuf *scale = NULL; |
238 GdkPixbuf *emblem = NULL; | 241 GdkPixbuf *emblem = NULL; |
239 gchar *filename = NULL; | 242 gchar *filename = NULL; |
240 const char *protoname = NULL; | 243 const char *protoname = NULL; |
241 | 244 |
242 char *se,*sw,*nw,*ne; | 245 char *se = NULL, *sw = NULL ,*nw = NULL ,*ne = NULL; |
243 | 246 |
244 int scalesize = 30; | 247 int scalesize = 30; |
245 | 248 |
246 struct prpl* prpl = find_prpl(b->account->protocol); | 249 struct prpl* prpl = find_prpl(b->account->protocol); |
247 if (prpl->list_icon) | 250 if (prpl->list_icon) |
572 /* This is where we create the node and add it. */ | 575 /* This is where we create the node and add it. */ |
573 gtk_tree_store_insert_after(gtkblist->treemodel, iter2, | 576 gtk_tree_store_insert_after(gtkblist->treemodel, iter2, |
574 node->parent->parent ? node->parent->parent->ui_data : NULL, insertatiter); | 577 node->parent->parent ? node->parent->parent->ui_data : NULL, insertatiter); |
575 gtk_tree_store_set(gtkblist->treemodel, iter2, | 578 gtk_tree_store_set(gtkblist->treemodel, iter2, |
576 STATUS_ICON_COLUMN, gtk_widget_render_icon | 579 STATUS_ICON_COLUMN, gtk_widget_render_icon |
577 (gtkblist->treeview,GTK_STOCK_OPEN,GTK_ICON_SIZE_LARGE_TOOLBAR,NULL), | 580 (gtkblist->treeview,GTK_STOCK_OPEN,GTK_ICON_SIZE_SMALL_TOOLBAR,NULL), |
578 NAME_COLUMN, mark, | 581 NAME_COLUMN, mark, |
579 NODE_COLUMN, node->parent, | 582 NODE_COLUMN, node->parent, |
580 -1); | 583 -1); |
581 node->parent->ui_data = iter2; | 584 node->parent->ui_data = iter2; |
582 expand = TRUE; | 585 expand = TRUE; |