Index: configure.in
===================================================================
--- configure.in	(revision 5258)
+++ configure.in	(working copy)
@@ -71,7 +71,7 @@ dnl it too, or it will never make it into the spec
 
 GDK_PIXBUF_REQUIRED=2.4.0
 GTK_REQUIRED=2.11.3
-GLIB_REQUIRED=2.15.4
+GLIB_REQUIRED=2.19.1
 GCONF_REQUIRED=2.0.0
 STARTUP_NOTIFICATION_REQUIRED=0.5
 XRANDR_REQUIRED=1.2
Index: libgnome-desktop/gnome-desktop-thumbnail.c
===================================================================
--- libgnome-desktop/gnome-desktop-thumbnail.c	(revision 5258)
+++ libgnome-desktop/gnome-desktop-thumbnail.c	(working copy)
@@ -137,17 +137,44 @@ _gdk_pixbuf_new_from_uri_at_scale (const char *uri
     gboolean has_frame;
     SizePrepareContext info;
     GFile *file;
-    GFileInputStream *file_input_stream;
+    GFileInfo *file_info;
+    GInputStream *input_stream;
 
     g_return_val_if_fail (uri != NULL, NULL);
 
+    input_stream = NULL;
+
     file = g_file_new_for_uri (uri);
-    file_input_stream = g_file_read (file, NULL, NULL);
-    if (file_input_stream == NULL) {
-	g_object_unref (file);
-	return NULL;
+
+    /* 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);
     }
 
+    if (input_stream == NULL) {
+        input_stream = G_INPUT_STREAM (g_file_read (file, NULL, NULL));
+        if (input_stream == NULL) {
+	    g_object_unref (file);
+            return NULL;
+        }
+    }
+
     loader = gdk_pixbuf_loader_new ();
     if (1 <= width || 1 <= height) {
         info.width = width;
@@ -162,7 +189,7 @@ _gdk_pixbuf_new_from_uri_at_scale (const char *uri
     result = FALSE;
     while (!has_frame) {
 
-	bytes_read = g_input_stream_read (G_INPUT_STREAM (file_input_stream),
+	bytes_read = g_input_stream_read (input_stream,
 					  buffer,
 					  sizeof (buffer),
 					  NULL,
@@ -194,17 +221,17 @@ _gdk_pixbuf_new_from_uri_at_scale (const char *uri
     }
 
     gdk_pixbuf_loader_close (loader, NULL);
-    
-    if (result) {
+
+    if (!result) {
 	g_object_unref (G_OBJECT (loader));
-	g_input_stream_close (G_INPUT_STREAM (file_input_stream), NULL, NULL);
-	g_object_unref (file_input_stream);
+	g_input_stream_close (input_stream, NULL, NULL);
+	g_object_unref (input_stream);
 	g_object_unref (file);
 	return NULL;
     }
 
-    g_input_stream_close (G_INPUT_STREAM (file_input_stream), NULL, NULL);
-    g_object_unref (file_input_stream);
+    g_input_stream_close (input_stream, NULL, NULL);
+    g_object_unref (input_stream);
     g_object_unref (file);
 
     pixbuf = gdk_pixbuf_loader_get_pixbuf (loader);
