aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy/empathy-log-manager.c
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@src.gnome.org>2008-05-28 01:34:44 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2008-05-28 01:34:44 +0800
commit891dd64e17fe816e6bab0b1e1d3ea35eb61a2e35 (patch)
treeff5389343502b4121a6eebb5496edb6d83d52245 /libempathy/empathy-log-manager.c
parent1403c791daa33f39c3dc86917c2f133ced2ae8f4 (diff)
downloadgsoc2013-empathy-891dd64e17fe816e6bab0b1e1d3ea35eb61a2e35.tar
gsoc2013-empathy-891dd64e17fe816e6bab0b1e1d3ea35eb61a2e35.tar.gz
gsoc2013-empathy-891dd64e17fe816e6bab0b1e1d3ea35eb61a2e35.tar.bz2
gsoc2013-empathy-891dd64e17fe816e6bab0b1e1d3ea35eb61a2e35.tar.lz
gsoc2013-empathy-891dd64e17fe816e6bab0b1e1d3ea35eb61a2e35.tar.xz
gsoc2013-empathy-891dd64e17fe816e6bab0b1e1d3ea35eb61a2e35.tar.zst
gsoc2013-empathy-891dd64e17fe816e6bab0b1e1d3ea35eb61a2e35.zip
Move avatar cache to ~/.cache and don't mix avatar from different contacts, tokens are not garanteed to be different.
svn path=/trunk/; revision=1128
Diffstat (limited to 'libempathy/empathy-log-manager.c')
-rw-r--r--libempathy/empathy-log-manager.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/libempathy/empathy-log-manager.c b/libempathy/empathy-log-manager.c
index 1115e43c3..aa70b49da 100644
--- a/libempathy/empathy-log-manager.c
+++ b/libempathy/empathy-log-manager.c
@@ -337,7 +337,6 @@ empathy_log_manager_get_messages_for_file (EmpathyLogManager *manager,
for (node = log_node->children; node; node = node->next) {
EmpathyMessage *message;
EmpathyContact *sender;
- EmpathyAvatar *avatar = NULL;
gchar *time;
time_t t;
gchar *sender_id;
@@ -361,9 +360,6 @@ empathy_log_manager_get_messages_for_file (EmpathyLogManager *manager,
is_user_str = xmlGetProp (node, "isuser");
msg_type_str = xmlGetProp (node, "type");
- if (!G_STR_EMPTY (sender_avatar_token)) {
- avatar = empathy_avatar_new_from_cache (sender_avatar_token);
- }
if (is_user_str) {
is_user = strcmp (is_user_str, "true") == 0;
}
@@ -375,9 +371,9 @@ empathy_log_manager_get_messages_for_file (EmpathyLogManager *manager,
sender = empathy_contact_new_full (account, sender_id, sender_name);
empathy_contact_set_is_user (sender, is_user);
- if (avatar) {
- empathy_contact_set_avatar (sender, avatar);
- empathy_avatar_unref (avatar);
+ if (!G_STR_EMPTY (sender_avatar_token)) {
+ empathy_contact_load_avatar_cache (sender,
+ sender_avatar_token);
}
message = empathy_message_new (body);