Yes, I'm aware that it is possible to do it without using a ChangeSet. But it should be possible to use ChangeSet as well.

As stated in the manual:
"In the future, GConf may also have optimizations so that changing a group of values with GConfChangeSet is faster than calling gconf_engine_set() for each value. In the future, GConfChangeSet may also represent an atomic transaction, where all or none of the values are set; however, for now the operation is not atomic."

And that sounds like a good thing :) (even though it's not implemented yet). And that's why I've chosen to use an ChangeSet for my project ( https://wiki.ubuntu.com/DesktopPanelLookAndFeel). It works good for all values, except lists. Might this be a bug in the gconf module? The code that I wrote, should it have worked?

Best Regards
Peter Moberg


On 6/13/06, Mystilleef <[EMAIL PROTECTED]> wrote:
This is how I set a list in GConf in my app. I don't see the need to
use ChangeSet.

v1 = "a"
v2 = "b"
import gconf
client = gconf.client_get_default()
client.set_list("/apps/test/qwerty", gconf.VALUE_STRING, [v1, v2])

Cheers

On 6/13/06, Peter Moberg <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I'm trying to use GConf ChangeSet to set a list in GConf.
>
> This is how I'm using it:
> import gconf
>
> client = gconf.client_get_default(
> )
> changeSet = gconf.
> ChangeSet()
>
> v1
>  = gconf.Value(gconf
> .VALUE_STRING)
> v2 =
>  gconf.Value(gconf.
> VALUE_STRING)
> v1.
> set_string("a")
>
> v2.set_string("b")
>
>
> changeSet.set_list(
> "/apps/test/qwerty", gconf.VALUE_STRING,
>  [v1,v2])
>
> client.
> commit_change_set(changeSet, True
> )
> This doesn't work. '/apps/test/qwerty' is not set, and no error is given.
> Does anyone know how to do this?
>
>
> Best Regards
> Peter Moberg
>
>
> _______________________________________________
> pygtk mailing list   [email protected]
> http://www.daa.com.au/mailman/listinfo/pygtk
> Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
>
>
>

_______________________________________________
pygtk mailing list   [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to