Re: gnome games without gnome (osx, win32)



On Wed, 2007-02-07 at 19:18 +0100, Robert Staudinger wrote:
> Most #ifdef-s are surrounding gconf calls. When getting serious about
> a non-gnome version it might be an idea writing a simple gconf
> abstraction, possibly in the egg namespace.
> Something like
> egg_conf_get_client_default()
> egg_conf_client_get_string()
> egg_conf_client_set_string()
> ...
> that wraps gconf or, if not available, manipulates a DOM tree holding
> the settings.
> Maybe something like that already exists?

The appropriate response to for a missing gconf is for the app to fall
back to some internal default since, the mere availability of gconf
isn't enough to guarantee reliable answers form it. We already have some
wrapper code for gconf that is used a little in gnome-games and could
probably be expanded. Ross Burton wrote it a while back - it is in the
libgames-support directory.

A simpler idea would be to write a simple header replacement for gconf.h
which replaced the functions with no-ops and returned dud data for those
that do return a value. At one stage all of gnome-games could handle a
failed gconf system so it should work even if a few bugs have crept back
in.

That way the #ifdefs could be reduced to:

#if HAVE_GNOME
#include <gconf/gconf.h>
#else
#include <null-gconf.h>
#endif

 - Callum





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