Re: is a value writeable?



>Delivered-To: gconf-list@gnome.org
>To: Colm Smyth <Colm.Smyth@ireland.sun.com>
>Cc: gconf-list@gnome.org
>Subject: Re: is a value writeable? 
>From: Dan Winship <danw@helixcode.com>
>X-BeenThere: gconf-list@gnome.org
>X-Loop: gconf-list@gnome.org
>X-Mailman-Version: 2.0beta5
>List-Id: Discussion of the GConf library <gconf-list.gnome.org>
>
>> Let's say that you have the following database path:
>> 
>> xml:readonly:/shared/gnome/gconf/workgroup_defaults
>> xml::/home/colm/.gconf
>> 
>> If workgroup_defaults contains a key /gnome/desktop/backdrop, then
>> if a user application does
>> 
>> 	gconf_set_string("/gnome/desktop/backdrop", 
>> "/home/colm/coolpic.gif")
>> 	
>> the update will fail with GCONF_ERROR_OVERRIDDEN
>
>That seems broken to me. I would expect that if you called that
>function in that situation, that it would set the value of
>/gnome/desktop/backdrop in /home/colm/.gconf.
>
>If that's not the way that it works, then every single call to
>gconf_set_* in every program is going to need jump through hoops to
>deal with this possibility.

That's right.

When I first noticied the GCONF_ERROR_OVERRIDDEN error, it occurred to
me that GConf could go ahead and write the value into the first available
writeable database, but return GCONF_ERROR_OVERRIDDEN as a warning to
indicate that the value will not be retrieved. Another possibility
would be to have a 'force' option, which achieves this effect. This
does not remove the need to check readonly databases to see if they
have the key set.

Since an administrator may at any time alter the database list to include
an additional readonly database, the ability to set a key in a 
writeable database is no guarantee that the value will always be
retrieved from the same database. Conversely, the administrator might
remove keys from a readonly database, which would expose keys in a
writeable database after it in the database list. This demonstrates
that being able to read a value from a specific database is potentially
temporary.

Colm.

>-- Dan
>
>_______________________________________________
>Gconf-list mailing list
>Gconf-list@gnome.org
>http://mail.gnome.org/mailman/listinfo/gconf-list

--
Colm Smyth - Sun Microsystems, Ireland - Desktop S/W Engineering
Sun Xtn: 19166    Phone: 353-1-819-9166   Fax: 353-1-819-9200






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