If you want to add your own properties, you should use the template
class Glib::Property<>, e.g. Glib::Property<bool>. (I
assume you want a boolean property, since you ask about
g_param_spec_boolean().) For example programs that use Glib::Property, see https://git.gnome.org/browse/gtkmm-documentation/tree/examples/others/cellrenderercustom/cellrenderertoggle.cc https://git.gnome.org/browse/glibmm/tree/tests/glibmm_interface_implementation/main.cc Glib::Property has some restrictions (see its documenation). Hopefully they will be somewhat relaxed in the future. See bug https://bugzilla.gnome.org/show_bug.cgi?id=731484 I don't know if there is a way to connect a property and a setting in such a way that a change in one is automatically transferred to the other. If it can't be done automatically, you can connect callback routines which are called when something is changed. myproperty.get_proxy()->signal_changed().connect(......); mysetting->signal_changed().connect(........); Do you really need a property that stores the same value as a Gio::Settings? Why not use only the setting? (You don't have to reply here.) Kjell Den 2014-07-23 00:05, Christoph Brill
skrev:
|