diff --git a/gio/gschema-compile.c b/gio/gschema-compile.c index 37e94c961..105bf86e1 100644 --- a/gio/gschema-compile.c +++ b/gio/gschema-compile.c @@ -11,6 +11,7 @@ typedef struct gchar *schemalist_domain; GHashTable *schema; + GvdbItem *schema_root; gchar *schema_domain; GString *string; @@ -71,6 +72,7 @@ start_element (GMarkupParseContext *context, if (!g_hash_table_lookup (state->schemas, id)) { state->schema = gvdb_hash_table_new (state->schemas, id); + state->schema_root = gvdb_hash_table_insert (state->schema, ""); if (path != NULL) gvdb_hash_table_insert_string (state->schema, @@ -93,7 +95,10 @@ start_element (GMarkupParseContext *context, if (COLLECT (STRING, "name", &name, STRING, "type", &type)) { if (!g_hash_table_lookup (state->schema, name)) - state->key = gvdb_hash_table_insert (state->schema, name); + { + state->key = gvdb_hash_table_insert (state->schema, name); + gvdb_item_set_parent (state->key, state->schema_root); + } else g_set_error (error, G_MARKUP_ERROR, diff --git a/gio/tests/org.gtk.test.gschema b/gio/tests/org.gtk.test.gschema index d0a5a2a8b..ccc6bc3bb 100644 --- a/gio/tests/org.gtk.test.gschema +++ b/gio/tests/org.gtk.test.gschema @@ -1,14 +1,14 @@ - "Hello, earthlings" + "Hello, earthlings" A greeting Greeting of the invading martians - "So long" + "So long"