Proposal for GTK+ default URL handler for GtkAboutDialog
- From: milosz derezynski <internalerror gmail com>
- To: gtk-devel-list gnome org
- Subject: Proposal for GTK+ default URL handler for GtkAboutDialog
- Date: Thu, 29 Dec 2005 09:46:43 +0100
A default URL handler for GtkAboutDialog (or possibly elsewhere, but i'm currently unaware of where this might be used other than here) could be provided like e.g. the following:
1) GTK+2 would either ship, or at least expect (but not "hard" expect, that is not fail/crash if it's not present) a binary $PREFIX/bin/gtk2-open-url, which could be a binary or a shell script or anything a distributor/vendor might see fit for opening an URL. It would simply accept an URL as the first argument and then do whatever it is meant to do (
e.g. invoke Epiphany/Firefox/Mozilla/Konqueror etc), and for mailto: URNs, either check itself whether it's a http:// or mailto URN, leave this to the application, or provide command line options (--hyperlink, --mailto) as a hint from the invoking application (libgtk in that case).
2) GtkAboutDialog could be extended trough the function
gtk_about_dialog_set_use_default_url_handler (GtkAboutDialog *dialog, gboolean use_default);
which would make the about dialog use the default handler instead of any callbacks provided trough the GtkAboutDialog URL-handlers interface/api.
1) Using the default handler would make it neccessary for GTK+2 to check if this binary exists, is executable by the particular user, etc. These are all things that, IMO, GTK+2 shouldn't be meant to do.
2) The fact that the handler may be invalid, or in worst case, invoke something extremelty inappropriate and in the worst of all worst cases be something malicious.
1) On a given system, with a preinstalled GTK+2 and a browser by a given distributor, all applications would use the same mechanism to open URLs from the about dialog.
] [Thread Prev