[Bf-committers] url handlers / help-system / *nix
Thu, 6 May 2004 01:16:45 +0300
I've been thinking and looking into adding documentation links from the
help menu. A very simple project which I should be able to do :-)
All it has to do is launch the default browser at either an online URL, or a
html file on the system.
As far as I have done so far, it is very easy on windows (two/three lines (besides
the blender events/menu code)).
Unfortunatly, other OSes (*NIX) don't have an official standard way of knowing
what the default browser is.
seems like a Good Solution, using a $BROWSER environment variable and then
needs only 3 lines again. I do not know how many distros/systems support this by default
I have also found a way of finding out the gnome http URL handler using gconf. The
code to do this though is quite ugly and large (20+ lines). I could also write some
semi-smart code which goes searching in common places for common browsers, and call
them... but this is also very in-elegant.
I could also add a user-pref for which browser, but this seems far far over the top,
ugly, and silly. I really dislike this though.
So, should I just do the $BROWSER one (my prefered) and if $BROWSER isn't set
pop up a message saying "please set your $BROWSER variable for Help to work...",
or should I write loads of ugly hacky code to try and find clever defaults to use
if $BROWSER isn't set?
Sorry if this seems trivial...