summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--thumbnailer/gdk-pixbuf-thumbnailer.c31
1 files changed, 3 insertions, 28 deletions
diff --git a/thumbnailer/gdk-pixbuf-thumbnailer.c b/thumbnailer/gdk-pixbuf-thumbnailer.c
index 2b6541e70..0ac93d239 100644
--- a/thumbnailer/gdk-pixbuf-thumbnailer.c
+++ b/thumbnailer/gdk-pixbuf-thumbnailer.c
@@ -129,37 +129,12 @@ _gdk_pixbuf_new_from_uri_at_scale (const char *uri,
g_return_val_if_fail (uri != NULL, NULL);
- input_stream = NULL;
-
file = g_file_new_for_uri (uri);
- /* First see if we can get an input stream via preview::icon */
- file_info = g_file_query_info (file,
- G_FILE_ATTRIBUTE_PREVIEW_ICON,
- G_FILE_QUERY_INFO_NONE,
- NULL, /* GCancellable */
- NULL); /* return location for GError */
- if (file_info != NULL) {
- GObject *object;
-
- object = g_file_info_get_attribute_object (file_info,
- G_FILE_ATTRIBUTE_PREVIEW_ICON);
- if (object != NULL && G_IS_LOADABLE_ICON (object)) {
- input_stream = g_loadable_icon_load (G_LOADABLE_ICON (object),
- 0, /* size */
- NULL, /* return location for type */
- NULL, /* GCancellable */
- NULL); /* return location for GError */
- }
- g_object_unref (file_info);
- }
-
+ input_stream = G_INPUT_STREAM (g_file_read (file, NULL, error));
if (input_stream == NULL) {
- input_stream = G_INPUT_STREAM (g_file_read (file, NULL, error));
- if (input_stream == NULL) {
- g_object_unref (file);
- return NULL;
- }
+ g_object_unref (file);
+ return NULL;
}
has_frame = FALSE;