/soc/2013/ankitkv/gobjectification: 612fec2b5a0e: A little clean...
Ankit Vani
a at nevitus.org
Fri Jul 5 19:49:48 EDT 2013
Changeset: 612fec2b5a0ec7726bb086539f484f39a6702af9
Author: Ankit Vani <a at nevitus.org>
Date: 2013-07-06 05:19 +0530
Branch: soc.2013.gobjectification
URL: https://hg.pidgin.im/soc/2013/ankitkv/gobjectification/rev/612fec2b5a0e
Description:
A little cleanup and fixed passing of a wrong reference
diffstat:
libpurple/blist.c | 14 +++++---------
1 files changed, 5 insertions(+), 9 deletions(-)
diffs (32 lines):
diff --git a/libpurple/blist.c b/libpurple/blist.c
--- a/libpurple/blist.c
+++ b/libpurple/blist.c
@@ -971,23 +971,19 @@ purple_blist_update_buddy_status(PurpleB
cnode = PURPLE_BLIST_NODE(buddy)->parent;
contact = PURPLE_CONTACT(cnode);
purple_contact_set_online_count_relative(contact, +1);
- if (purple_contact_get_online_count(contact) == 1) {
- PurpleGroup *group = PURPLE_GROUP(cnode->parent);
- purple_group_set_online_count_relative(group, +1);
- }
+ if (purple_contact_get_online_count(contact) == 1)
+ purple_group_set_online_count_relative(PURPLE_GROUP(cnode->parent), +1);
} else if (!purple_status_is_online(status) &&
purple_status_is_online(old_status)) {
- purple_blist_node_set_int(&buddy, "last_seen", time(NULL));
+ purple_blist_node_set_int(PURPLE_BLIST_NODE(buddy), "last_seen", time(NULL));
purple_signal_emit(purple_blist_get_handle(), "buddy-signed-off", buddy);
cnode = PURPLE_BLIST_NODE(buddy)->parent;
contact = PURPLE_CONTACT(cnode);
purple_contact_set_online_count_relative(contact, -1);
- if (purple_contact_get_online_count(contact) == 0) {
- PurpleGroup *group = PURPLE_GROUP(cnode->parent);
- purple_group_set_online_count_relative(group, -1);
- }
+ if (purple_contact_get_online_count(contact) == 0)
+ purple_group_set_online_count_relative(PURPLE_GROUP(cnode->parent), -1);
} else {
purple_signal_emit(purple_blist_get_handle(),
"buddy-status-changed", buddy, old_status,
More information about the Commits
mailing list