Re: GConf group of changes



Simon Bates <simon bates utoronto ca> writes: 
> I was wondering if you could tell me if we are thinking of using GConf
> in the correct way? I have tried using a change set but many
> notifications still result. Could you tell me please if there is
> currently any way to communicate to GConf that a group of changes
> should only result in one notification?
> 

In the future, if you use a ChangeSet then it will be atomic (you'll
still have five notifies, but when you get the first one, all five
values will already have the new values, so you can gconf_client_get()

Things should already mostly appear this way though, I believe the
following occurs:

 set key 1 --->  gconfd notifies us ---> GConfClient caches new value
 set key 2 --->        "            --->           "     
 set key 3 --->        "            --->           "     
 set key 4 --->        "            --->           "     
 set key 5 --->        "            --->           "     
 enter main loop ---> idle handlers run, sending 5 notifies to app

So when you get your notifies you would be able to get the latest
values for all 5 with gconf_client_get(), because the new value
was cached during the _set() call, but you didn't get the notifies
until after all the _set() calls.

FWIW this isn't an issue for most of GNOME 2 because the dialogs are
instant-apply instead of having an OK button.

Havoc




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