GNOME Bugzilla – Bug 118746
BROWSER variable is incorrectly handled
Last modified: 2006-06-18 05:03:29 UTC
Currently, pan assumes that BROWSER environment variable contains "%s" string, which is not the case on Mandrake system (and I'm not sure it is even the case on other distros). The attached patch always add "%s" when it uses $BROWSER (it is not optimal, maybe we should test if it is there and add it if it is not). It also replace a getenv call with g_getenv and ensure cmd variable is used in pan_url_show (I think this one is a real mistake..)
Created attachment 18781 [details] [review] BROWSER env variable handling fixes
Is pan a gnome app? If so why not use gnome_url_show ?
No, it is a pure GTK2 app.
the other option if you want to use the gnome default browser is to detect if gnome-session is running and fork a gnome-open process on the url. gaim has some code for this.
bordoley: I'm planning add Gnome checks to configure, and build against Gnome on platforms that have it, sometime during the Pan 0.14.x series. At that point gnome_url_show() will be the way to go.
Frederic: I went ahead with your suggestion to test for "%s" in each piece of the browser variable, so the result should be better. http://cvs.gnome.org/bonsai/cvsview2.cgi?diff_mode=context&whitespace_mode=show&subdir=pan/pan&command=DIFF_FRAMESET&file=util.c&rev1=1.242&rev2=1.243&root=/cvs/gnome http://cvs.gnome.org/bonsai/cvsview2.cgi?diff_mode=context&whitespace_mode=show&subdir=pan/pan&command=DIFF_FRAMESET&file=prefs.c&rev1=1.350&rev2=1.351&root=/cvs/gnome Feel free to review the code; I could use the extra eyes. :)
I've reviewed your patch : they seems ok.. And I've also learn about BROWSER that could be a list.. :) Thanks again.