gnome-power-manager r2858 - in trunk: . src



Author: rhughes
Date: Fri Aug  1 08:44:28 2008
New Revision: 2858
URL: http://svn.gnome.org/viewvc/gnome-power-manager?rev=2858&view=rev

Log:
2008-08-01  Richard Hughes  <richard hughsie com>

* src/gpm-control.c: (gpm_control_is_user_privileged),
(gpm_control_allowed_suspend), (gpm_control_allowed_hibernate):
Use the correct Policykit action names, we've not used hal-power-* in
a very long time.


Modified:
   trunk/ChangeLog
   trunk/src/gpm-control.c

Modified: trunk/src/gpm-control.c
==============================================================================
--- trunk/src/gpm-control.c	(original)
+++ trunk/src/gpm-control.c	Fri Aug  1 08:44:28 2008
@@ -107,7 +107,7 @@
 	pid = getpid ();
 	mask = polkit_check_auth (pid, privilege, NULL);
 	if (mask == 0) {
-		gpm_warning ("failed to authorise for privilege");
+		gpm_warning ("failed to authorise for privilege %s", privilege);
 		ret = FALSE;
 	}
 #endif
@@ -170,7 +170,7 @@
 	*can = FALSE;
 	gpm_conf_get_bool (control->priv->conf, GPM_CONF_CAN_SUSPEND, &conf_ok);
 	hal_ok = hal_gpower_can_suspend (control->priv->hal_power);
-	polkit_ok = gpm_control_is_user_privileged (control, "hal-power-suspend");
+	polkit_ok = gpm_control_is_user_privileged (control, "org.freedesktop.hal.power-management.suspend");
 	fg = gpm_control_check_foreground_console (control);
 	if (conf_ok && hal_ok && polkit_ok && fg) {
 		*can = TRUE;
@@ -202,7 +202,7 @@
 	gpm_conf_get_bool (control->priv->conf, GPM_CONF_CAN_HIBERNATE, &conf_ok);
 	hal_ok = hal_gpower_can_hibernate (control->priv->hal_power);
 	fg = gpm_control_check_foreground_console (control);
-	polkit_ok = gpm_control_is_user_privileged (control, "hal-power-hibernate");
+	polkit_ok = gpm_control_is_user_privileged (control, "org.freedesktop.hal.power-management.hibernate");
 	if (conf_ok && hal_ok && polkit_ok && fg) {
 		*can = TRUE;
 	}



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