[gthumb] use the default missing icon if an error occurs
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gthumb] use the default missing icon if an error occurs
- Date: Sat, 27 Feb 2010 12:03:29 +0000 (UTC)
commit 589d59a5c312cad6fcc6cd344ae25675b25ab3fd
Author: Paolo Bacchilega <paobac src gnome org>
Date: Sat Feb 27 13:01:56 2010 +0100
use the default missing icon if an error occurs
gthumb/gth-icon-cache.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/gthumb/gth-icon-cache.c b/gthumb/gth-icon-cache.c
index f420d3f..c964961 100644
--- a/gthumb/gth-icon-cache.c
+++ b/gthumb/gth-icon-cache.c
@@ -136,7 +136,10 @@ gth_icon_cache_get_pixbuf (GthIconCache *icon_cache,
return pixbuf;
}
- if (icon == NULL) {
+ if (icon != NULL)
+ pixbuf = _g_icon_get_pixbuf (icon, icon_cache->icon_size, icon_cache->icon_theme);
+
+ if (pixbuf == NULL) {
GIcon *unknown_icon;
unknown_icon = g_themed_icon_new ("missing-image");
@@ -144,8 +147,7 @@ gth_icon_cache_get_pixbuf (GthIconCache *icon_cache,
g_object_unref (unknown_icon);
}
- else
- pixbuf = _g_icon_get_pixbuf (icon, icon_cache->icon_size, icon_cache->icon_theme);
+
g_hash_table_insert (icon_cache->cache, (gpointer) key, g_object_ref (pixbuf));
performance (DEBUG_INFO, "done (not cached)");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]