[gsettings-desktop-schemas] enumify the keys



commit d36a7d2983ff9780fa8db5d15ac16b83e98739fd
Author: Ryan Lortie <desrt desrt ca>
Date:   Fri Jul 2 10:26:56 2010 -0400

    enumify the keys

 headers/gdesktop-enums.h                           |    8 ++++----
 .../org.gnome.desktop.background.gschema.xml.in    |   20 +++-----------------
 schemas/org.gnome.desktop.interface.gschema.xml    |   18 ++++--------------
 schemas/org.gnome.system.proxy.gschema.xml         |    7 +------
 4 files changed, 12 insertions(+), 41 deletions(-)
---
diff --git a/headers/gdesktop-enums.h b/headers/gdesktop-enums.h
index ed675eb..9a9fa25 100644
--- a/headers/gdesktop-enums.h
+++ b/headers/gdesktop-enums.h
@@ -35,10 +35,10 @@ typedef enum
 
 typedef enum
 {
-  G_DESKTOP_BACKGROUND_SHADING_TYPE_NONE,
-  G_DESKTOP_BACKGROUND_SHADING_TYPE_VERTICAL,
-  G_DESKTOP_BACKGROUND_SHADING_TYPE_HORIZONTAL
-} GDesktopBackgroundShadingType;
+  G_DESKTOP_BACKGROUND_SHADING_SOLID,
+  G_DESKTOP_BACKGROUND_SHADING_VERTICAL,
+  G_DESKTOP_BACKGROUND_SHADING_HORIZONTAL
+} GDesktopBackgroundShading;
 
 
 #endif /* __gdesktop_enums_h__ */
diff --git a/schemas/org.gnome.desktop.background.gschema.xml.in b/schemas/org.gnome.desktop.background.gschema.xml.in
index 70ad84c..0196e29 100644
--- a/schemas/org.gnome.desktop.background.gschema.xml.in
+++ b/schemas/org.gnome.desktop.background.gschema.xml.in
@@ -5,16 +5,7 @@
       <summary>Draw Desktop Background</summary>
       <description>Have GNOME draw the desktop background.</description>
     </key>
-    <key name="picture-options" type="s">
-      <choices>
-       <choice value="none"/>
-       <choice value="wallpaper"/>
-       <choice value="centered"/>
-       <choice value="scaled"/>
-       <choice value="stretched"/>
-       <choice value="zoom"/>
-       <choice value="spanned"/>
-      </choices>
+    <key name="picture-options" enum="org.gnome.desktop.GDesktopBackgroundStyle">
       <default>'zoom'</default>
       <summary>Picture Options</summary>
       <description>Determines how the image set by wallpaper_filename is rendered.  Possible values are "none", "wallpaper", "centered", "scaled", "stretched", "zoom", "spanned".</description>
@@ -40,15 +31,10 @@
       <summary>Secondary Color</summary>
       <description>Right or Bottom color when drawing gradients, not used for solid color.</description>
     </key>
-    <key name="color-shading-type" type="s">
-      <choices>
-       <choice value="horizontal-gradient"/>
-       <choice value="vertical-gradient"/>
-       <choice value="solid"/>
-      </choices>
+    <key name="color-shading-type" enum="org.gnome.desktop.GDesktopBackgroundShading">
       <default>'solid'</default>
       <summary>Color Shading Type</summary>
-      <description>How to shade the background color. Possible values are "horizontal-gradient", "vertical-gradient", and "solid".</description>
+      <description>How to shade the background color. Possible values are "horizontal", "vertical", and "solid".</description>
     </key>
   </schema>
 </schemalist>
diff --git a/schemas/org.gnome.desktop.interface.gschema.xml b/schemas/org.gnome.desktop.interface.gschema.xml
index 4022645..7d6ffa2 100644
--- a/schemas/org.gnome.desktop.interface.gschema.xml
+++ b/schemas/org.gnome.desktop.interface.gschema.xml
@@ -20,13 +20,7 @@
       <summary>Can Change Accels</summary>
       <description>Whether the user can dynamically type a new accelerator when  positioned over an active menuitem.</description>
     </key>
-    <key name="toolbar-style" type="s">
-      <choices>
-       <choice value="both"/>
-       <choice value="both-horiz"/>
-       <choice value="icons"/>
-       <choice value="text"/>
-      </choices>
+    <key name="toolbar-style" enum="org.gnome.desktop.GDesktopToolbarStyle">
       <default>'both-horiz'</default>
       <summary>Toolbar Style</summary>
       <description>Toolbar Style. Valid values are "both", "both-horiz", "icons", and "text".</description>
@@ -51,14 +45,10 @@
       <summary>Toolbar Detachable</summary>
       <description>Whether the user can detach toolbars and move them around.</description>
     </key>
-    <key name="toolbar-icons-size" type="s">
-      <choices>
-       <choice value="small-toolbar"/>
-       <choice value="large-toolbar"/>
-      </choices>
-      <default>'large-toolbar'</default>
+    <key name="toolbar-icons-size" enum="org.gnome.desktop.GDesktopToolbarIconSize">
+      <default>'large'</default>
       <summary>Toolbar Icon Size</summary>
-      <description>Size of icons in toolbars, either "small-toolbar" or "large-toolbar".</description>
+      <description>Size of icons in toolbars, either "small" or "large".</description>
     </key>
     <key name="cursor-blink" type="b">
       <default>true</default>
diff --git a/schemas/org.gnome.system.proxy.gschema.xml b/schemas/org.gnome.system.proxy.gschema.xml
index b33f3fa..2b29daf 100644
--- a/schemas/org.gnome.system.proxy.gschema.xml
+++ b/schemas/org.gnome.system.proxy.gschema.xml
@@ -4,12 +4,7 @@
     <child name="https" schema="org.gnome.system.proxy.https"/>
     <child name="ftp" schema="org.gnome.system.proxy.ftp"/>
     <child name="socks" schema="org.gnome.system.proxy.socks"/>
-    <key name="mode" type="s">
-      <choices>
-        <choice value="none"/>
-        <choice value="manual"/>
-        <choice value="auto"/>
-      </choices>
+    <key name="mode" enum="org.gnome.desktop.GDesktopProxyMode">
       <default>'none'</default>
       <summary>Proxy configuration mode</summary>
       <description>Select the proxy configuration mode. Supported values are "none", "manual", "auto".</description>



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