Commit b73027aa authored by Matthias Clasen's avatar Matthias Clasen

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>.
parent 99203f09
<?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>
......
<?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>
......
<?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>
......
<?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>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment