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 518481 - URL shortcuts do not open query part
URL shortcuts do not open query part
Status: RESOLVED FIXED
Product: nautilus
Classification: Core
Component: [obsolete] GIO
2.26.x
Other All
: Normal normal
: 2.28.x
Assigned To: Nautilus Maintainers
Nautilus Maintainers
: 545494 548641 550083 575927 582769 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2008-02-24 21:02 UTC by Tomasz Sterna
Modified: 2009-05-15 13:56 UTC
See Also:
GNOME target: ---
GNOME version: 2.25/2.26


Attachments
[PATCH] Initial patch, modify nautilus_launch_application () to accept an (11.19 KB, patch)
2008-08-26 17:28 UTC, Cosimo Cecchi
needs-work Details | Review

Description Tomasz Sterna 2008-02-24 21:02:23 UTC
Please describe the problem:
If I have .desktop file shortcut to URL with query part, opening it does not open the query in Epiphany, only the mail portion of the URL.

Steps to reproduce:
1. Drag current page icon to the desktop.
2. Open the created icon.
3. Only the http://bugzilla.gnome.org/show_bug.cgi is opened in Epiphany.


Actual results:
http://bugzilla.gnome.org/show_bug.cgi is opened in Epiphany.

Expected results:
http://bugzilla.gnome.org/show_bug.cgi?id=x14x24x should be opened.

Does this happen every time?
Yes.

Other information:
Comment 1 Cosimo Cecchi 2008-02-25 20:41:59 UTC
Confirming, this is really strange, as the desktop file has the right link inside it.
Comment 2 Alexander Larsson 2008-03-06 14:35:16 UTC
It probably roundtrips through GFile at some place.
Comment 3 Christian Neumair 2008-04-01 11:56:31 UTC
> It probably roundtrips through GFile at some place.

Yes.

nautilus_mime_activate_files() is executed on the launcher URI (i.e. "file://.../foo.desktop"). It is detected as Nautilus link, with the activation URI "http://bugzilla.gnome.org/show_bug.cgi?id=x14x24x".

Next, we construct a GFile of the target URI to get the target file info. At this point, the query and fragment parts are discarded. The entire fm_directory_view_make_activation_parameters() handling will operate on the GFiles, and we will finally launch them without any query/fragment.

Finally, nautilus_launch_application() expects NautilusFiles, instead of URIs, and uses nautilus_file_get_activation_location(), which will return a GFile *.

For resolving this issue, we could migrate nautilus_launch_application() to char *-type URIs. I'll look into it... .
Comment 4 Cosimo Cecchi 2008-07-30 13:34:08 UTC
*** Bug 545494 has been marked as a duplicate of this bug. ***
Comment 5 Cosimo Cecchi 2008-08-20 23:09:19 UTC
*** Bug 548641 has been marked as a duplicate of this bug. ***
Comment 6 Cosimo Cecchi 2008-08-26 17:28:41 UTC
Created attachment 117416 [details] [review]
[PATCH] Initial patch, modify nautilus_launch_application () to accept an

optional separate list of activation URIs in addition to the
NautilusFiles and use it if present. Also, modify the surrounding code
to store the activation URIs list before roundtripping to GFile.
---
 libnautilus-private/nautilus-autorun.c          |    1 +
 libnautilus-private/nautilus-mime-actions.c     |   77 +++++++++++++++++------
 libnautilus-private/nautilus-program-choosing.c |   12 +++-
 libnautilus-private/nautilus-program-choosing.h |    1 +
 src/file-manager/fm-directory-view.c            |    3 +-
 src/nautilus-information-panel.c                |    2 +-
 6 files changed, 72 insertions(+), 24 deletions(-)
Comment 7 Sebastien Bacher 2008-09-10 07:32:32 UTC
could that change be reviewed?
Comment 8 Alexander Larsson 2008-10-28 14:30:59 UTC
Seems a bit roundabout way of avoiding the fact that activation uri is stored as a GFile. Since having activation uri != NULL is kinda uncommon anyway, why not just store it as a uri.
Comment 9 DavidCognito 2008-12-12 18:19:07 UTC
Any progress on this one, please?  It would be a lovely Christmas present to know I can at last reliably open URL shortcuts! ;)
Comment 10 Cosimo Cecchi 2009-03-19 15:17:29 UTC
*** Bug 575927 has been marked as a duplicate of this bug. ***
Comment 11 Alexander Larsson 2009-04-01 10:22:32 UTC
2009-04-01  Alexander Larsson  <alexl@redhat.com>

	Bug 518481 – URL shortcuts do not open query part

	* libnautilus-private/nautilus-file-private.h:
	* libnautilus-private/nautilus-file.[ch]:
	* libnautilus-private/nautilus-desktop-icon-file.c:
        (update_info_from_link):
	* libnautilus-private/nautilus-directory-async.c:
        (lacks_mount):
        (link_info_done):
	* libnautilus-private/nautilus-search-directory-file.c:
        (nautilus_search_directory_file_init):
	Store NautilusFile activation uri as char *uri, not
	GFile, as we sometimes handle links that are not true
	GFile locations such as mailto: links in desktop files.

	* libnautilus-private/nautilus-desktop-link.[ch]:
        Add nautilus_desktop_link_get_activation_uri

	* libnautilus-private/nautilus-directory.c:
        (nautilus_directory_notify_files_added_by_uri):
        (nautilus_directory_notify_files_changed_by_uri):
        (nautilus_directory_notify_files_removed_by_uri):
        (nautilus_directory_schedule_metadata_remove_by_uri):
	Use public nautilus_file_list_from_uris instead of local
	copy of it.

	* libnautilus-private/nautilus-mime-actions.c:
	Store both NautilusFile and char *uri in ApplicationLaunchParameters.
	This allows us to correctly handle uris that don't work well as
	GFiles and pass them unmodified to the launched applications.

	* libnautilus-private/nautilus-program-choosing.[ch]:
	Add nautilus_launch_application_by_uri() that launches an application
	by specifying the file as a uri, so that we can handle uris that
	don't work well as GFile/NautilusFiles.

Comment 12 Cosimo Cecchi 2009-05-13 10:46:31 UTC
*** Bug 550083 has been marked as a duplicate of this bug. ***
Comment 13 A. Walton 2009-05-15 13:56:07 UTC
*** Bug 582769 has been marked as a duplicate of this bug. ***