Store GtkRadioButtonGroup "value" in GSettings
- From: Geert Janssens <info kobaltwit be>
- To: GTK Devel List <gtk-app-devel-list gnome org>
- Subject: Store GtkRadioButtonGroup "value" in GSettings
- Date: Fri, 13 Sep 2013 23:36:01 +0200
I'm in the process of converting GnuCash from GConf to GSettings.
I found the g_settings_bind to be an invaluable convenience function to bind checkboxes,
spinbuttons and entries to gsettings values. This function has reduced a lot of our Gconf glue
code.
I am looking at doing something similar for our gtkradiobuttons, but I have some difficulties in
finding the most elegant way to go about it.
At present we have defined one gconf setting per radio group. So if we have three
radiobuttons "Foo","Bar" and "Baz" in one radio group called "FooGroup", there is one
associated Gconf setting named "FooGroup", which can have a value of "Foo","Bar" or "Baz".
Obviously, with this configuration I don't have one single object property to bind to so that
g_settings_bind can do its magic.
Searching for gsettings gtkradiobutton or variants doesn't turn up much information on this.
So how should this be set up ? Is it possible to keep one gsettings parameter to work for three
radio buttons ? Or should I go for 3 gsettings parameters to match on on one with the radio
buttons ?
The latter option will certainly make it more difficult to migrate settings from the old gconf
database to the new gsettings backend.
Geert
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]