Re: [pygtk] Equivalent of "GConf.client set_list" in GTK+ ?

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

 



I tried mixing the two bindings; they don't succeed.

I just wonder why the bug of csuch criticality is not being acted upon, https://bugzilla.gnome.org/show_bug.cgi?id=681433



On Tue, Oct 16, 2012 at 3:51 PM, Ajay Garg <ajaygargnsit@xxxxxxxxx> wrote:
Thanks for the info Simon.

Would mixing up static ("old-way") and dynamic ("new-way") bindings be ok (I only intend to use the "old-way" bindings to get the "set_list" thing working).



On Tue, Oct 16, 2012 at 3:13 PM, Simon Feltman <s.feltman@xxxxxxxxx> wrote:
It looks like the set_list method is not being included with the
introspection bindings for gconf. Both in regards to
GConf.Client.set_list and GConf.Value.set_list and therefor it does
not look like you can work around it by constructing a Value list
manually and using that with "Client.set". I found this bug in
bugzilla: https://bugzilla.gnome.org/show_bug.cgi?id=681433

-Simon

On Tue, Oct 16, 2012 at 1:00 AM, Ajay Garg <ajaygargnsit@xxxxxxxxx> wrote:
> 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@xxxxxxxxx> 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@xxxxxxxxx> 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@xxxxxxxxxx
>> > http://www.daa.com.au/mailman/listinfo/pygtk
>> > Read the PyGTK FAQ: http://faq.pygtk.org/
>
>
>
>
> Regards,
> Ajay
>



Regards,
Ajay




Regards,
Ajay

_______________________________________________
gnome-list mailing list
gnome-list@xxxxxxxxx
https://mail.gnome.org/mailman/listinfo/gnome-list

[Index of Archives]     [Fedora Desktop]     [Trinity Users]     [KDE]     [Gimp]     [Yosemite News]

  Powered by Linux