comparison src/gtkblist.c @ 5263:b476a30ef4e3

[gaim-migrate @ 5635] (15:53:01) Paco-Paco: It does not seem safe to remove ui_data on gaim_gtk_blist_remove, this patch disables that until I can figure out what I should _really_ be doing committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Wed, 30 Apr 2003 19:54:19 +0000
parents 5331d5f11089
children 2e1238f4b4e3
comparison
equal deleted inserted replaced
5262:799f9585988a 5263:b476a30ef4e3
1493 1493
1494 static gboolean get_iter_from_node(GaimBlistNode *node, GtkTreeIter *iter) { 1494 static gboolean get_iter_from_node(GaimBlistNode *node, GtkTreeIter *iter) {
1495 struct _gaim_gtk_blist_node *gtknode = (struct _gaim_gtk_blist_node *)node->ui_data; 1495 struct _gaim_gtk_blist_node *gtknode = (struct _gaim_gtk_blist_node *)node->ui_data;
1496 GtkTreePath *path; 1496 GtkTreePath *path;
1497 1497
1498 if (!gtkblist || !gtknode->row) 1498 if (!gtknode) {
1499 gaim_debug(GAIM_DEBUG_ERROR, "gtkblist", "buddy %s has no ui_data\n", ((struct buddy *)node)->name);
1500 return FALSE;
1501 }
1502
1503 if (!gtkblist) {
1504 gaim_debug(GAIM_DEBUG_ERROR, "gtkblist", "get_iter_from_node was called, but we don't seem to have a blist\n");
1505 return FALSE;
1506 }
1507
1508 if (!gtknode->row)
1499 return FALSE; 1509 return FALSE;
1500 1510
1501 if ((path = gtk_tree_row_reference_get_path(gtknode->row)) == NULL) 1511 if ((path = gtk_tree_row_reference_get_path(gtknode->row)) == NULL)
1502 return FALSE; 1512 return FALSE;
1503 if (!gtk_tree_model_get_iter(GTK_TREE_MODEL(gtkblist->treemodel), iter, path)) { 1513 if (!gtk_tree_model_get_iter(GTK_TREE_MODEL(gtkblist->treemodel), iter, path)) {
1548 1558
1549 static void gaim_gtk_blist_remove(struct gaim_buddy_list *list, GaimBlistNode *node) 1559 static void gaim_gtk_blist_remove(struct gaim_buddy_list *list, GaimBlistNode *node)
1550 { 1560 {
1551 gaim_gtk_blist_hide_node(list, node); 1561 gaim_gtk_blist_hide_node(list, node);
1552 1562
1553 g_free(node->ui_data); 1563 /* There's something I don't understand here */
1554 node->ui_data = NULL; 1564 /* g_free(node->ui_data);
1565 node->ui_data = NULL; */
1555 } 1566 }
1556 1567
1557 static gboolean do_selection_changed(GaimBlistNode *new_selection) 1568 static gboolean do_selection_changed(GaimBlistNode *new_selection)
1558 { 1569 {
1559 GaimBlistNode *old_selection = NULL; 1570 GaimBlistNode *old_selection = NULL;