After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 383698 - Finished download should not open target directory if that directory is Desktop
Finished download should not open target directory if that directory is Desktop
Status: RESOLVED FIXED
Product: epiphany
Classification: Core
Component: Downloads
2.17.x
Other All
: Normal minor
: 2.18.x
Assigned To: Diego Escalante Urrelo (not reading bugmail)
Marco Pesenti Gritti
: 418389 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2006-12-08 11:45 UTC by Jan Mynarik
Modified: 2007-05-30 11:23 UTC
See Also:
GNOME target: ---
GNOME version: 2.17/2.18


Attachments
Don't open nautilus windows for downloads that fall into the desktop (1.75 KB, patch)
2006-12-31 15:09 UTC, Diego Escalante Urrelo (not reading bugmail)
needs-work Details | Review
Updated (1.11 KB, patch)
2006-12-31 17:29 UTC, Diego Escalante Urrelo (not reading bugmail)
needs-work Details | Review
GnomeVFS magic. (1.19 KB, patch)
2007-01-09 00:07 UTC, Diego Escalante Urrelo (not reading bugmail)
committed Details | Review
This fixes the problem by moving the is-desktop check to ephy_file_browse_to (2.40 KB, patch)
2007-04-21 12:47 UTC, Diego Escalante Urrelo (not reading bugmail)
committed Details | Review

Description Jan Mynarik 2006-12-08 11:45:04 UTC
If you download files to your Desktop, there is no need to open Desktop again in a nautilus window. I can see the files right on desktop ;-)

Other information:
This bug has been opened after a suggestion in bug #138876, comment #38
Comment 1 Diego Escalante Urrelo (not reading bugmail) 2006-12-22 09:05:01 UTC
See bug #138876, relevant stuff is in src/popup-commands.c in save_property_url_completed_cb.

Should check if homedir is Desktop and compare the dest with the desktop path.

Don't know where to get that info.
Comment 2 Wouter Bolsterlee (uws) 2006-12-22 09:14:24 UTC
"homedir == Desktop" can be found in GConf, g_get_home_dir() + "/Desktop" can be used for the path checking (or is it configurable as well?)
Comment 3 Diego Escalante Urrelo (not reading bugmail) 2006-12-22 19:04:34 UTC
if (
    (homedir_is_desktop && dest == homedir) ||
    (homedir+Desktop == dest)
   )
   wiii;
Comment 4 Diego Escalante Urrelo (not reading bugmail) 2006-12-31 15:09:38 UTC
Created attachment 79097 [details] [review]
Don't open nautilus windows for downloads that fall into the desktop

Anyone got http://www.xenomai.org/index.php/Teaching_-p_to_svn_diff working? Couldn't make a -p diff :(.
Comment 5 Christian Persch 2006-12-31 16:42:59 UTC
+		desktop_is_home_dir = eel_gconf_get_boolean (CONF_OTHERS_DESKTOP_IS_HOME_DIR);
+
+		/* Which is the desktop */
+		if (desktop_is_home_dir)
+			desktop = g_get_home_dir();
+		else
+			desktop = g_build_path ("/", g_get_home_dir(), "Desktop", NULL);
+

You should use ephy_file_desktop_dir() here.
Comment 6 Diego Escalante Urrelo (not reading bugmail) 2006-12-31 17:29:00 UTC
Created attachment 79113 [details] [review]
Updated

:)
Comment 7 Christian Persch 2007-01-08 21:47:25 UTC
+		const char *dest, *desktop, *dest_parent;
[...]
+		desktop = ephy_file_desktop_dir ();

ephy_file_desktop_dir returns a new string which needs to be freed after use.

+		/* Where are we going to save */
+		uri = gnome_vfs_uri_new (dest);

Check for NULL uri here (at least with g_return_if_fail).

+		parent = gnome_vfs_uri_get_parent (uri);
+		dest_parent = gnome_vfs_uri_get_path (parent);

Can either of these calls return NULL? (e.g. if the URI is already "/" does get_parent return NULL?).

Maybe this should use gnome_vfs_uri_equal () of parent with a URI constructed from desktop_dir?
Comment 8 Diego Escalante Urrelo (not reading bugmail) 2007-01-09 00:07:46 UTC
Created attachment 79799 [details] [review]
GnomeVFS magic.

:)
Comment 9 Christian Persch 2007-01-10 12:45:54 UTC
Looks good, thanks!
Comment 10 Diego Escalante Urrelo (not reading bugmail) 2007-01-17 04:25:56 UTC
Trunk and 2-16?

(btw how do I decide that?)
Comment 11 Diego Escalante Urrelo (not reading bugmail) 2007-01-18 00:17:50 UTC
OK, committed to trunk!

2007-01-17  Diego Escalante Urrelo <diegoe@svn.gnome.org>

        * src/popup-commands.c:

        Avoid opening a nautilus window when downloads are finished if the
        downloaded file was saved to the desktop. Considers the
        desktop_is_homedir option of Nautilus. Bug #383698.
Comment 12 Jan Mynarik 2007-03-01 10:02:06 UTC
Download still opens nautilus windows for Desktop. Version 2.17.92. Tested on Ubuntu Feisty, package version 2.17.92-0ubuntu1, no Ubuntu patches seem to affect this behaviour.
Comment 13 Diego Escalante Urrelo (not reading bugmail) 2007-03-06 03:26:35 UTC
Same version here, but works fine here. Maybe you updated Epiphany but there's an old version still running?
Comment 14 Jan Mynarik 2007-03-06 09:22:55 UTC
Nope, that's not the problem. But I've found some nuances:
 - if I download something (e.g. JAR file) using 'Download link' from context menu (right-mouse-button), no nautilus window for Desktop is opened
 - If I just click on it, then select 'Download' from the dialog ('Save as' | 'Cancel' | 'Download'), it downloads and OPENS nautilus window for Desktop
Comment 15 Diego Escalante Urrelo (not reading bugmail) 2007-03-06 16:44:39 UTC
Can you provide some links Jan?. I seem unable to find a server that makes Ephy offer Download and Save as (at least a download of a small file).

As far as I remember, I have been pressing Download all the time and no nautilus windows has appeared.
Comment 16 Jan Mynarik 2007-03-06 16:54:40 UTC
The jar file I previously tried was on company's intranet but I can get the same behaviour with any jar file.

Search Google for: jar filetype:jar
The first was Azureus jar from sf.net, I clicked on it, dialog poped up, clicked Download and when it finished, nautilus windows for Desktop has opened.

Can't this be caused by some old settings in GConf etc. ?
Comment 17 Diego Escalante Urrelo (not reading bugmail) 2007-03-08 04:36:02 UTC
Hm, yes true.

Why is Download button different?
Comment 18 Christian Persch 2007-03-12 12:48:15 UTC
Comment on attachment 79799 [details] [review]
GnomeVFS magic.

Was this patch committed? If so, please set the patch status.
Comment 19 Diego Escalante Urrelo (not reading bugmail) 2007-03-12 19:10:13 UTC
It was.
Comment 20 Derwin McGeary 2007-03-28 00:45:15 UTC
I have noticed a sub-optimal behaviour that would seem related to this.  On Ubuntu Feisty, if I download something, when it finishes it opens my "downloads" folder, even if the "downloads" folder is already open, for instance from a previous download.  So I have two of the same folder open which isn't very elegant.

I haven't found it reported on b.g.o or launchpad, but I think it fits as a general case of this bug.
Comment 21 Diego Escalante Urrelo (not reading bugmail) 2007-04-03 14:17:30 UTC
Nautilus browser mode I guess? (everything in the same window)
Comment 22 Jan Mynarik 2007-04-03 14:23:53 UTC
Any progress of getting to know why "Download" button in dialog opens Desktop and direct "Download link" from context button doesn't?
Comment 23 Diego Escalante Urrelo (not reading bugmail) 2007-04-21 12:47:30 UTC
Created attachment 86737 [details] [review]
This fixes the problem by moving the is-desktop check to ephy_file_browse_to

I think I didn't forget anything...
Comment 24 Christian Persch 2007-04-21 14:42:12 UTC
Looks good, thanks!

Let's commit this to trunk first, and if there aren't any problems reported, later to 2-18.
Comment 25 Diego Escalante Urrelo (not reading bugmail) 2007-04-24 19:50:00 UTC
Committed to trunk.
Comment 26 Christian Persch 2007-05-03 22:16:35 UTC
Please commit to gnome-2-18 :)
Comment 27 Reinout van Schouwen 2007-05-17 21:59:39 UTC
Diego, is this one done?
Comment 28 Diego Escalante Urrelo (not reading bugmail) 2007-05-18 17:04:03 UTC
I obviously forgot to commit to 2-18 :D. Sorry!
Committed!.
Comment 29 Christian Persch 2007-05-30 11:23:35 UTC
*** Bug 418389 has been marked as a duplicate of this bug. ***