Re: Duplication of GConfEngine code?



On Wed, Apr 09, 2003 at 02:41:44PM +1000, Jeff Franks wrote:
> 
> I was looking throught the GConf source code and was wondering does this:
> 
> gconf_engine_commit_change_set(gconf_engine_get_default(),  cs, 
> remove_committed, &error);
> 
> do the same thing as this:
> 
> gconf_client_commit_change_set(client, cs, remove_committed, &error);
> 
> given that gconf_engine_get_default() is the GConfEngine GConfClient 
> uses anyway. The only difference seems the be calls to trace(), 
> PUSH_USE_ENGINE() and POP_USE_ENGINE() in gconf_client_set(). Couldn't 
> the coding be minimized by having gconf_client_commit_change_set() call 
> gconf_engine_commit_change_set();
> 

GConfClient is basically a GConfEngine wrapper that also maintains a
cache. You have to go via the GConfClient so that the cache is kept
coherent. 

There's really no reason to use GConfEngine directly, in retrospect it
should not be public API.

Havoc



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