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 778726 - Use gtk_show_uri_on_window()
Use gtk_show_uri_on_window()
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: .General
unspecified
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2017-02-16 00:30 UTC by Emmanuele Bassi (:ebassi)
Modified: 2017-02-16 15:44 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Use gtk_show_uri_on_window() in GtkLabel (1.13 KB, patch)
2017-02-16 00:30 UTC, Emmanuele Bassi (:ebassi)
none Details | Review
docs: Fix reference to non-existent gtk_show_uri_on_parent() (885 bytes, patch)
2017-02-16 03:55 UTC, Bastien Nocera
committed Details | Review
docs: Advise to use gtk_show_uri_on_window() (1.26 KB, patch)
2017-02-16 03:55 UTC, Bastien Nocera
none Details | Review
GtkAboutDialog: We use gtk_show_uri_on_window() by default (1.28 KB, patch)
2017-02-16 03:55 UTC, Bastien Nocera
committed Details | Review
GtkLinkButton: We use gtk_show_uri_on_window() by default (1.43 KB, patch)
2017-02-16 03:56 UTC, Bastien Nocera
committed Details | Review
gtk: Ignore gtk_show_uri() deprecation warnings (1.70 KB, patch)
2017-02-16 03:56 UTC, Bastien Nocera
committed Details | Review
GtkMountOperation: We use gtk_show_uri_on_window() by default (986 bytes, patch)
2017-02-16 03:56 UTC, Bastien Nocera
committed Details | Review
Use gtk_show_uri_on_window() in GtkLabel (1.94 KB, patch)
2017-02-16 03:56 UTC, Bastien Nocera
committed Details | Review
docs: Advise to use gtk_show_uri_on_window() (1.47 KB, patch)
2017-02-16 15:36 UTC, Bastien Nocera
committed Details | Review

Description Emmanuele Bassi (:ebassi) 2017-02-16 00:30:39 UTC
We use gtk_show_uri() in various places, and now that it has been deprecated it raises compiler warnings.

The use in GtkLabel is trivial, but GtkFileChooserWidget and GtkPrintOperation is a bit more complicated.
Comment 1 Emmanuele Bassi (:ebassi) 2017-02-16 00:30:43 UTC
Created attachment 345902 [details] [review]
Use gtk_show_uri_on_window() in GtkLabel

Avoid the deprecated gtk_show_uri(), and allow activating link in
sandboxed applications.
Comment 2 Bastien Nocera 2017-02-16 03:55:43 UTC
Created attachment 345912 [details] [review]
docs: Fix reference to non-existent gtk_show_uri_on_parent()

It's called gtk_show_uri_on_window().
Comment 3 Bastien Nocera 2017-02-16 03:55:49 UTC
Created attachment 345913 [details] [review]
docs: Advise to use gtk_show_uri_on_window()

Instead of gtk_show_uri() which is now deprecated.
Comment 4 Bastien Nocera 2017-02-16 03:55:55 UTC
Created attachment 345914 [details] [review]
GtkAboutDialog: We use gtk_show_uri_on_window() by default

Not gtk_show_uri().
Comment 5 Bastien Nocera 2017-02-16 03:56:01 UTC
Created attachment 345915 [details] [review]
GtkLinkButton: We use gtk_show_uri_on_window() by default

Not gtk_show_uri().
Comment 6 Bastien Nocera 2017-02-16 03:56:07 UTC
Created attachment 345916 [details] [review]
gtk: Ignore gtk_show_uri() deprecation warnings
Comment 7 Bastien Nocera 2017-02-16 03:56:13 UTC
Created attachment 345917 [details] [review]
GtkMountOperation: We use gtk_show_uri_on_window() by default

Not gtk_show_uri().
Comment 8 Bastien Nocera 2017-02-16 03:56:20 UTC
Created attachment 345918 [details] [review]
Use gtk_show_uri_on_window() in GtkLabel

Avoid the deprecated gtk_show_uri(), and allow activating link in
sandboxed applications.
Comment 9 Emmanuele Bassi (:ebassi) 2017-02-16 10:17:03 UTC
Review of attachment 345912 [details] [review]:

LGTM
Comment 10 Emmanuele Bassi (:ebassi) 2017-02-16 10:18:29 UTC
Review of attachment 345914 [details] [review]:

Okay
Comment 11 Emmanuele Bassi (:ebassi) 2017-02-16 10:18:45 UTC
Review of attachment 345915 [details] [review]:

Okay.
Comment 12 Emmanuele Bassi (:ebassi) 2017-02-16 10:19:58 UTC
Review of attachment 345916 [details] [review]:

Fair enough.

These widgets will likely be used by portals outside of the sandbox anyway, so it won't matter.
Comment 13 Emmanuele Bassi (:ebassi) 2017-02-16 10:20:14 UTC
Review of attachment 345917 [details] [review]:

Okay.
Comment 14 Emmanuele Bassi (:ebassi) 2017-02-16 10:21:51 UTC
Review of attachment 345913 [details] [review]:

Okay. I wonder if we should also mention that gtk_show_uri_on_window() is safe to use with regards to sandboxed applications, but I guess following the link to the function will be enough.
Comment 15 Emmanuele Bassi (:ebassi) 2017-02-16 10:22:08 UTC
Review of attachment 345918 [details] [review]:

Okay; thanks for updating my patch.
Comment 16 Bastien Nocera 2017-02-16 15:36:20 UTC
Created attachment 345952 [details] [review]
docs: Advise to use gtk_show_uri_on_window()

Instead of gtk_show_uri() which is now deprecated, and mention an
additional benefit of doing so.
Comment 17 Bastien Nocera 2017-02-16 15:40:58 UTC
Attachment 345912 [details] pushed as c495ffb - docs: Fix reference to non-existent gtk_show_uri_on_parent()
Attachment 345914 [details] pushed as f2febf7 - GtkAboutDialog: We use gtk_show_uri_on_window() by default
Attachment 345915 [details] pushed as da02919 - GtkLinkButton: We use gtk_show_uri_on_window() by default
Attachment 345916 [details] pushed as e4fbfde - gtk: Ignore gtk_show_uri() deprecation warnings
Attachment 345917 [details] pushed as 72ac208 - GtkMountOperation: We use gtk_show_uri_on_window() by default
Attachment 345918 [details] pushed as d93dd81 - Use gtk_show_uri_on_window() in GtkLabel
Attachment 345952 [details] pushed as eca3518 - docs: Advise to use gtk_show_uri_on_window()
Comment 18 Bastien Nocera 2017-02-16 15:44:38 UTC
Also pushed the 5 that applied to master/GTK+ 4.x (all but the docs).