diff options
author | Xavier Claessens <xclaesse@src.gnome.org> | 2008-07-09 01:32:41 +0800 |
---|---|---|
committer | Xavier Claessens <xclaesse@src.gnome.org> | 2008-07-09 01:32:41 +0800 |
commit | dd1dfc2d27d2480e0b2933117e57895ca2329f98 (patch) | |
tree | ba78f9435bee52001efc819a8a55a62c38d465aa /libempathy/empathy-contact.c | |
parent | 700739c21b17d38188e84209cb78c759fa5ad9be (diff) | |
download | gsoc2013-empathy-dd1dfc2d27d2480e0b2933117e57895ca2329f98.tar gsoc2013-empathy-dd1dfc2d27d2480e0b2933117e57895ca2329f98.tar.gz gsoc2013-empathy-dd1dfc2d27d2480e0b2933117e57895ca2329f98.tar.bz2 gsoc2013-empathy-dd1dfc2d27d2480e0b2933117e57895ca2329f98.tar.lz gsoc2013-empathy-dd1dfc2d27d2480e0b2933117e57895ca2329f98.tar.xz gsoc2013-empathy-dd1dfc2d27d2480e0b2933117e57895ca2329f98.tar.zst gsoc2013-empathy-dd1dfc2d27d2480e0b2933117e57895ca2329f98.zip |
add empathy_avatar_save_to_file (Guillaume Desmottes)
svn path=/trunk/; revision=1209
Diffstat (limited to 'libempathy/empathy-contact.c')
-rw-r--r-- | libempathy/empathy-contact.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/libempathy/empathy-contact.c b/libempathy/empathy-contact.c index 46aee93ea..489e02c2e 100644 --- a/libempathy/empathy-contact.c +++ b/libempathy/empathy-contact.c @@ -829,7 +829,7 @@ empathy_contact_load_avatar_data (EmpathyContact *contact, /* Save to cache if not yet in it */ filename = contact_get_avatar_filename (contact, token); if (filename && !g_file_test (filename, G_FILE_TEST_EXISTS)) { - if (!g_file_set_contents (filename, data, len, &error)) { + if (!empathy_avatar_save_to_file (avatar, filename, &error)) { DEBUG ("Failed to save avatar in cache: %s", error ? error->message : "No error given"); g_clear_error (&error); @@ -931,3 +931,10 @@ empathy_avatar_ref (EmpathyAvatar *avatar) return avatar; } +gboolean +empathy_avatar_save_to_file (EmpathyAvatar *self, + const gchar *filename, + GError **error) +{ + return g_file_set_contents (filename, self->data, self->len, error); +} |