Mercurial > pidgin
comparison src/gtkblist.c @ 5254:d1e1ca490894
[gaim-migrate @ 5626]
(11:59:54) Robot101: found & fixed a crash at signoff...
(12:17:48) faceprint|laptop: "if you can't figure out what this is, you shouldn't be using CVS"
committer: Tailor Script <tailor@pidgin.im>
author | Luke Schierer <lschiere@pidgin.im> |
---|---|
date | Mon, 28 Apr 2003 16:21:03 +0000 |
parents | a3bb756635be |
children | 1d1c45d9b7fc |
comparison
equal
deleted
inserted
replaced
5253:2c9de5ae24a0 | 5254:d1e1ca490894 |
---|---|
1550 } | 1550 } |
1551 } | 1551 } |
1552 | 1552 |
1553 static gboolean do_selection_changed(GaimBlistNode *new_selection) | 1553 static gboolean do_selection_changed(GaimBlistNode *new_selection) |
1554 { | 1554 { |
1555 GaimBlistNode *old_selection = gtkblist->selected_node; | 1555 GaimBlistNode *old_selection = NULL; |
1556 | 1556 |
1557 if(new_selection != gtkblist->selected_node) { | 1557 /* test for gtkblist because crazy timeout means we can be called after the blist is gone */ |
1558 if (gtkblist && new_selection != gtkblist->selected_node) { | |
1559 old_selection = gtkblist->selected_node; | |
1558 gtkblist->selected_node = new_selection; | 1560 gtkblist->selected_node = new_selection; |
1559 if(new_selection) | 1561 if(new_selection) |
1560 gaim_gtk_blist_update(NULL, new_selection); | 1562 gaim_gtk_blist_update(NULL, new_selection); |
1561 if(old_selection) | 1563 if(old_selection) |
1562 gaim_gtk_blist_update(NULL, old_selection); | 1564 gaim_gtk_blist_update(NULL, old_selection); |
1572 | 1574 |
1573 if(gtk_tree_selection_get_selected(selection, NULL, &iter)){ | 1575 if(gtk_tree_selection_get_selected(selection, NULL, &iter)){ |
1574 gtk_tree_model_get(GTK_TREE_MODEL(gtkblist->treemodel), &iter, | 1576 gtk_tree_model_get(GTK_TREE_MODEL(gtkblist->treemodel), &iter, |
1575 NODE_COLUMN, &new_selection, -1); | 1577 NODE_COLUMN, &new_selection, -1); |
1576 } | 1578 } |
1579 | |
1577 /* we set this up as a timeout, otherwise the blist flickers */ | 1580 /* we set this up as a timeout, otherwise the blist flickers */ |
1578 g_timeout_add(0, (GSourceFunc)do_selection_changed, new_selection); | 1581 g_timeout_add(0, (GSourceFunc)do_selection_changed, new_selection); |
1579 } | 1582 } |
1580 | 1583 |
1581 static void make_a_group(GaimBlistNode *node, GtkTreeIter *iter) { | 1584 static void make_a_group(GaimBlistNode *node, GtkTreeIter *iter) { |