gvdb just dropped the ability to have a separate "options" field. We
now store the options into a GVariant along with the default value.
For now, we use a small shim in GSettingsSchema in order not to touch
too much code. A more complete rewrite will follow.
This represents a change to the schema file format with another likely
to follow. glib-compile-schemas needs to be re-run after installing
this change.
Add GObject introspection annotations so that the length parameter is
correctly detected for g_variant_new_strv(), g_variant_get_strv() and
g_variant_dup_strv(). Also specify that it can be a NULL pointer in
g_variant_get_strv() and g_variant_dup_strv().
For g_settings_set_strv(), detect that a NULL value is allowed, meaning
empty array.
Closes bug #620384.
Signed-off-by: Ryan Lortie <desrt@desrt.ca>
Length of the array is redundant since it's NULL-terminated. This is not
consistent with many GLib and GTK+ functions, and adds complexity with
no real gain, while these convenience functions should be kept simple.
Closes bug #620312
- hold a lock while accessing the tree of delayed values
- use weak reference counts with the owner object to avoid doing
g_object_notify on a dead object
- dispatch the "has-unapplied" notify to the proper main context
This commit fixes up a few race conditions in the GSettingsBackend, mostly with
respect to change notifications occuring at the same time as the last reference
count on a GSettings is dropped. With GDBus feeding us our incoming signals in
a separate thread, this is something that could easily happen.