pidgin/gtkblist.c

branch
custom_smiley
changeset 22895
0851d06eb652
parent 22737
3535c4e90c39
parent 22855
a5d39718e85c
child 23008
49781f4819df
--- a/pidgin/gtkblist.c	Mon Mar 31 21:23:57 2008 +0000
+++ b/pidgin/gtkblist.c	Mon Apr 28 00:01:07 2008 +0000
@@ -696,6 +696,7 @@
 	{
 		purple_blist_node_set_bool(node, "show_offline",
 		                           !purple_blist_node_get_bool(node, "show_offline"));
+		pidgin_blist_update(purple_get_blist(), node);
 	}
 	else if (PURPLE_BLIST_NODE_IS_CONTACT(node))
 	{
@@ -705,6 +706,7 @@
 		purple_blist_node_set_bool(node, "show_offline", setting);
 		for (bnode = node->child; bnode != NULL; bnode = bnode->next) {
 			purple_blist_node_set_bool(bnode, "show_offline", setting);
+			pidgin_blist_update(purple_get_blist(), bnode);
 		}
 	} else if (PURPLE_BLIST_NODE_IS_GROUP(node)) {
 		PurpleBlistNode *cnode, *bnode;
@@ -715,10 +717,10 @@
 			purple_blist_node_set_bool(cnode, "show_offline", setting);
 			for (bnode = cnode->child; bnode != NULL; bnode = bnode->next) {
 				purple_blist_node_set_bool(bnode, "show_offline", setting);
+				pidgin_blist_update(purple_get_blist(), bnode);
 			}
 		}
 	}
-	pidgin_blist_update(purple_get_blist(), node);
 }
 
 static void gtk_blist_show_systemlog_cb(void)
@@ -1034,6 +1036,7 @@
 		g_free(title);
 
 		purple_blist_node_set_bool(node, "collapsed", FALSE);
+		pidgin_blist_tooltip_destroy();
 	}
 }
 
@@ -1071,7 +1074,7 @@
 				pidgin_blist_update_contact(NULL, cnode);
 			}
 		}
-
+		pidgin_blist_tooltip_destroy();
 	} else if(PURPLE_BLIST_NODE_IS_CONTACT(node)) {
 		pidgin_blist_collapse_contact_cb(NULL, node);
 	}
@@ -3167,11 +3170,16 @@
 					chat->account);
 			g_free(chat_name);
 		}
-		if (conv && prpl_info && (prpl_info->options & OPT_PROTO_CHAT_TOPIC) &&
-				!purple_conv_chat_has_left(PURPLE_CONV_CHAT(conv))) {
-			char *topic = g_markup_escape_text(purple_conv_chat_get_topic(PURPLE_CONV_CHAT(conv)), -1);
-			g_string_append_printf(str, _("\n<b>Topic:</b> %s"), topic ? topic : _("(no topic set)"));
-			g_free(topic);
+
+		if (conv && !purple_conv_chat_has_left(PURPLE_CONV_CHAT(conv))) {
+			g_string_append_printf(str, _("\n<b>Occupants:</b> %d"),
+					g_list_length(purple_conv_chat_get_users(PURPLE_CONV_CHAT(conv))));
+
+			if (prpl_info && (prpl_info->options & OPT_PROTO_CHAT_TOPIC)) {
+				char *topic = g_markup_escape_text(purple_conv_chat_get_topic(PURPLE_CONV_CHAT(conv)), -1);
+				g_string_append_printf(str, _("\n<b>Topic:</b> %s"), topic ? topic : _("(no topic set)"));
+				g_free(topic);
+			}
 		}
 
 		if (prpl_info->chat_info != NULL)
@@ -4432,9 +4440,10 @@
 }
 
 static gboolean
-headline_click_callback(gpointer data)
-{
-	((GSourceFunc)gtkblist->headline_callback)(gtkblist->headline_data);
+headline_click_callback(gpointer unused)
+{
+	if (gtkblist->headline_callback)
+		((GSourceFunc) gtkblist->headline_callback)(gtkblist->headline_data);
 	reset_headline(gtkblist);
 	return FALSE;
 }
@@ -4444,7 +4453,7 @@
 {
 	gtk_widget_hide(gtkblist->headline_hbox);
 	if (gtkblist->headline_callback && !headline_hover_close((int)event->x, (int)event->y))
-		g_idle_add((GSourceFunc)headline_click_callback, gtkblist->headline_data);
+		g_idle_add(headline_click_callback, NULL);
 	else {
 		if (gtkblist->headline_destroy)
 			gtkblist->headline_destroy(gtkblist->headline_data);

mercurial