File FATE_303677.patch of Package gnome-main-menu

Index: main-menu/src/main-menu-ui.c
===================================================================
--- main-menu/src/main-menu-ui.c	(revision 501)
+++ main-menu/src/main-menu-ui.c	(working copy)
@@ -1083,12 +1083,14 @@
 
 	GList *node;
 
+	/* we no longer do our own thumbnailing so this "should" not hang on stale mounts, slow endpoints ... */
+	/*
 	if (! g_str_has_prefix (item->uri, "file://"))
 		return NULL;
 
 	for (node = priv->mounts; ! is_nfs && node; node = node->next) {
 		mount = node->data;
-		volume = g_mount_get_volume (mount);
+		volume = g_mount_get_volume (mount); //need to check for null here
 
 		nfs_id = g_volume_get_identifier (volume, G_VOLUME_IDENTIFIER_KIND_NFS_MOUNT);
 		is_nfs = (nfs_id != NULL);
@@ -1106,6 +1108,7 @@
 
 	if (! is_local)
 		return NULL;
+	*/
 
 	if (bookmark_agent_has_item (priv->bm_agents [BOOKMARK_STORE_USER_DOCS], item->uri))
 		return NULL;
Index: libslab/document-tile.c
===================================================================
--- libslab/document-tile.c	(revision 501)
+++ libslab/document-tile.c	(working copy)
@@ -139,8 +139,8 @@
 	gchar *markup;
 
 	AtkObject *accessible;
-	
-	gchar *filename;
+
+	GFile * file;
 	gchar *tooltip_text;
 
 	libslab_checkpoint ("document_tile_new(): start");
@@ -158,14 +158,9 @@
 	time_str = create_subheader_string (modified);
 	subheader = create_subheader (time_str);
 	
-	filename = g_filename_from_uri (uri, NULL, NULL);
-
-  	if (filename)
-		tooltip_text = g_filename_to_utf8 (filename, -1, NULL, NULL, NULL);
-	else
-		tooltip_text = NULL;
-
-	g_free (filename);
+	file = g_file_new_for_uri (uri);
+	tooltip_text = g_file_get_parse_name (file);
+	g_object_unref (file);
 	
 	context_menu = GTK_MENU (gtk_menu_new ());
 
@@ -417,7 +412,7 @@
 
 	libslab_checkpoint ("document-tile.c: load_image(): start for %s", TILE (tile)->uri);
 
-	if (priv->force_icon_name || ! priv->mime_type || ! strstr (TILE (tile)->uri, "file://")) {
+	if (priv->force_icon_name || ! priv->mime_type) {
 		if (priv->force_icon_name)
 			icon_id = priv->force_icon_name;
 		else
@@ -881,30 +876,29 @@
 static void
 open_in_file_manager_trigger (Tile *tile, TileEvent *event, TileAction *action)
 {
-	gchar *filename;
-	gchar *dirname;
+	GFile *filename;
+	GFile *dirname;
 	gchar *uri;
 
 	gchar *cmd;
 
-	filename = g_filename_from_uri (TILE (tile)->uri, NULL, NULL);
-	dirname = g_path_get_dirname (filename);
-	uri = g_filename_to_uri (dirname, NULL, NULL);
-
+	filename = g_file_new_for_uri (TILE (tile)->uri);
+	dirname = g_file_get_parent (filename);
+	uri = g_file_get_uri (dirname);
+	
 	if (!uri)
 		g_warning ("error getting dirname for [%s]\n", TILE (tile)->uri);
 	else
 	{
 		cmd = string_replace_once (get_slab_gconf_string (SLAB_FILE_MANAGER_OPEN_CMD),
 			"FILE_URI", uri);
-
 		spawn_process (cmd);
 
 		g_free (cmd);
 	}
 
-	g_free (filename);
-	g_free (dirname);
+	g_object_unref (filename);
+	g_object_unref (dirname);
 	g_free (uri);
 }