Need some advice for GSettings
- From: Robert Park <rbpark exolucere ca>
- To: python-hackers-list gnome org
- Subject: Need some advice for GSettings
- Date: Mon, 14 May 2012 03:11:15 -0500
Hi hackers,
So I'm just getting started with porting my app from GConf to GSettings.
The first thing I did was bind some float/integer properties to
gsetting keys, and I'm impressed as hell. It's nothing short of
magical how easy it was to persist those properties, and watch them
update in real time.
The second thing I did was try to bind a GtkColorSelection's
current-color property to gsettings, and it's a total trainwreck. I've
scoured the documentation and there doesn't seem to be a way to
specify in the schema that you want to store a GdkColor. So then I was
thinking I would need to use bind_with_mapping to convert the GdkColor
into a list of ints that GSettings could store, except that
bind_with_mapping doesnt seem to exist.
Traceback (most recent call last):
File "/home/robru/Applications/gottengeography/gg/app.py", line 282,
in __init__
self.gsettings.bind_with_mapping('current-color',
self.colorpicker, 'current-color', Gio.SettingsBindFlags.DEFAULT,
ints_to_gvariant, gvariant_to_ints)
AttributeError: 'Settings' object has no attribute 'bind_with_mapping'
How am I supposed to proceed here?
Thanks.
--
http://exolucere.ca
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]