aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ephy-file-helpers.c
diff options
context:
space:
mode:
authorDiego Escalante Urrelo <diegoe@gnome.org>2007-04-25 03:45:19 +0800
committerDiego Escalante Urrelo <diegoe@src.gnome.org>2007-04-25 03:45:19 +0800
commit2697544c10462aefaf7091c25d5bbbb3de90ab01 (patch)
tree118151f18944b1d03eb1f3384da85382b0a9f0f4 /lib/ephy-file-helpers.c
parent63024526868d1241f9edefc2e8cc3112d6a010d3 (diff)
downloadgsoc2013-epiphany-2697544c10462aefaf7091c25d5bbbb3de90ab01.tar
gsoc2013-epiphany-2697544c10462aefaf7091c25d5bbbb3de90ab01.tar.gz
gsoc2013-epiphany-2697544c10462aefaf7091c25d5bbbb3de90ab01.tar.bz2
gsoc2013-epiphany-2697544c10462aefaf7091c25d5bbbb3de90ab01.tar.lz
gsoc2013-epiphany-2697544c10462aefaf7091c25d5bbbb3de90ab01.tar.xz
gsoc2013-epiphany-2697544c10462aefaf7091c25d5bbbb3de90ab01.tar.zst
gsoc2013-epiphany-2697544c10462aefaf7091c25d5bbbb3de90ab01.zip
Avoid opening nautilus if downloads are done to Desktop. This re-fixes bug
2007-04-24 Diego Escalante Urrelo <diegoe@gnome.org> * src/popup-commands.c: * lib/ephy-file-helpers.c: Avoid opening nautilus if downloads are done to Desktop. This re-fixes bug #383698. svn path=/trunk/; revision=7014
Diffstat (limited to 'lib/ephy-file-helpers.c')
-rw-r--r--lib/ephy-file-helpers.c24
1 files changed, 19 insertions, 5 deletions
diff --git a/lib/ephy-file-helpers.c b/lib/ephy-file-helpers.c
index 225a1af93..e34783d1f 100644
--- a/lib/ephy-file-helpers.c
+++ b/lib/ephy-file-helpers.c
@@ -1169,19 +1169,33 @@ gboolean
ephy_file_browse_to (const char *parameter,
guint32 user_time)
{
- GnomeVFSURI *uri, *parent_uri;
+ GnomeVFSURI *uri, *parent_uri, *desktop;
+ char *desktop_dir;
gboolean ret;
uri = gnome_vfs_uri_new (parameter);
parent_uri = gnome_vfs_uri_get_parent (uri);
- /* TODO find a way to make nautilus scroll to the actual file */
- ret = ephy_file_launch_handler ("x-directory/normal",
- gnome_vfs_uri_get_path (parent_uri),
- user_time);
+ desktop_dir = ephy_file_desktop_dir ();
+ desktop = gnome_vfs_uri_new (desktop_dir);
+ /* Don't do anything if destination is the desktop */
+ if (gnome_vfs_uri_equal (desktop, parent_uri))
+ {
+ ret = FALSE;
+ }
+ else
+ {
+ /* TODO find a way to make nautilus scroll to the actual file */
+ ret = ephy_file_launch_handler ("x-directory/normal",
+ gnome_vfs_uri_get_path (parent_uri),
+ user_time);
+ }
+
+ g_free (desktop_dir);
gnome_vfs_uri_unref (uri);
gnome_vfs_uri_unref (parent_uri);
+ gnome_vfs_uri_unref (desktop);
return ret;
}