Most _list_schemas() uses were to check for the availability
of a particular schema. g_settings_schema_source_lookup() is
a better way to do this.
https://bugzilla.gnome.org/show_bug.cgi?id=712315
Add g_settings_schema_has_key() and _get_range(), _range_check(),
_get_value_type(), _get_default_value() methods on GSettingsSchemaKey.
Deprecate the equivalent APIs on GSettings.
https://bugzilla.gnome.org/show_bug.cgi?id=683017
Prevent a crash in the case that gvdb_table_list() returns NULL (ie:
because a schema has no keys).
Stop a memory leak caused by pointlessly stealing keys from a hashtable
(after we quarked them already).
Stop allocating an extra entry at the end of an array for a terminator
(that we never wrote anyway) when all functions using this API refer to
the out-parameter length array.
https://bugzilla.gnome.org/show_bug.cgi?id=711016
Support the 'extends' attribute that has been supported by the compiler
for a long time by doing three things:
- when creating a schema that extends another schema, lookup that other
schema
- when looking up keys and we can't find them in the schema, check
(recursively) in the 'extends' schema
- when listing all keys in a schema, also visit the extends schemas,
but take care to avoid duplicates caused by overrides
Extend the testsuite to verify that it works.
https://bugzilla.gnome.org/show_bug.cgi?id=645453
g_settings_list_schemas() and g_settings_list_relocatable_schemas() are
now deprecated.
This will allow listing off schemas on non-default sources and is a
better fit with the new direction the API is going.
https://bugzilla.gnome.org/show_bug.cgi?id=680838
Add an API to read the summary and description from the .xml schema
files.
This will be used by dconf-editor and gnome-tweak-tool.
This API is a bit heavy -- it parses the XML and builds a table. It
also loads gettext domains for translation. It only does these things
if it is used, however, so it will not impact normal applications.
We store the summary/description in a pair of hash tables on the schema
source (which we have a backref to as of a few commits ago). We can't
use a global table because people might want to request summary and
description from non-default sources. We don't want to use per-schema
tables because we'd have to reparse the directory every time (since we
cannot guess which file a schema may have been in).
https://bugzilla.gnome.org/show_bug.cgi?id=668232
Take this private API and make it public along with a boxed type and
ref/unref functions.
Future commits will add accessors with new functionality and some that
allow us to deprecate functions on GSettings itself (such as
g_settings_get_range).
https://bugzilla.gnome.org/show_bug.cgi?id=668232
The way we created the global schema list predates
g_settings_schema_source_new_from_directory() and therefore doesn't use
it.
Update it to use that function, removing some code.
https://bugzilla.gnome.org/show_bug.cgi?id=668232
Don't return children with invalid schemas from
g_settings_list_children() (ie: missing schemas or mismatched paths).
This prevents gsettings list-recursively from crashing when broken
schemas are installed on the system.
https://bugzilla.gnome.org/show_bug.cgi?id=705688
We don't use # or other forms of links in the section headings.
We also capitalize them and don't put a final period.
This commit corrects several headings to follow these rules.
Back in the far-off twentieth century, it was normal on unix
workstations for U+0060 GRAVE ACCENT to be drawn as "‛" and for U+0027
APOSTROPHE to be drawn as "’". This led to the convention of using
them as poor-man's ‛smart quotes’ in ASCII-only text.
However, "'" is now universally drawn as a vertical line, and "`" at a
45-degree angle, making them an `odd couple' when used together.
Unfortunately, there are lots of very old strings in glib, and also
lots of new strings in which people have kept up the old tradition,
perhaps entirely unaware that it used to not look stupid.
Fix this by just using 'dumb quotes' everywhere.
https://bugzilla.gnome.org/show_bug.cgi?id=700746
Prevent attempts to access keys ending with slashes that exist in the
schema file as references to child schemas.
Also: don't emit change signals for these same keys.
glib-compile-schemas used to generate these. They're harmless and they
mean that no schemas are installed in a particular directory, so just
ignore them.
https://bugzilla.gnome.org/show_bug.cgi?id=656301
Any method that has its prefix'd argument as its first parameter will be
interpreted by introspection as a method. We don't want this, so we need
to swap the first two parameters.
Instead of building a reversed linked list by prepending in order and
then reversing it at the end, prepend in reverse by iterating backwards
through the directories (to get a list in-order when we're done).
These functions no longer have anything to do with GSettings itself, so
they should not be in that file anymore.
GSettings still wants direct access to the GSettingsSchemaKey structure,
so put that one in gsettingsschema-internal.h.
This reverts commit c841c2ce3f.
This approach has been an unmitigated disaster. We're getting all sorts
of crashes due to functions that are returning NULL because they can't
find the schema for the default value. The people who get these crashes
are then confused about the root cause of the problem and waste a lot of
time trying to figure it out.
Until we find a better solution, we should go back to what we had
before.
https://bugzilla.gnome.org/show_bug.cgi?id=655366
GVDB deals with empty lists by returning NULL for the list instead of a
zero-length (non-NULL) strv. We can work around that in GSettingsSchema
by checking for the NULL case and treating it like a zero-length list.
https://bugzilla.gnome.org/show_bug.cgi?id=660147