Skip to content

Commit

Permalink
feat: add value range to setting schema file
Browse files Browse the repository at this point in the history
This change can allow users to do config through GSetting interface
directly, while prevent users from broken settings by themselves.
  • Loading branch information
wdhongtw committed Jul 2, 2024
1 parent d4d6e18 commit 43154ee
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions src/setup/org.freedesktop.IBus.Chewing.gschema.xml
Original file line number Diff line number Diff line change
@@ -1,13 +1,40 @@
<schemalist>
<schema id="org.freedesktop.IBus.Chewing" path="/desktop/ibus/engine/chewing/" gettext-domain="ibus-chewing">
<key name="kb-type" type="s">
<choices>
<choice value="default"/>
<choice value="hsu"/>
<choice value="ibm"/>
<choice value="gin_yieh"/>
<choice value="eten"/>
<choice value="eten26"/>
<choice value="dvorak"/>
<choice value="dvorak_hsu"/>
<choice value="dachen_26"/>
<choice value="hanyu"/>
<choice value="thl_pinying"/>
<choice value="mps2_pinyin"/>
<choice value="carpalx"/>
<choice value="colemak_dh_ansi"/>
<choice value="colemak_dh_orth"/>
</choices>
<default l10n="messages">"default"</default>
<summary>Keyboard Type</summary>
<description>
Select Zhuyin keyboard layout
</description>
</key>
<key name="sel-keys" type="s">
<choices>
<choice value="1234567890"/>
<choice value="asdfghjkl;"/>
<choice value="asdfzxcv89"/>
<choice value="asdfjkl789"/>
<choice value="aoeu;qjkix"/>
<choice value="aoeuhtnsid"/>
<choice value="aoeuidhtns"/>
<choice value="1234qweras"/>
</choices>
<default>"1234567890"</default>
<summary>Selection keys</summary>
<description>
Expand Down Expand Up @@ -59,19 +86,32 @@
</description>
</key>
<key name="max-chi-symbol-len" type="i">
<range min="0" max="39"/>
<default>20</default>
<summary>Maximum Chinese characters</summary>
<description>
Maximum Chinese characters in pre-edit buffer, not including inputing Zhuyin symbols.
</description>
</key>
<key name="chi-eng-mode-toggle" type="s">
<choices>
<choice value="caps_lock"/>
<choice value="shift"/>
<choice value="shift_l"/>
<choice value="shift_r"/>
</choices>
<default l10n="messages">"caps_lock"</default>
<summary>Chinese/Alphanumeric Mode Toggle Key</summary>
<description>
</description>
</key>
<key name="default-english-case" type="s">
<choices>
<choice value="no default"/>
<choice value="lowercase"/>
<choice value="uppercase"/>
<choice value="shift_r"/>
</choices>
<default l10n="messages">"lowercase"</default>
<summary>Default English letter case
(Only effective when Caps Lock is the toggle key)</summary>
Expand All @@ -82,6 +122,11 @@
</description>
</key>
<key name="sync-caps-lock" type="s">
<choices>
<choice value="disable"/>
<choice value="keyboard"/>
<choice value="input method"/>
</choices>
<default l10n="messages" context="Sync">"keyboard"</default>
<summary>Sync between CapsLock and IM</summary>
<description>
Expand All @@ -99,6 +144,7 @@
</description>
</key>
<key name="cand-per-page" type="u">
<range min="4" max="10"/>
<default>5</default>
<summary>Candidate per page</summary>
<description>
Expand Down

0 comments on commit 43154ee

Please sign in to comment.