[epiphany/downloads: 6/12] ephy-file-helpers: allow desktop in ephy_file_browse_to



commit bbb2f8a055e42007874e85df11445e4390bbd916
Author: Diego Escalante Urrelo <descalante igalia com>
Date:   Thu Jan 20 01:42:12 2011 -0500

    ephy-file-helpers: allow desktop in ephy_file_browse_to
    
    Previously we were denying browsing to the desktop or children of it because
    the downloads automatically opened insane numbers of windows.

 lib/ephy-file-helpers.c |   27 +++++++--------------------
 1 files changed, 7 insertions(+), 20 deletions(-)
---
diff --git a/lib/ephy-file-helpers.c b/lib/ephy-file-helpers.c
index 268ef36..80d996e 100644
--- a/lib/ephy-file-helpers.c
+++ b/lib/ephy-file-helpers.c
@@ -847,29 +847,16 @@ gboolean
 ephy_file_browse_to (GFile *file,
 		     guint32 user_time)
 {
-	GFile *parent, *desktop;
-	char *desktop_dir;
+	GFile *parent;
 	gboolean ret;
 
-	desktop_dir = ephy_file_desktop_dir ();
-	desktop = g_file_new_for_path (desktop_dir);
-	
-	/* Don't do anything if destination is the desktop */
-	if (g_file_has_prefix (file, desktop))
-	{
-		ret = FALSE;
-	}
-	else
-	{
-		parent = g_file_get_parent (file);
-		/* TODO find a way to make nautilus scroll to the actual file */
-		ret = ephy_file_launch_handler ("x-directory/normal",
-						parent,
-						user_time);
-	}
+	parent = g_file_get_parent (file);
+	/* TODO find a way to make nautilus scroll to the actual file */
+	ret = ephy_file_launch_handler ("x-directory/normal",
+					parent,
+					user_time);
 
-	g_object_unref (desktop);
-	g_free (desktop_dir);
+	g_object_unref (parent);
 
 	return ret;
 }



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