Re: Gconf without Gnome



Paul Coates <Paul Coates ncl ac uk> writes:
> I've got a child process that needs to access gconf for preferences. It
> runs as a server in the background and does not need Gnome or GTK.
> Documentation at
> 
> http://developer.gnome.org/feature/archive/gconf/gconf.html
> 
> states it can be used in this way but I can't find an example that does
> not do a gtk_init or gnome_init at some point. Could someone please
> point me at an example. Is this what GConfEngine is for instead of
> GConfClient?

There's nothing special to use gconf without gnome. Just call
gconf_client_get_default() and start using the client, it should work
fine. GConfClient in GConf 1 requires GTK, but GConfClient in GConf 2
does not. Even in GConf 1 you don't need to call gtk_init() or connect
to the X server, you only need to call gtk_type_init().

> I also plan for the parent to handle notify callbacks from Gconf for the
> preferences, then send messages to any child processes it has so they
> can grab the updated preferences. I'm trying to keep the size of the
> child processes down by not including gnome/gtk since I don't need them
> so does this seem OK.

Sure that will work fine. You could also just have the child processes
listen to gconf directly, gconf is process-transparent after all for
exactly this reason.

Havoc



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