telepathy-mission-control: Ignore changes to the avatar of former self-contacts
Simon McVittie
smcv at kemper.freedesktop.org
Tue Oct 9 09:11:35 PDT 2012
Module: telepathy-mission-control
Branch: master
Commit: d2a26f3b1a3d6e0fead0b2885347bb9e0d6d15bd
URL: http://cgit.freedesktop.org/telepathy/telepathy-mission-control/commit/?id=d2a26f3b1a3d6e0fead0b2885347bb9e0d6d15bd
Author: Simon McVittie <simon.mcvittie at collabora.co.uk>
Date: Tue Oct 9 11:27:57 2012 +0100
Ignore changes to the avatar of former self-contacts
This is highly theoretical, but in principle it could happen.
---
src/mcd-account.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/mcd-account.c b/src/mcd-account.c
index 6041ba6..39db9fa 100644
--- a/src/mcd-account.c
+++ b/src/mcd-account.c
@@ -1373,12 +1373,18 @@ mcd_account_self_contact_notify_avatar_file_cb (McdAccount *self,
GParamSpec *unused_param_spec G_GNUC_UNUSED,
TpContact *self_contact)
{
- const gchar *token = tp_contact_get_avatar_token (self_contact);
+ const gchar *token;
gchar *prev_token;
- GFile *file = tp_contact_get_avatar_file (self_contact);
+ GFile *file;
GError *error = NULL;
gboolean changed;
+ if (self_contact != self->priv->self_contact)
+ return;
+
+ file = tp_contact_get_avatar_file (self_contact);
+ token = tp_contact_get_avatar_token (self_contact);
+
if (self->priv->setting_avatar)
{
DEBUG ("Ignoring avatar change notification: we are setting ours");
More information about the telepathy-commits
mailing list