From: Guillaume Desmottes <gdesmott@gnome.org>
svn path=/trunk/; revision=2719
+static void
+contact_remove_ready_flag (EmpathyContact *contact,
+ EmpathyContactReady flag)
+{
+ EmpathyContactPriv *priv = GET_PRIV (contact);
+
+ if (priv->ready & flag)
+ {
+ priv->ready ^= flag;
+ g_object_notify (G_OBJECT (contact), "ready");
+ }
+}
+
EmpathyContact *
empathy_contact_new (McAccount *account)
{
EmpathyContact *
empathy_contact_new (McAccount *account)
{
priv->handle = handle;
g_object_notify (G_OBJECT (contact), "handle");
}
priv->handle = handle;
g_object_notify (G_OBJECT (contact), "handle");
}
- contact_set_ready_flag (contact, EMPATHY_CONTACT_READY_HANDLE);
+
+ if (handle != 0)
+ contact_set_ready_flag (contact, EMPATHY_CONTACT_READY_HANDLE);
+ else
+ contact_remove_ready_flag (contact, EMPATHY_CONTACT_READY_HANDLE);
+
g_object_unref (contact);
}
g_object_unref (contact);
}