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 118746 - BROWSER variable is incorrectly handled
BROWSER variable is incorrectly handled
Status: VERIFIED FIXED
Product: Pan
Classification: Other
Component: general
pre-0.14.1 betas
Other Linux
: Normal normal
: 0.14.1
Assigned To: Charles Kerr
Pan QA Team
Depends on:
Blocks:
 
 
Reported: 2003-07-31 09:24 UTC by Frederic Crozat
Modified: 2006-06-18 05:03 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
BROWSER env variable handling fixes (1.64 KB, patch)
2003-07-31 09:26 UTC, Frederic Crozat
none Details | Review

Description Frederic Crozat 2003-07-31 09:24:37 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..)
Comment 1 Frederic Crozat 2003-07-31 09:26:47 UTC
Created attachment 18781 [details] [review]
BROWSER env variable handling fixes
Comment 2 Dave Bordoley [Not Reading Bug Mail] 2003-07-31 12:55:35 UTC
Is pan a gnome app? If so why not use gnome_url_show ?
Comment 3 Frederic Crozat 2003-07-31 13:42:54 UTC
No, it is a pure GTK2 app.
Comment 4 Dave Bordoley [Not Reading Bug Mail] 2003-07-31 14:49:11 UTC
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.
Comment 5 Charles Kerr 2003-07-31 15:22:17 UTC
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.
Comment 6 Charles Kerr 2003-07-31 16:08:00 UTC
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. :)
Comment 7 Frederic Crozat 2003-07-31 16:17:11 UTC
I've reviewed your patch : they seems ok..

And I've also learn about BROWSER that could be a list.. :)

Thanks again.