[gnome-settings-daemon] data: Fix enum usage for the power plugin



commit 6fde0e25f2059b0af3e9550be21c3ab2a4510662
Author: Bastien Nocera <hadess hadess net>
Date:   Fri Nov 19 00:01:44 2010 +0000

    data: Fix enum usage for the power plugin
    
    Which is really gnome-power-manager as it didn't move in g-s-d yet.

 data/gsd-enums.h                                   |   10 +++++++
 ...settings-daemon.plugins.power.gschema.xml.in.in |   26 +++++++-------------
 2 files changed, 19 insertions(+), 17 deletions(-)
---
diff --git a/data/gsd-enums.h b/data/gsd-enums.h
index 0d0fe98..c75f78d 100644
--- a/data/gsd-enums.h
+++ b/data/gsd-enums.h
@@ -90,4 +90,14 @@ typedef enum
   GSD_WACOM_ROTATION_HALF
 } GsdWacomRotation;
 
+typedef enum
+{
+  GSD_POWER_ACTION_BLANK,
+  GSD_POWER_ACTION_SUSPEND,
+  GSD_POWER_ACTION_SHUTDOWN,
+  GSD_POWER_ACTION_HIBERNATE,
+  GSD_POWER_ACTION_INTERACTIVE,
+  GSD_POWER_ACTION_NOTHING
+} GsdPowerActionType;
+
 #endif /* __gsd_enums_h__ */
diff --git a/data/org.gnome.settings-daemon.plugins.power.gschema.xml.in.in b/data/org.gnome.settings-daemon.plugins.power.gschema.xml.in.in
index 0dce574..ed80853 100644
--- a/data/org.gnome.settings-daemon.plugins.power.gschema.xml.in.in
+++ b/data/org.gnome.settings-daemon.plugins.power.gschema.xml.in.in
@@ -1,12 +1,4 @@
 <schemalist>
-  <enum id="org.gnome.settings-daemon.plugins.power.ActionType">
-    <value nick="blank" value="0"/>
-    <value nick="suspend" value="1"/>
-    <value nick="shutdown" value="2"/>
-    <value nick="hibernate" value="3"/>
-    <value nick="interactive" value="4"/>
-    <value nick="nothing" value="5"/>
-  </enum>
   <schema gettext-domain="@GETTEXT_PACKAGE@" id="org.gnome.settings-daemon.plugins.power" path="/org/gnome/settings-daemon/plugins/power/">
     <key name="active" type="b">
       <default>false</default><!-- g-p-m is not a GSD plugin, yet -->
@@ -58,7 +50,7 @@
       <summary>Sleep timeout computer when on AC</summary>
       <description>The amount of time in seconds the computer on AC power needs to be inactive before it goes to sleep.</description>
     </key>
-    <key name="sleep-inactive-ac-type" enum="org.gnome.settings-daemon.plugins.power.ActionType">
+    <key name="sleep-inactive-ac-type" enum="org.gnome.settings-daemon.GsdPowerActionType">
       <default>'suspend'</default>
       <summary>Whether to hibernate, suspend or do nothing when inactive</summary>
       <description>The type of sleeping that should be performed when the computer is inactive.</description>
@@ -73,42 +65,42 @@
       <summary>Sleep timeout computer when on battery</summary>
       <description>The amount of time in seconds the computer on battery power needs to be inactive before it goes to sleep.</description>
     </key>
-    <key name="sleep-inactive-battery-type" enum="org.gnome.settings-daemon.plugins.power.ActionType">
+    <key name="sleep-inactive-battery-type" enum="org.gnome.settings-daemon.GsdPowerActionType">
       <default>'hibernate'</default>
       <summary>Whether to hibernate, suspend or do nothing when inactive</summary>
       <description>The type of sleeping that should be performed when the computer is inactive.</description>
     </key>
-    <key name="button-suspend" enum="org.gnome.settings-daemon.plugins.power.ActionType">
+    <key name="button-suspend" enum="org.gnome.settings-daemon.GsdPowerActionType">
       <default>'suspend'</default>
       <summary>Suspend button action</summary>
       <description>The action to take when the system suspend button is pressed.</description>
     </key>
-    <key name="button-hibernate" enum="org.gnome.settings-daemon.plugins.power.ActionType">
+    <key name="button-hibernate" enum="org.gnome.settings-daemon.GsdPowerActionType">
       <default>'hibernate'</default>
       <summary>Hibernate button action</summary>
       <description>The action to take when the system hibernate button is pressed.</description>
     </key>
-    <key name="button-sleep" enum="org.gnome.settings-daemon.plugins.power.ActionType">
+    <key name="button-sleep" enum="org.gnome.settings-daemon.GsdPowerActionType">
       <default>'hibernate'</default>
       <summary>Sleep button action</summary>
       <description>The action to take when the system sleep (non-specific type) button is pressed.</description>
     </key>
-    <key name="button-power" enum="org.gnome.settings-daemon.plugins.power.ActionType">
+    <key name="button-power" enum="org.gnome.settings-daemon.GsdPowerActionType">
       <default>'interactive'</default>
       <summary>Power button action</summary>
       <description>The action to take when the system power button is pressed.</description>
     </key>
-    <key name="lid-close-battery-action" enum="org.gnome.settings-daemon.plugins.power.ActionType">
+    <key name="lid-close-battery-action" enum="org.gnome.settings-daemon.GsdPowerActionType">
       <default>'hibernate'</default>
       <summary>Laptop lid close action on battery</summary>
       <description>The action to take when the laptop lid is closed and the laptop is on battery power.</description>
     </key>
-    <key name="lid-close-ac-action" enum="org.gnome.settings-daemon.plugins.power.ActionType">
+    <key name="lid-close-ac-action" enum="org.gnome.settings-daemon.GsdPowerActionType">
       <default>'suspend'</default>
       <summary>Laptop lid close action when on AC</summary>
       <description>The action to take when the laptop lid is closed and the laptop is on AC power.</description>
     </key>
-    <key name="critical-battery-action" enum="org.gnome.settings-daemon.plugins.power.ActionType">
+    <key name="critical-battery-action" enum="org.gnome.settings-daemon.GsdPowerActionType">
       <default>'hibernate'</default>
       <summary>Battery critical low action</summary>
       <description>The action to take when the battery is critically low.</description>



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