telepathy-mission-control: mcd_account_process_initial_avatar_token: don' t take self_contact argument
Simon McVittie
smcv at kemper.freedesktop.org
Tue Oct 9 09:11:35 PDT 2012
Module: telepathy-mission-control
Branch: master
Commit: d4eec9aa5baa63fdfc0cf354561044786dfa23b5
URL: http://cgit.freedesktop.org/telepathy/telepathy-mission-control/commit/?id=d4eec9aa5baa63fdfc0cf354561044786dfa23b5
Author: Simon McVittie <simon.mcvittie at collabora.co.uk>
Date: Tue Oct 9 11:29:39 2012 +0100
mcd_account_process_initial_avatar_token: don't take self_contact argument
It can be retrieved from the McdAccount.
---
src/mcd-account.c | 16 ++++++++++------
1 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/src/mcd-account.c b/src/mcd-account.c
index 39db9fa..ef613fa 100644
--- a/src/mcd-account.c
+++ b/src/mcd-account.c
@@ -4676,11 +4676,15 @@ _mcd_account_get_old_avatar_filename (McdAccount *account,
}
static void
-mcd_account_process_initial_avatar_token (McdAccount *self,
- TpContact *self_contact)
+mcd_account_process_initial_avatar_token (McdAccount *self)
{
- gchar *prev_token = _mcd_account_get_avatar_token (self);
- const gchar *token = tp_contact_get_avatar_token (self_contact);
+ gchar *prev_token;
+ const gchar *token;
+
+ g_assert (self->priv->self_contact != NULL);
+
+ prev_token = _mcd_account_get_avatar_token (self);
+ token = tp_contact_get_avatar_token (self->priv->self_contact);
/* If we have a stored avatar but no avatar token, we must have
* changed it locally; set it.
@@ -4718,7 +4722,7 @@ mcd_account_process_initial_avatar_token (McdAccount *self,
* mid-session - i.e. download it and use it as our new avatar. */
if (tp_strdiff (token, prev_token))
{
- GFile *file = tp_contact_get_avatar_file (self_contact);
+ GFile *file = tp_contact_get_avatar_file (self->priv->self_contact);
DEBUG ("The server's avatar does not match ours");
@@ -4770,7 +4774,7 @@ mcd_account_self_contact_upgraded_cb (GObject *source_object,
tp_g_signal_connect_object (self_contact, "notify::avatar-file",
G_CALLBACK (mcd_account_self_contact_notify_avatar_file_cb),
self, G_CONNECT_SWAPPED);
- mcd_account_process_initial_avatar_token (self, self_contact);
+ mcd_account_process_initial_avatar_token (self);
}
else
{
More information about the telepathy-commits
mailing list