gobjectification: cc3ad369: Update size-count.

sadrul at pidgin.im sadrul at pidgin.im
Tue Jul 6 17:20:28 EDT 2010


----------------------------------------------------------------------
Revision: cc3ad36903ab8eb38b1205f1818fd0697949a934
Parent:   631ab1d4340a9fc22d5746ab480d206556388df3
Author:   sadrul at pidgin.im
Date:     07/06/10 15:41:11
Branch:   im.pidgin.gobjectification
URL: http://d.pidgin.im/viewmtn/revision/info/cc3ad36903ab8eb38b1205f1818fd0697949a934

Changelog: 

Update size-count.

Changes against parent 631ab1d4340a9fc22d5746ab480d206556388df3

  patched  libpurple/group.c

-------------- next part --------------
============================================================
--- libpurple/group.c	fdd617cf8758351835b69b239517ad620da0e69e
+++ libpurple/group.c	0bf1414c17e2c19dd3eec480d2e2236b0965a8a8
@@ -179,15 +179,13 @@ group_child_added(PurpleGroup *group, Pu
 	priv = PURPLE_GROUP_GET_PRIVATE(group);
 
 	if (PURPLE_IS_CHAT(child)) {
-		PurpleChat *chat = PURPLE_CHAT(child);
-		PurpleAccount *account = purple_chat_get_account(chat);
-		if (purple_account_is_connected(account)) {
+		if (purple_blist_node_is_online(child)) {
 			priv->online++;
 			priv->currentsize++;
 		}
 	} else if (PURPLE_IS_CONTACT(child)) {
 		PurpleContact *contact = PURPLE_CONTACT(child);
-		if (purple_contact_get_online(contact) > 0)
+		if (purple_blist_node_is_online(child) > 0)
 			priv->online++;
 		if (purple_contact_get_currentsize(contact) > 0)
 			priv->currentsize++;
@@ -196,6 +194,8 @@ group_child_added(PurpleGroup *group, Pu
 		return;
 	}
 
+	priv->totalsize++;
+
 	/* Make sure we update the group when the child is:
 	 *	- destroyed
 	 *	- updated (TODO)


More information about the Commits mailing list