Need some advice for GSettings

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/", line 282,
in __init__
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?



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