]> git.0d.be Git - empathy.git/commitdiff
Remove EmpathyAvatar->token
authorPhilip Withnall <philip.withnall@collabora.co.uk>
Mon, 23 Aug 2010 12:12:49 +0000 (13:12 +0100)
committerPhilip Withnall <philip.withnall@collabora.co.uk>
Tue, 24 Aug 2010 09:45:29 +0000 (10:45 +0100)
libempathy-gtk/empathy-avatar-chooser.c
libempathy/empathy-contact.c
libempathy/empathy-contact.h

index 08dbf03376e3ce4bacf7d9ee873c7bc2228158b7..678e7b9eab36dc4b48f52244e68a31266f28654e 100644 (file)
@@ -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);
 }
index a891a63614e6d867a5e2eda130e391b3ede7edb4..260543155810c89fd11e77560302b40aba08fc0d 100644 (file)
@@ -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);
index 3c144a3796646149771123f5d687c2b8eb1558fc..e9b1c8697d26d439fe2b8eea1da5878413d18c93 100644 (file)
@@ -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);