[pygtk] Equivalent of "GConf.client set_list" in GTK+ ?
Ajay Garg
ajaygargnsit at gmail.com
Tue Oct 16 16:00:52 WST 2012
Hi Simon.
Following is the program, where I have put code-snippets for the "new-way",
and "old-way" to persist a list-type.
#################################################################################################
# NEW-WAY
from gi.repository import GConf
client = GConf.Client.get_default()
new_value = ['one', 'two', 'three']
client.set_list('/random/strings', GConf.ValueType.STRING, new_value)
"""
# OLD-WAY
import gconf
client = gconf.client_get_default()
new_value = ['four', 'five', 'six']
client.set_list('/random/strings', gconf.VALUE_STRING, new_value)
"""
#################################################################################################
Running the "new-way" code, gives the following exception ::
************************************************************************************************
Traceback (most recent call last):
File "kk.py", line 6, in <module>
client.set_list('/random/strings', GConf.ValueType.STRING, new_value)
************************************************************************************************
whereas the "old-way" code snippet runs fine, and persists the list fine.
Please let me know if any other info is required.
On Tue, Oct 16, 2012 at 1:14 PM, Simon Feltman <s.feltman at gmail.com> wrote:
> Hi Ajay,
> Please post a pared down example of code illustrating the problem.
> Preferably something small enough we can copy and paste into a python
> console. If it is an obvious bug or limitation which is easily
> reproduced, feel free to file a bug report here:
> https://bugzilla.gnome.org under Bindings/pygobject
>
> -Simon
>
> On Mon, Oct 15, 2012 at 3:45 AM, Ajay Garg <ajaygargnsit at gmail.com> wrote:
> > Hi all.
> >
> > I have been porting some code, from gconf to gi.repository.GConf; there
> I am
> > able to "set" values of all types, except of the type
> > "GConf.ValueType.LIST".
> >
> > I will be grateful if someone could let me know how to do this :) I am
> going
> > a little impatient over this.
> >
> >
> > -
> > Regards,
> > Ajay
> >
> >
> > _______________________________________________
> > pygtk mailing list pygtk at daa.com.au
> > http://www.daa.com.au/mailman/listinfo/pygtk
> > Read the PyGTK FAQ: http://faq.pygtk.org/
>
Regards,
Ajay
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.daa.com.au/pipermail/pygtk/attachments/20121016/f10777e7/attachment.html>
More information about the pygtk
mailing list