mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-09 20:35:49 +01:00
GSettingsSchema: fix g_settings_schema_has_key()
A settings schema that extends another schema should return TRUE for all keys that are present in the extended schema. The list of keys returned by list_keys() already includes these, so it makes sense to include them in has_key(). Signed-off-by: Johannes Marte <johannes.marte@wolfvision.net>
This commit is contained in:
parent
f06352f841
commit
58f9667def
@ -1055,7 +1055,16 @@ gboolean
|
|||||||
g_settings_schema_has_key (GSettingsSchema *schema,
|
g_settings_schema_has_key (GSettingsSchema *schema,
|
||||||
const gchar *key)
|
const gchar *key)
|
||||||
{
|
{
|
||||||
return gvdb_table_has_value (schema->table, key);
|
GSettingsSchema *s;
|
||||||
|
|
||||||
|
if (gvdb_table_has_value (schema->table, key))
|
||||||
|
return TRUE;
|
||||||
|
|
||||||
|
for (s = schema; s; s = s->extends)
|
||||||
|
if (gvdb_table_has_value (s->table, key))
|
||||||
|
return TRUE;
|
||||||
|
|
||||||
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user