Re: How to determine the gnome environment



On Thu, Sep 26, 2002 at 05:30:00PM +0100, Alan Horkan wrote:
> On Fri, 27 Sep 2002, Malcolm Tredinnick wrote:
[...]
> > What you need to do is work out which libraries in the GNOME hierarchy
> > you rely on and test for those. As a general rule, testing if they have
> > libgnomeui-2.0 available should be sufficient (since that requires
> > libbonobo, libgnome, gtk+, atk, pango, ....).
> 
> This sounds far more like what to do at compile time and whether to build
> a gkt or gnome version.
> 
> I got the impression that he wanted to detect at run time if the user was
> using the Gnome Desktop and if not possibly make some effort to use a
> diffent look and feel so as to better blend in with the desktop.  (i would
> check the value of the .wm file but that is not a very rigourous check
> and i know not many systems systems dont even use a .wm file).

I have no idea what a .wm file is (but I don't seem to have one). But if
you are wanting to make runtime checks, then you need to check for the
specific libraries you want again, not punt on some auxiliary feature
implying that GNOME 2 is available instead of GNOME 1 (because that will
almost certainly lead to disaster on some systems). You would have to
try and dynamically load, say, libgnomeui-2. If that failed, try
libgnomeui (the GNOME 1 version) and then fallback even further if
necessary.

So the same logic applies as in my previous solution; it's just a bit
more fiddly.

> I am totally misinterperting the problem?

Who knows. It's certainly a different interpretation to the one I
considered and may also be valid.

Malcolm



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]