Getting started: Use <choices> in the schema

The use of a manually-specified enum is a little unusual.
This is really meant to be done by <choices>.
This commit is contained in:
Matthias Clasen 2013-07-23 19:20:07 -04:00
parent 99203f09f2
commit b73027aa04
4 changed files with 24 additions and 24 deletions

View File

@ -1,17 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<schemalist>
<enum id="org.gtk.exampleapp.Transition">
<value value="0" nick="none"/>
<value value="1" nick="crossfade"/>
<value value="6" nick="slide-left-right"/>
</enum>
<schema path="/org/gtk/exampleapp/" id="org.gtk.exampleapp">
<key name="font" type="s">
<default>'Monospace 12'</default>
<summary>Font</summary>
<description>The font to be used for content.</description>
</key>
<key name="transition" enum="org.gtk.exampleapp.Transition">
<key name="transition" type="s">
<choices>
<choice value='none'/>
<choice value='crossfade'/>
<choice value='slide-left-right'/>
</choices>
<default>'none'</default>
<summary>Transition</summary>
<description>The transition to use when switching tabs.</description>

View File

@ -1,17 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<schemalist>
<enum id="org.gtk.exampleapp.Transition">
<value value="0" nick="none"/>
<value value="1" nick="crossfade"/>
<value value="6" nick="slide-left-right"/>
</enum>
<schema path="/org/gtk/exampleapp/" id="org.gtk.exampleapp">
<key name="font" type="s">
<default>'Monospace 12'</default>
<summary>Font</summary>
<description>The font to be used for content.</description>
</key>
<key name="transition" enum="org.gtk.exampleapp.Transition">
<key name="transition" type="s">
<choices>
<choice value='none'/>
<choice value='crossfade'/>
<choice value='slide-left-right'/>
</choices>
<default>'none'</default>
<summary>Transition</summary>
<description>The transition to use when switching tabs.</description>

View File

@ -1,17 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<schemalist>
<enum id="org.gtk.exampleapp.Transition">
<value value="0" nick="none"/>
<value value="1" nick="crossfade"/>
<value value="6" nick="slide-left-right"/>
</enum>
<schema path="/org/gtk/exampleapp/" id="org.gtk.exampleapp">
<key name="font" type="s">
<default>'Monospace 12'</default>
<summary>Font</summary>
<description>The font to be used for content.</description>
</key>
<key name="transition" enum="org.gtk.exampleapp.Transition">
<key name="transition" type="s">
<choices>
<choice value='none'/>
<choice value='crossfade'/>
<choice value='slide-left-right'/>
</choices>
<default>'none'</default>
<summary>Transition</summary>
<description>The transition to use when switching tabs.</description>

View File

@ -1,17 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<schemalist>
<enum id="org.gtk.exampleapp.Transition">
<value value="0" nick="none"/>
<value value="1" nick="crossfade"/>
<value value="6" nick="slide-left-right"/>
</enum>
<schema path="/org/gtk/exampleapp/" id="org.gtk.exampleapp">
<key name="font" type="s">
<default>'Monospace 12'</default>
<summary>Font</summary>
<description>The font to be used for content.</description>
</key>
<key name="transition" enum="org.gtk.exampleapp.Transition">
<key name="transition" type="s">
<choices>
<choice value='none'/>
<choice value='crossfade'/>
<choice value='slide-left-right'/>
</choices>
<default>'none'</default>
<summary>Transition</summary>
<description>The transition to use when switching tabs.</description>