comparison console/gntblist.c @ 14020:13e7ba964993

[gaim-migrate @ 16617] Minor tweaks to the context-menu in the buddylist. committer: Tailor Script <tailor@pidgin.im>
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Wed, 02 Aug 2006 13:37:13 +0000
parents 35699556075f
children 7109e6397a31
comparison
equal deleted inserted replaced
14019:19a1812e6c46 14020:13e7ba964993
391 391
392 if (action) 392 if (action)
393 { 393 {
394 void (*callback)(GaimBlistNode *, gpointer); 394 void (*callback)(GaimBlistNode *, gpointer);
395 callback = (void (*)(GaimBlistNode *, gpointer))action->callback; 395 callback = (void (*)(GaimBlistNode *, gpointer))action->callback;
396 callback(node, action->data); 396 if (callback)
397 callback(node, action->data);
398 else
399 return;
397 } 400 }
398 401
399 remove_context_menu(ggblist); 402 remove_context_menu(ggblist);
400 } 403 }
401 404
519 GAIM_CALLBACK(gg_blist_remove_node_cb), node); 522 GAIM_CALLBACK(gg_blist_remove_node_cb), node);
520 523
521 window = gnt_vbox_new(FALSE); 524 window = gnt_vbox_new(FALSE);
522 gnt_box_set_toplevel(GNT_BOX(window), TRUE); 525 gnt_box_set_toplevel(GNT_BOX(window), TRUE);
523 gnt_box_set_title(GNT_BOX(window), title); 526 gnt_box_set_title(GNT_BOX(window), title);
524 527
528 gnt_widget_set_size(context, 0, g_list_length(GNT_TREE(context)->list));
525 gnt_box_add_widget(GNT_BOX(window), context); 529 gnt_box_add_widget(GNT_BOX(window), context);
526 530
527 /* Set the position for the popup */ 531 /* Set the position for the popup */
528 gnt_widget_get_position(GNT_WIDGET(tree), &x, &y); 532 gnt_widget_get_position(GNT_WIDGET(tree), &x, &y);
529 gnt_widget_get_size(GNT_WIDGET(tree), &width, NULL); 533 gnt_widget_get_size(GNT_WIDGET(tree), &width, NULL);