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 791287 - handle geo URI
handle geo URI
Status: RESOLVED FIXED
Product: evince
Classification: Core
Component: general
3.18.x
Other Linux
: Normal enhancement
: ---
Assigned To: Evince Maintainers
Evince Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-12-05 23:08 UTC by abonnements
Modified: 2017-12-08 12:06 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
shell: better handle external links (1.59 KB, patch)
2017-12-07 02:37 UTC, José Aliste
committed Details | Review
shell: Free app launch context (794 bytes, patch)
2017-12-07 11:44 UTC, José Aliste
committed Details | Review
test file with geo URI (13.29 KB, application/pdf)
2017-12-07 22:12 UTC, abonnements
  Details

Description abonnements 2017-12-05 23:08:46 UTC
Should open the gnome maps app to handle geo URI, instead shows error because geo URI is interpreted as local file path

https://en.wikipedia.org/wiki/Geo_URI_scheme
Comment 1 José Aliste 2017-12-06 20:26:10 UTC
Do you have an example pdf file? This should be fairly simple to fix. In the code, we are either checking for a :// in the URL or mailto: Instead we should be using g_app_info_get_default_for_uri_scheme and get the uri scheme from the URI, and then act accordingly.
Comment 2 José Aliste 2017-12-07 02:37:33 UTC
Created attachment 365175 [details] [review]
shell: better handle external links

Currently we only handle uris with :// and mailto: uris.
Handle all uris that g_app_info actually can handle.
Comment 3 José Aliste 2017-12-07 02:38:26 UTC
@Carlos this should fix this, but I wonder, is the mailto: only verification a safety measure???
Comment 4 Carlos Garcia Campos 2017-12-07 08:44:01 UTC
(In reply to José Aliste from comment #3)
> @Carlos this should fix this, but I wonder, is the mailto: only verification
> a safety measure???

No idea :-P
Comment 5 José Aliste 2017-12-07 11:44:17 UTC
Created attachment 365188 [details] [review]
shell: Free app launch context

According to the documentation, we have to free
the context after use with g_object_unref.
Comment 6 José Aliste 2017-12-07 19:39:00 UTC
Review of attachment 365175 [details] [review]:

pushed to master
Comment 7 José Aliste 2017-12-07 19:39:01 UTC
Review of attachment 365175 [details] [review]:

pushed to master
Comment 8 José Aliste 2017-12-07 19:39:53 UTC
Review of attachment 365188 [details] [review]:

I also pushed this fix for an old FIXME. according to docs we have to unref the launch context after using it.
Comment 9 José Aliste 2017-12-07 19:40:15 UTC
This problem has been fixed in the unstable development version. The fix will be available in the next major software release. You may need to upgrade your Linux distribution to obtain that newer version.
Comment 10 abonnements 2017-12-07 22:12:31 UTC
Created attachment 365215 [details]
test file with geo URI

test file with geo URI (made with LaTeX/TeXStudio)
Comment 11 abonnements 2017-12-08 12:06:28 UTC
(In reply to José Aliste from comment #9)
> This problem has been fixed in the unstable development version. The fix
> will be available in the next major software release. You may need to
> upgrade your Linux distribution to obtain that newer version.

Thanks for this disclaimer. For a LinuxMint user this prbably will take years to arrive in my distribution, or is there another way to try it out? I searched evince dev ppa, gnome dev ppa but could not find a lead.