gnome-main-menu r502 - in trunk: libslab main-menu/src



Author: sreeves
Date: Sat Sep 13 02:29:10 2008
New Revision: 502
URL: http://svn.gnome.org/viewvc/gnome-main-menu?rev=502&view=rev

Log:
start of showing remote tiles in recent section

Modified:
   trunk/libslab/document-tile.c
   trunk/main-menu/src/main-menu-ui.c

Modified: trunk/libslab/document-tile.c
==============================================================================
--- trunk/libslab/document-tile.c	(original)
+++ trunk/libslab/document-tile.c	Sat Sep 13 02:29:10 2008
@@ -881,30 +881,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);
 }
 

Modified: trunk/main-menu/src/main-menu-ui.c
==============================================================================
--- trunk/main-menu/src/main-menu-ui.c	(original)
+++ trunk/main-menu/src/main-menu-ui.c	Sat Sep 13 02:29:10 2008
@@ -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;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]