GSettings: new <schema> tags 'extends', 'list-of'

Add support for extends='' and list-of='' tags to the <schema> element.
The attributes are parsed and some sanity-checking is done but currently
nothing happens as a result.

Add some tests.
This commit is contained in:
Ryan Lortie
2010-06-29 14:41:04 -04:00
parent 101bfec676
commit 900a756e8f
12 changed files with 192 additions and 12 deletions

View File

@@ -0,0 +1,3 @@
<schemalist>
<schema id='a' extends='x'/>
</schemalist>

View File

@@ -0,0 +1,4 @@
<schemalist>
<schema id='a'/> <schema id='x'/>
<schema id='b' list-of='x' extends='a'/>
</schemalist>

View File

@@ -0,0 +1,3 @@
<schemalist>
<schema id='a' extends='a'/>
</schemalist>

View File

@@ -0,0 +1,6 @@
<schemalist>
<schema id='x'/> <schema id='y'/>
<schema id='lx' list-of='x'/>
<schema id='lx2' extends='lx'/>
<schema id='ly' extends='lx2' list-of='y'/>
</schemalist>

View File

@@ -0,0 +1,5 @@
<schemalist>
<schema id='x'/> <schema id='y'/>
<schema id='lx' list-of='x'/>
<schema id='ly' extends='lx' list-of='y'/>
</schemalist>

View File

@@ -0,0 +1,21 @@
<schemalist>
<!-- c extends b extends a -->
<schema id='a'/>
<schema id='b' extends='a'/>
<schema id='c' extends='b'/>
<!-- lists of each -->
<schema id='la' list-of='a'/>
<schema id='lb' list-of='b'/>
<schema id='lc' list-of='c'/>
<!-- extend 'la', override the list-of to 'b' -->
<schema id='lb-la' list-of='b' extends='la'/>
<!-- extend 'la', override the list-of to 'c' -->
<schema id='lc-la' list-of='c' extends='la'/>
<!-- extend 'lb', override the list-of to 'c' -->
<schema id='lc-lb' list-of='c' extends='lb'/>
<!-- extend 'lb-la', override the list-of to 'c' -->
<schema id='lc-lb-la' list-of='c' extends='lb-la'/>
</schemalist>

View File

@@ -0,0 +1,8 @@
<schemalist>
<schema id='y'/>
<schema id='x' list-of='y'/>
<schema id='z' extends='x'>
<key name='foo' type='s'/>
</schema>
</schemalist>

View File

@@ -0,0 +1,6 @@
<schemalist>
<schema id='y'/>
<schema id='x' list-of='y'>
<key name='foo' type='s'/>
</schema>
</schemalist>

View File

@@ -0,0 +1,3 @@
<schemalist>
<schema id='a' list-of='x'/>
</schemalist>