GSettings child schemas



Hi,

I'm working on replacing GConf with GSettings in the GnuCash application. I have read through the GSettings reference documentation and migration guide. With that I think I can mostly manage the conversion in the code.

I'm unsure about the schema conversion though. I used gsettings-schema-convert to automatically generate GSettings compatible schemas from the existing GConf schemas. I notice that for some schemas the conversion tool decided to generate schemas with child schemas.

For example, after conversion I have these two schemas defined:
<schema id="org.gnucash.general" path="/aps/gnucash/general/">
<schema id="org.gnucash.general.register" path="/apps/gnucash/general/register/">

(Note: I'm aware I should not use the apps for path, but this is only temporary during the conversion.)

The second schema is marked as a child schema of the first one.

Yet due to the way our GConf schemas were organized I also have these two schemas:
<schema id="org.gnucash.dialogs" path="/aps/gnucash/dialogs/">
<schema id="org.gnucash.dialogs.sxs" path="/apps/gnucash/dialogs/scheduled_trans/">

And while they also share the same path and id prefix, the second is *not* marked as a child schema.

I found the GSettings documentation very thin on the rationale behind child schemas and hence I have no idea about what would be best practise here.

Should I attempt to make the schema hierarchy complete, mark schemas as children of others wherever I can ? Is it illegal to have two schemas of which one is in a subpath of the other without it being a child schema ?
What benefit do I get from defining child schemas ?

Any advice here would be greatly appreciated.

Thanks,

Geert


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]