[gnome-power-manager/gnome-3-0] Revert "Remove the 'interactive' option for power actions"



commit d5a6ade94f56db7f679ce1eeea7148dcd7589ed1
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Thu Mar 24 16:52:36 2011 -0400

    Revert "Remove the 'interactive' option for power actions"
    
    This reverts commit fe686eb57393a1410d6f3cc49694f6040d80ad6b.

 src/gpm-common.h  |    2 +-
 src/gpm-manager.c |    3 +++
 2 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/src/gpm-common.h b/src/gpm-common.h
index 58d5aaf..b540c05 100644
--- a/src/gpm-common.h
+++ b/src/gpm-common.h
@@ -145,9 +145,9 @@ typedef enum {
 	GPM_ACTION_POLICY_SUSPEND,
 	GPM_ACTION_POLICY_SHUTDOWN,
 	GPM_ACTION_POLICY_HIBERNATE,
+	GPM_ACTION_POLICY_INTERACTIVE,
 	GPM_ACTION_POLICY_NOTHING
 } GpmActionPolicy;
-
 #define	GPM_COLOR_WHITE			0xffffff
 #define	GPM_COLOR_BLACK			0x000000
 #define	GPM_COLOR_RED			0xff0000
diff --git a/src/gpm-manager.c b/src/gpm-manager.c
index b9c6ac3..751c479 100644
--- a/src/gpm-manager.c
+++ b/src/gpm-manager.c
@@ -726,6 +726,9 @@ gpm_manager_perform_policy (GpmManager  *manager, const gchar *policy_key, const
 		g_debug ("shutting down, reason: %s", reason);
 		gpm_control_shutdown (manager->priv->control, NULL);
 
+	} else if (policy == GPM_ACTION_POLICY_INTERACTIVE) {
+		g_debug ("logout, reason: %s", reason);
+		gpm_manager_logout (manager);
 	} else {
 		g_warning ("unknown action %i", policy);
 	}



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