diff pidgin/gtkblist.c @ 26048:25e2ab1fff1d

propagate from branch 'im.pidgin.pidgin' (head dd7a36be12180dba9663c2b740553e89711d7644) to branch 'im.pidgin.pidgin.vv' (head 2149cf9a6d4604f6e78ed9a2bdb0bbc3d6041a36)
author Mike Ruprecht <maiku@soc.pidgin.im>
date Sat, 06 Dec 2008 02:23:20 +0000
parents adf153852bcf f10aba5592c6
children 68f4edb42f39
line wrap: on
line diff
--- a/pidgin/gtkblist.c	Sat Dec 06 02:20:09 2008 +0000
+++ b/pidgin/gtkblist.c	Sat Dec 06 02:23:20 2008 +0000
@@ -3377,6 +3377,7 @@
 	if (PURPLE_BLIST_NODE_IS_CHAT(node))
 	{
 		PurpleChat *chat;
+		GList *connections;
 		GList *cur;
 		struct proto_chat_entry *pce;
 		char *name, *value;
@@ -3387,7 +3388,8 @@
 		prpl = purple_find_prpl(purple_account_get_protocol_id(chat->account));
 		prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(prpl);
 
-		if (g_list_length(purple_connections_get_all()) > 1)
+		connections = purple_connections_get_all();
+		if (connections && connections->next)
 		{
 			tmp = g_markup_escape_text(chat->account->username, -1);
 			g_string_append_printf(str, _("<b>Account:</b> %s"), tmp);
@@ -3457,6 +3459,7 @@
 		PurpleBuddy *b;
 		PurplePresence *presence;
 		PurpleNotifyUserInfo *user_info;
+		GList *connections;
 		char *tmp;
 		time_t idle_secs, signon;
 
@@ -3478,7 +3481,8 @@
 		user_info = purple_notify_user_info_new();
 
 		/* Account */
-		if (full && g_list_length(purple_connections_get_all()) > 1)
+		connections = purple_connections_get_all();
+		if (full && connections && connections->next)
 		{
 			tmp = g_markup_escape_text(purple_account_get_username(
 									   purple_buddy_get_account(b)), -1);