console/gntblist.c

changeset 14082
338ab21fb964
parent 14080
7fad848bbe7b
child 14086
732c14687955
equal deleted inserted replaced
14081:8e302ced7a00 14082:338ab21fb964
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);

mercurial