aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-03-09 17:34:16 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-03-09 17:34:16 +0800
commit054ec3b5a0cd588a577d36a62be0aa251707aaa6 (patch)
tree6ff5d9ad939590478f5172ed874c6e8154adfb78
parent5127a611e09af16d0cf435e659d0448e2791c494 (diff)
downloadgsoc2013-empathy-054ec3b5a0cd588a577d36a62be0aa251707aaa6.tar
gsoc2013-empathy-054ec3b5a0cd588a577d36a62be0aa251707aaa6.tar.gz
gsoc2013-empathy-054ec3b5a0cd588a577d36a62be0aa251707aaa6.tar.bz2
gsoc2013-empathy-054ec3b5a0cd588a577d36a62be0aa251707aaa6.tar.lz
gsoc2013-empathy-054ec3b5a0cd588a577d36a62be0aa251707aaa6.tar.xz
gsoc2013-empathy-054ec3b5a0cd588a577d36a62be0aa251707aaa6.tar.zst
gsoc2013-empathy-054ec3b5a0cd588a577d36a62be0aa251707aaa6.zip
Don't flood logs when individials don't have avatars
-rw-r--r--libempathy-gtk/empathy-individual-store.c12
-rw-r--r--libempathy-gtk/empathy-ui-utils.c4
2 files changed, 11 insertions, 5 deletions
diff --git a/libempathy-gtk/empathy-individual-store.c b/libempathy-gtk/empathy-individual-store.c
index b475b7c30..3f9d025f7 100644
--- a/libempathy-gtk/empathy-individual-store.c
+++ b/libempathy-gtk/empathy-individual-store.c
@@ -558,9 +558,15 @@ individual_avatar_pixbuf_received_cb (FolksIndividual *individual,
if (error != NULL)
{
- DEBUG ("failed to retrieve pixbuf for individual %s: %s",
- folks_alias_details_get_alias (FOLKS_ALIAS_DETAILS (individual)),
- error->message);
+ /* No need to display an error if the individal just doesn't have an
+ * avatar */
+ if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_NOT_FOUND))
+ {
+ DEBUG ("failed to retrieve pixbuf for individual %s: %s",
+ folks_alias_details_get_alias (FOLKS_ALIAS_DETAILS (individual)),
+ error->message);
+ }
+
g_clear_error (&error);
}
else if (data->store != NULL)
diff --git a/libempathy-gtk/empathy-ui-utils.c b/libempathy-gtk/empathy-ui-utils.c
index d462403ff..6f86ccddd 100644
--- a/libempathy-gtk/empathy-ui-utils.c
+++ b/libempathy-gtk/empathy-ui-utils.c
@@ -732,8 +732,8 @@ empathy_pixbuf_avatar_from_individual_scaled_async (
avatar_icon =
folks_avatar_details_get_avatar (FOLKS_AVATAR_DETAILS (individual));
if (avatar_icon == NULL) {
- g_simple_async_result_set_error (result, TP_ERRORS,
- TP_ERROR_INVALID_ARGUMENT, "no avatar found");
+ g_simple_async_result_set_error (result, G_IO_ERROR,
+ G_IO_ERROR_NOT_FOUND, "no avatar found");
g_simple_async_result_complete (result);
g_object_unref (result);