[empathy/mc5] Use better avatar location: ~/.cache/<cm>/<protocol>/<token>



commit 69587b5167623c9c73a06ab9c86695019c2146c6
Author: Xavier Claessens <xclaesse gmail com>
Date:   Sun Aug 23 20:55:18 2009 +0200

    Use better avatar location: ~/.cache/<cm>/<protocol>/<token>

 libempathy/empathy-contact.c |   10 +++-------
 1 files changed, 3 insertions(+), 7 deletions(-)
---
diff --git a/libempathy/empathy-contact.c b/libempathy/empathy-contact.c
index bbce927..44d9dbe 100644
--- a/libempathy/empathy-contact.c
+++ b/libempathy/empathy-contact.c
@@ -858,27 +858,23 @@ contact_get_avatar_filename (EmpathyContact *contact,
   gchar *avatar_path;
   gchar *avatar_file;
   gchar *token_escaped;
-  gchar *contact_escaped;
 
   if (EMP_STR_EMPTY (empathy_contact_get_id (contact)))
     return NULL;
 
-  contact_escaped = tp_escape_as_identifier (empathy_contact_get_id (contact));
   token_escaped = tp_escape_as_identifier (token);
   account = empathy_contact_get_account (contact);
 
-  /* FIXME: Do not use the account, but proto/cm instead */
   avatar_path = g_build_filename (g_get_user_cache_dir (),
-      PACKAGE_NAME,
+      "telepathy",
       "avatars",
-      empathy_account_get_unique_name (account),
-      contact_escaped,
+      empathy_account_get_connection_manager (account),
+      empathy_account_get_protocol (account),
       NULL);
   g_mkdir_with_parents (avatar_path, 0700);
 
   avatar_file = g_build_filename (avatar_path, token_escaped, NULL);
 
-  g_free (contact_escaped);
   g_free (token_escaped);
   g_free (avatar_path);
 



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