gobjectification: 6669489d: We can't automatically set the presence ...
qulogic at pidgin.im
qulogic at pidgin.im
Fri Jul 9 01:12:30 EDT 2010
----------------------------------------------------------------------
Revision: 6669489d1ef1ccf26310034c65ef9788429e8fbe
Parent: ffba639d49538b078a3b5cf93ca94d6517fe40f9
Author: qulogic at pidgin.im
Date: 07/09/10 00:56:43
Branch: im.pidgin.gobjectification
URL: http://d.pidgin.im/viewmtn/revision/info/6669489d1ef1ccf26310034c65ef9788429e8fbe
Changelog:
We can't automatically set the presence of a buddy when its instance
is created, because the account is not set yet.
Changes against parent ffba639d49538b078a3b5cf93ca94d6517fe40f9
patched libpurple/buddy.c
-------------- next part --------------
============================================================
--- libpurple/buddy.c a2687cfb589ee62de3eba89213213f9e9e915306
+++ libpurple/buddy.c c10d2501eff5ea285c081631250a1397fb80e151
@@ -482,6 +482,11 @@ purple_buddy_set_account(PurpleBuddy *bu
g_return_if_fail(buddy != NULL);
priv = PURPLE_BUDDY_GET_PRIVATE(buddy);
priv->account = account;
+
+ if (priv->presence == NULL) {
+ priv->presence = purple_presence_new_for_buddy(buddy);
+ purple_presence_set_status_active(priv->presence, "offline", TRUE);
+ }
}
static gboolean
@@ -666,10 +671,7 @@ purple_buddy_init(GTypeInstance *instanc
PurpleBuddyPrivate *priv = PURPLE_BUDDY_GET_PRIVATE(buddy);
buddy->priv = priv;
- priv->presence = purple_presence_new_for_buddy(buddy);
- purple_presence_set_status_active(priv->presence, "offline", TRUE);
-
if (ops && ops->new_node)
ops->new_node(PURPLE_BLIST_NODE(buddy));
More information about the Commits
mailing list