diff options
author | Philip Withnall <philip.withnall@collabora.co.uk> | 2010-08-23 20:12:49 +0800 |
---|---|---|
committer | Philip Withnall <philip.withnall@collabora.co.uk> | 2010-08-24 17:45:29 +0800 |
commit | 180d83485a0d10d8c45760852d8d588e20a7d3e2 (patch) | |
tree | 266acfb966092345122f44d3c0ad624ff2fa1bb7 | |
parent | 77646a2826689c6f171e5a80eb1cf4702b458494 (diff) | |
download | gsoc2013-empathy-180d83485a0d10d8c45760852d8d588e20a7d3e2.tar gsoc2013-empathy-180d83485a0d10d8c45760852d8d588e20a7d3e2.tar.gz gsoc2013-empathy-180d83485a0d10d8c45760852d8d588e20a7d3e2.tar.bz2 gsoc2013-empathy-180d83485a0d10d8c45760852d8d588e20a7d3e2.tar.lz gsoc2013-empathy-180d83485a0d10d8c45760852d8d588e20a7d3e2.tar.xz gsoc2013-empathy-180d83485a0d10d8c45760852d8d588e20a7d3e2.tar.zst gsoc2013-empathy-180d83485a0d10d8c45760852d8d588e20a7d3e2.zip |
Remove EmpathyAvatar->token
-rw-r--r-- | libempathy-gtk/empathy-avatar-chooser.c | 4 | ||||
-rw-r--r-- | libempathy/empathy-contact.c | 13 | ||||
-rw-r--r-- | libempathy/empathy-contact.h | 1 |
3 files changed, 5 insertions, 13 deletions
diff --git a/libempathy-gtk/empathy-avatar-chooser.c b/libempathy-gtk/empathy-avatar-chooser.c index 08dbf0337..678e7b9ea 100644 --- a/libempathy-gtk/empathy-avatar-chooser.c +++ b/libempathy-gtk/empathy-avatar-chooser.c @@ -567,7 +567,7 @@ avatar_chooser_maybe_convert_and_scale (EmpathyAvatarChooser *chooser, /* Takes ownership of new_mime_type and best_image_data */ avatar = empathy_avatar_new ((guchar *) best_image_data, - best_image_size, new_mime_type, NULL, NULL); + best_image_size, new_mime_type, NULL); return avatar; } @@ -612,7 +612,7 @@ avatar_chooser_set_image_from_data (EmpathyAvatarChooser *chooser, } /* avatar takes ownership of data and mime_type */ - avatar = empathy_avatar_new ((guchar *) data, size, mime_type, NULL, NULL); + avatar = empathy_avatar_new ((guchar *) data, size, mime_type, NULL); avatar_chooser_set_image (chooser, avatar, pixbuf, set_locally); } diff --git a/libempathy/empathy-contact.c b/libempathy/empathy-contact.c index a891a6361..260543155 100644 --- a/libempathy/empathy-contact.c +++ b/libempathy/empathy-contact.c @@ -1181,8 +1181,7 @@ contact_load_avatar_cache (EmpathyContact *contact, if (data) { DEBUG ("Avatar loaded from %s", filename); - avatar = empathy_avatar_new ((guchar *) data, len, NULL, g_strdup (token), - filename); + avatar = empathy_avatar_new ((guchar *) data, len, NULL, filename); contact_set_avatar (contact, avatar); empathy_avatar_unref (avatar); } @@ -1214,11 +1213,10 @@ empathy_avatar_get_type (void) * @data: the avatar data * @len: the size of avatar data * @format: the mime type of the avatar image - * @token: the token of the avatar * @filename: the filename where the avatar is stored in cache * * Create a #EmpathyAvatar from the provided data. This function takes the - * ownership of @data, @format, @token and @filename. + * ownership of @data, @format and @filename. * * Returns: a new #EmpathyAvatar */ @@ -1226,7 +1224,6 @@ EmpathyAvatar * empathy_avatar_new (guchar *data, gsize len, gchar *format, - gchar *token, gchar *filename) { EmpathyAvatar *avatar; @@ -1235,7 +1232,6 @@ empathy_avatar_new (guchar *data, avatar->data = data; avatar->len = len; avatar->format = format; - avatar->token = token; avatar->filename = filename; avatar->refcount = 1; @@ -1252,7 +1248,6 @@ empathy_avatar_unref (EmpathyAvatar *avatar) { g_free (avatar->data); g_free (avatar->format); - g_free (avatar->token); g_free (avatar->filename); g_slice_free (EmpathyAvatar, avatar); } @@ -1636,10 +1631,8 @@ contact_set_avatar_from_tp_contact (EmpathyContact *contact) { EmpathyContactPriv *priv = GET_PRIV (contact); const gchar *mime; - const gchar *token; GFile *file; - token = tp_contact_get_avatar_token (priv->tp_contact); mime = tp_contact_get_avatar_mime_type (priv->tp_contact); file = tp_contact_get_avatar_file (priv->tp_contact); @@ -1650,7 +1643,7 @@ contact_set_avatar_from_tp_contact (EmpathyContact *contact) gsize len; g_file_load_contents (file, NULL, &data, &len, NULL, NULL); - avatar = empathy_avatar_new ((guchar *) data, len, g_strdup (mime), g_strdup (token), + avatar = empathy_avatar_new ((guchar *) data, len, g_strdup (mime), g_file_get_path (file)); contact_set_avatar (contact, avatar); empathy_avatar_unref (avatar); diff --git a/libempathy/empathy-contact.h b/libempathy/empathy-contact.h index 3c144a379..e9b1c8697 100644 --- a/libempathy/empathy-contact.h +++ b/libempathy/empathy-contact.h @@ -114,7 +114,6 @@ GType empathy_avatar_get_type (void) G_GNUC_CONST; EmpathyAvatar * empathy_avatar_new (guchar *data, gsize len, gchar *format, - gchar *token, gchar *filename); EmpathyAvatar * empathy_avatar_ref (EmpathyAvatar *avatar); void empathy_avatar_unref (EmpathyAvatar *avatar); |