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 579838 - url opened twice in the gtk about dialogs
url opened twice in the gtk about dialogs
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: Other
2.16.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2009-04-22 14:32 UTC by Sebastien Bacher
Modified: 2009-04-22 16:17 UTC
See Also:
GNOME target: ---
GNOME version: 2.25/2.26


Attachments
drop obsolete click handler (activate_url) in gtkaboutdialog (1.62 KB, patch)
2009-04-22 16:06 UTC, Johan Euphrosine
none Details | Review

Description Sebastien Bacher 2009-04-22 14:32:48 UTC
The bug has been described on https://bugs.launchpad.net/bugs/334378

The clickable URL in about dialogs are opening 2 webbrowser when used in most of GNOME softwares (gedit, totem, etc)

The reason is that gtk seems to install a default handler when gtk_about_dialog_set_url_hook() is used and those applications also set a callback calling gtk_show_uri(), the behaviour changed in the GNOME 2.26 cycle since that used to work correctly before

gtk-demo which uses gtk_about_dialog_set_url_hook() but only does a print in the callback dialog get one dialog opened only, not sure if that's the expected behaviour either since the callback doesn't call gtk_show_uri() there
Comment 1 Matthias Clasen 2009-04-22 15:03:05 UTC
Ah, this problem is with the website button. GtkAboutDialog uses a link button for this, but still connects to clicked and handles it itself. So this was a latent bug that just came to the light because we now have a default hook for link buttons.

Easy fix is just to drop the clicked handler in GtkAboutDialog.
Comment 2 Johan Euphrosine 2009-04-22 16:06:47 UTC
Created attachment 133122 [details] [review]
drop obsolete click handler (activate_url) in gtkaboutdialog

Dropping the clicked handler (activate_url) in GtkAboutDialog as suggested.
I tested with gedit that it fixed the "double open" issue, let me know if it needs more love.
Comment 3 Matthias Clasen 2009-04-22 16:07:16 UTC
Fixe pushed to gtk-2-16. Will merge to master in a bit.
Comment 4 Cody Russell 2009-04-22 16:11:21 UTC
Won't this render gtk_about_dialog_set_url_hook() useless?  It seems like to cover all bases that function should be deprecated, and maybe have a function that returns the GtkLinkButton so you can set your own link handler for that.
Comment 5 Matthias Clasen 2009-04-22 16:17:24 UTC
the url hook is also used for links in the text in the secondary dialog, so not entirely useless. But certainly, I'd expect most apps should be fine with the default handlers.