[empathy] Remove EmpathyAvatar->token



commit 180d83485a0d10d8c45760852d8d588e20a7d3e2
Author: Philip Withnall <philip withnall collabora co uk>
Date:   Mon Aug 23 13:12:49 2010 +0100

    Remove EmpathyAvatar->token

 libempathy-gtk/empathy-avatar-chooser.c |    4 ++--
 libempathy/empathy-contact.c            |   13 +++----------
 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 08dbf03..678e7b9 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 a891a63..2605431 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 3c144a3..e9b1c86 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);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]