[nautilus] thumbnails: make sure to cache all mime types from gdk-pixbuf
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] thumbnails: make sure to cache all mime types from gdk-pixbuf
- Date: Wed, 27 Jul 2011 15:37:21 +0000 (UTC)
commit a000844b5a6039375b0e4176dd4c0f7083b46cb7
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Wed Jul 27 15:36:31 2011 +0200
thumbnails: make sure to cache all mime types from gdk-pixbuf
G_N_ELEMENTS() does not work for heap-allocated arrays, and always
returns 1, so we were not actually caching all the supported mime types
for a specific pixbuf loader after the first.
This should also fix nautilus not thumbnailing e.g. compressed SVG
images, as reported in [1].
[1] https://bugzilla.gnome.org/show_bug.cgi?id=655406
libnautilus-private/nautilus-thumbnails.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/libnautilus-private/nautilus-thumbnails.c b/libnautilus-private/nautilus-thumbnails.c
index b11e875..c61200f 100644
--- a/libnautilus-private/nautilus-thumbnails.c
+++ b/libnautilus-private/nautilus-thumbnails.c
@@ -481,7 +481,7 @@ get_types_table (void)
for (l = format_list; l; l = l->next) {
types = gdk_pixbuf_format_get_mime_types (l->data);
- for (i = 0; i < G_N_ELEMENTS (types); i++) {
+ for (i = 0; types[i] != NULL; i++) {
g_hash_table_insert (image_mime_types,
types [i],
GUINT_TO_POINTER (1));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]