[maemo-commits] [maemo-commits] r14693 - projects/haf/trunk/hildon-fm/hildon-fm

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Thu Nov 1 15:31:03 EET 2007
Author: marivoll
Date: 2007-11-01 15:31:02 +0200 (Thu, 01 Nov 2007)
New Revision: 14693

Modified:
   projects/haf/trunk/hildon-fm/hildon-fm/hildon-file-system-model.c
Log:
	* hildon-fm/hildon-file-system-model.c
	(hildon_file_system_model_get): do not show the loading preview
	for remote locations, the thumbnail is not going to be
	loaded. (N37279)


Modified: projects/haf/trunk/hildon-fm/hildon-fm/hildon-file-system-model.c
===================================================================
--- projects/haf/trunk/hildon-fm/hildon-fm/hildon-file-system-model.c	2007-11-01 13:10:02 UTC (rev 14692)
+++ projects/haf/trunk/hildon-fm/hildon-fm/hildon-file-system-model.c	2007-11-01 13:31:02 UTC (rev 14693)
@@ -915,16 +915,17 @@
             {
               HildonMimeCategory cat;
               const gchar *mime_type;
-              gchar *uri = gtk_file_system_path_to_uri(priv->filesystem,
+              gchar *str = gtk_file_system_path_to_uri(priv->filesystem,
                                                        path);
+	      GnomeVFSURI *uri = gnome_vfs_uri_new (str);
 
               mime_type = gtk_file_info_get_mime_type(info);
               /* FIXME: hack to workaround problem with Sketch files.
                * Second check is because we cannot make thumbnails for
-               * images on the Gateway. */
+               * non local images. */
               if (mime_type != NULL
                   && strcmp(mime_type, "sketch/png") != 0
-                  && (uri && !g_str_has_prefix(uri, "obex://")))
+                  && gnome_vfs_uri_is_local (uri))
               {
                 cat = hildon_mime_get_category_for_mime_type(mime_type);
                 if (cat == HILDON_MIME_CATEGORY_IMAGES)
@@ -933,7 +934,8 @@
                         gtk_icon_theme_get_default(),
                         "qgn_list_gene_image_file_wait", THUMBNAIL_ICON);
               }
-              g_free(uri);
+	      gnome_vfs_uri_unref (uri);
+              g_free(str);
             }
 
             if (!model_node->thumbnail_cache)


More information about the maemo-commits mailing list