diff options
author | Guy Harris <guy@alum.mit.edu> | 2013-07-15 19:26:21 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2013-07-15 19:26:21 +0000 |
commit | b71a5aa351bba605769ea14e43dd97249b9904cb (patch) | |
tree | bb79cf8b8128b6a0b4b5165847b032af1fc127ef /ui/gtk/webbrowser.c | |
parent | 49b642ab1ce85909e92010601a7bcdadfcfb1a48 (diff) |
Expand the big comment about launching browsers.
svn path=/trunk/; revision=50635
Diffstat (limited to 'ui/gtk/webbrowser.c')
-rw-r--r-- | ui/gtk/webbrowser.c | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/ui/gtk/webbrowser.c b/ui/gtk/webbrowser.c index 4d9ec45923..5696865e9b 100644 --- a/ui/gtk/webbrowser.c +++ b/ui/gtk/webbrowser.c @@ -44,6 +44,45 @@ * to the "first window is in the foreground, subsequent windows are in * the background" behavior in non-GNOME/KDE/XFCE environments. * + * What Qt's "generic UNIX" openURL does is: + * + * if it's a mailto: URL, use the "document lanuncher" if + * known, otherwise, use the results of detectWebBrowser + * as the "document launcher", and use that; + * + * otherwise, use the "Web browser" if known, otherwise, use + * the results of detectWebBrowser as the "document launcher", + * and use that. + * + * detectWebBrowser: + * + * looks for xdg-open and, if it finds it, uses that; + * + * otherwise, if the DEFAULT_BROWSER or BROWSER environment + * variable is set, use the first of those that's set (in + * that order) and, if that's an executable, uses that; + * + * otherwise, if the desktop environment is detected to be + * KDE, uses kfmclient; + * + * otherwise, if the desktop environment is detected to + * be GNOME, uses gnome-open; + * + * otherwise, tries, in order, google-chrome, firefox, + * mozilla, and opera. + * + * (Its Windows openURL uses ShellExecute() on non-mailto URLs (it + * does more exotic stuff for mailto: URLs). + * + * Its OS X stuff uses the openURL method of an NSWorkspace (which + * probably ends up in Launch Services....).) + * + * GTK+ has gtk_show_uri(), but that ultimately uses gvfs on UN*X, + * so it's not appropriate for non-GNOME UN*Xes (including, but not + * limited to, OS X), and ultimately appears to be a stubbed-out + * routine in GLib 2.36.0, so it's not very useful for a cross- + * platform applicatio n. + * * Perhaps the right strategy is to: * * Check whether we're in a GNOME/KDE/XFCE session and, if |