Sophie

Sophie

distrib > Mandriva > mes5 > x86_64 > by-pkgid > d85bfffe3569ec11598892cd38cf46e8 > files > 5

gnome-power-manager-2.24.1-0.1mdv2009.0.src.rpm

Index: src/gpm-manager.c
===================================================================
--- src/gpm-manager.c	(révision 3042)
+++ src/gpm-manager.c	(copie de travail)
@@ -526,11 +526,11 @@
 		gpm_control_shutdown (manager->priv->control, NULL);
 
 	} else if (strcmp (action, ACTION_INTERACTIVE) == 0) {
+		gchar *logout_command;
 		gpm_info_explain_reason (manager->priv->info, GPM_EVENT_NOTIFICATION,
 					_("GNOME interactive logout."), reason);
-		gnome_client_request_save (gnome_master_client (),
-					   GNOME_SAVE_GLOBAL,
-					   TRUE, GNOME_INTERACT_ANY, FALSE, TRUE);
+		gpm_conf_get_string (manager->priv->conf, GPM_CONF_LOGOUT_COMMAND, &logout_command);
+		g_spawn_command_line_async(logout_command, NULL);
 	} else {
 		egg_warning ("unknown action %s", action);
 	}
Index: data/gnome-power-manager.schemas.in
===================================================================
--- data/gnome-power-manager.schemas.in	(révision 3042)
+++ data/gnome-power-manager.schemas.in	(copie de travail)
@@ -431,6 +431,18 @@
     </schema>
 
     <schema>
+      <key>/schemas/apps/gnome-power-manager/general/logout_command</key>
+      <applyto>/apps/gnome-power-manager/general/logout_command</applyto>
+      <owner>gnome-power-manager</owner>
+      <type>string</type>
+      <default>gnome-session-save --shutdown-dialog</default>
+      <locale name="C">
+        <short>Command to use when the user press the power button.</short>
+        <long>Command to use when the user press the power button.</long>
+      </locale>
+    </schema>
+
+    <schema>
       <key>/schemas/apps/gnome-power-manager/keyboard/brightness_battery</key>
       <applyto>/apps/gnome-power-manager/keyboard/brightness_battery</applyto>
       <type>int</type>
Index: src/gpm-conf.h
===================================================================
--- src/gpm-conf.h	2008-09-04 12:05:15.000000000 +0200
+++ src/gpm-conf.h	2008-10-27 17:23:19.000000000 +0100
@@ -85,6 +85,7 @@
 #define GPM_CONF_LAPTOP_USES_EXT_MON		GPM_CONF_DIR "/general/using_external_monitor"
 #define GPM_CONF_POLICY_TIMEOUT			GPM_CONF_DIR "/general/policy_suppression_timeout"
 #define GPM_CONF_IGNORE_INHIBITS		GPM_CONF_DIR "/general/ignore_inhibit_requests"
+#define GPM_CONF_LOGOUT_COMMAND			GPM_CONF_DIR "/general/logout_command"
 
 /* keyboard */
 #define GPM_CONF_KEYBOARD_BRIGHTNESS_AC		GPM_CONF_DIR "/keyboard/brightness_ac"