diff src/gtkblist.c @ 8252:10a41e67a800

[gaim-migrate @ 8975] I'm tired, so I probably broke something... 1. clean up warnings trying to put chats into the blist before the blist is there to put chats in 2. clean up warnings trying to mess with the buddy pounce menu before the buddy pounce menu is there to be messed with 3. clean up warnings with reconnecting and the progress bars in the connection dialog, i think 4. re-order things so the tab doesn't go grey if it's already red. this annoyed me. committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Fri, 13 Feb 2004 07:48:19 +0000
parents 63c7a16a2c09
children 8a9a6eb3ded0
line wrap: on
line diff
--- a/src/gtkblist.c	Fri Feb 13 05:56:17 2004 +0000
+++ b/src/gtkblist.c	Fri Feb 13 07:48:19 2004 +0000
@@ -3065,17 +3065,17 @@
 	g_timeout_add(0, (GSourceFunc)do_selection_changed, new_selection);
 }
 
-static void insert_node(GaimBuddyList *list, GaimBlistNode *node, GtkTreeIter *iter)
+static gboolean insert_node(GaimBuddyList *list, GaimBlistNode *node, GtkTreeIter *iter)
 {
 	GtkTreeIter parent_iter, cur, *curptr = NULL;
 	struct _gaim_gtk_blist_node *gtknode = node->ui_data;
 	GtkTreePath *newpath;
 
 	if(!gtknode || !iter)
-		return;
+		return FALSE;
 
 	if(node->parent && !get_iter_from_node(node->parent, &parent_iter))
-		return;
+		return FALSE;
 
 	if(get_iter_from_node(node, &cur))
 		curptr = &cur;
@@ -3115,6 +3115,7 @@
 		}
 	}
 
+	return TRUE;
 }
 
 static void gaim_gtk_blist_update_group(GaimBuddyList *list, GaimBlistNode *node)
@@ -3134,7 +3135,8 @@
 		char *mark, *esc;
 		GtkTreeIter iter;
 
-		insert_node(list, node, &iter);
+		if(!insert_node(list, node, &iter))
+			return;
 
 		esc = g_markup_escape_text(group->name, -1);
 		if(gaim_prefs_get_bool("/gaim/gtk/blist/show_group_count")) {
@@ -3246,7 +3248,8 @@
 			 gaim_prefs_get_bool("/gaim/gtk/blist/show_offline_buddies")))) {
 		GtkTreeIter iter;
 
-		insert_node(list, node, &iter);
+		if(!insert_node(list, node, &iter))
+			return;
 
 		if(gtknode->contact_expanded) {
 			GdkPixbuf *status;
@@ -3298,7 +3301,9 @@
 			 gaim_prefs_get_bool("/gaim/gtk/blist/show_offline_buddies")))) {
 		GtkTreeIter iter;
 
-		insert_node(list, node, &iter);
+		if(!insert_node(list, node, &iter))
+			return;
+
 		buddy_node(buddy, &iter, node);
 
 	} else {
@@ -3323,7 +3328,8 @@
 		GdkPixbuf *status;
 		char *mark;
 
-		insert_node(list, node, &iter);
+		if(!insert_node(list, node, &iter))
+			return;
 
 		status = gaim_gtk_blist_get_status_icon(node,
 				(gaim_prefs_get_bool("/gaim/gtk/blist/show_buddy_icons") ?