aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@gmail.com>2009-08-24 02:55:18 +0800
committerXavier Claessens <xclaesse@gmail.com>2009-08-24 03:15:52 +0800
commit69587b5167623c9c73a06ab9c86695019c2146c6 (patch)
tree6933fc8c4959f95eb58be726bd383a520d719dbe
parent45a6ac022bc86f649bb49f909f95b9311eec57c9 (diff)
downloadgsoc2013-empathy-69587b5167623c9c73a06ab9c86695019c2146c6.tar
gsoc2013-empathy-69587b5167623c9c73a06ab9c86695019c2146c6.tar.gz
gsoc2013-empathy-69587b5167623c9c73a06ab9c86695019c2146c6.tar.bz2
gsoc2013-empathy-69587b5167623c9c73a06ab9c86695019c2146c6.tar.lz
gsoc2013-empathy-69587b5167623c9c73a06ab9c86695019c2146c6.tar.xz
gsoc2013-empathy-69587b5167623c9c73a06ab9c86695019c2146c6.tar.zst
gsoc2013-empathy-69587b5167623c9c73a06ab9c86695019c2146c6.zip
Use better avatar location: ~/.cache/<cm>/<protocol>/<token>
-rw-r--r--libempathy/empathy-contact.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/libempathy/empathy-contact.c b/libempathy/empathy-contact.c
index bbce927b7..44d9dbeed 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);