[gnome-power-manager/polkit1: 42/42] moo



commit ad1c40c103fb1f5a8d96e24c0c9c4fa68af74034
Merge: 9e46495... 2fdbc3c...
Author: Richard Hughes <richard hughsie com>
Date:   Mon Jul 6 14:00:56 2009 +0100

    moo

 README                              |   39 +-
 TODO                                |    9 +-
 applets/brightness/Makefile.am      |    1 -
 applets/inhibit/Makefile.am         |    1 -
 configure.ac                        |   24 +-
 data/gnome-power-manager.schemas.in |  120 +--
 data/gpm-prefs.ui                   |   34 +-
 libhal-glib/Makefile.am             |    4 +-
 libhal-glib/hal-device-store.c      |  309 ----
 libhal-glib/hal-device-store.h      |   67 -
 libhal-glib/hal-device.c            |  381 +-----
 libhal-glib/hal-device.h            |   21 -
 libhal-glib/hal-manager.c           |   41 +-
 libhal-glib/hal-manager.h           |    1 -
 po/bn_IN.po                         | 2758 +++++++++++++++++++----------------
 po/es.po                            | 1002 +++++++-------
 po/et.po                            |  422 ++++---
 po/ta.po                            |  898 ++++++------
 src/.gitignore                      |   10 +
 src/Makefile.am                     |    7 +-
 src/gpm-backlight.c                 |   97 +-
 src/gpm-brightness-kbd.c            |  774 ----------
 src/gpm-brightness-kbd.h            |   70 -
 src/gpm-button.c                    |  270 +----
 src/gpm-common.c                    |   56 +-
 src/gpm-common.h                    |   24 +-
 src/gpm-control.c                   |   19 +-
 src/gpm-devicekit.c                 |   49 +
 src/gpm-disks.c                     |  208 +++
 src/gpm-disks.h                     |   57 +
 src/gpm-engine.c                    |   58 +-
 src/gpm-light-sensor.c              |  385 -----
 src/gpm-light-sensor.h              |   64 -
 src/gpm-manager.c                   |  110 +-
 src/gpm-notify.c                    |   20 +-
 src/gpm-prefs-core.c                |   31 +-
 src/gpm-prefs-server.h              |    1 -
 src/gpm-statistics.c                |   36 +-
 38 files changed, 3348 insertions(+), 5130 deletions(-)
---
diff --cc configure.ac
index 0ff2c05,601f30a..fa06285
--- a/configure.ac
+++ b/configure.ac
@@@ -642,7 -658,7 +627,6 @@@ echo 
          cflags:                    ${CFLAGS}
          Building extra applets:    ${enable_applets}
          DPMS support:              ${have_dpms}
-         Legacy buttons support:    ${have_legacy_buttons}
 -        PolicyKit support:         ${have_polkit}
          Self test support:         ${have_tests}
          GConf default support:     ${have_gconfdefaults}
          Docbook support:           ${enable_docbook_docs}
diff --cc src/gpm-control.c
index 21eb85a,37128d4..4148dcf
--- a/src/gpm-control.c
+++ b/src/gpm-control.c
@@@ -135,12 -164,18 +135,20 @@@ gpm_control_allowed_suspend (GpmContro
  	g_return_val_if_fail (can, FALSE);
  
  	*can = FALSE;
+ 
+ 	/* get values from DkpClient */
+ 	g_object_get (control->priv->client,
+ 		      "can-suspend", &hardware_ok,
+ 		      NULL);
+ 
  	conf_ok = gconf_client_get_bool (control->priv->conf, GPM_CONF_CAN_SUSPEND, NULL);
- 	hardware_ok = dkp_client_can_suspend (control->priv->client);
 -	polkit_ok = gpm_control_is_user_privileged (control, "org.freedesktop.devicekit.power.suspend");
++	g_object_get (control->priv->client,
++		      "can-suspend", &hardware_ok,
++		      NULL);
  	fg = gpm_control_check_foreground_console (control);
 -	if (conf_ok && hardware_ok && polkit_ok && fg)
 +	if (conf_ok && hardware_ok && fg)
  		*can = TRUE;
 -	egg_debug ("conf=%i, polkit=%i, fg=%i, can=%i", conf_ok, polkit_ok, fg, *can);
 +	egg_debug ("conf=%i, fg=%i, can=%i", conf_ok, fg, *can);
  	return TRUE;
  }
  
@@@ -163,10 -204,10 +176,12 @@@ gpm_control_allowed_hibernate (GpmContr
  	*can = FALSE;
  	conf_ok = gconf_client_get_bool (control->priv->conf, GPM_CONF_CAN_HIBERNATE, NULL);
  	fg = gpm_control_check_foreground_console (control);
- 	hardware_ok = dkp_client_can_hibernate (control->priv->client);
 -	polkit_ok = gpm_control_is_user_privileged (control, "org.freedesktop.devicekit.power.hibernate");
 -	if (conf_ok && hardware_ok && polkit_ok && fg)
++	g_object_get (control->priv->client,
++		      "can-hibernate", &hardware_ok,
++		      NULL);
 +	if (conf_ok && hardware_ok && fg)
  		*can = TRUE;
 -	egg_debug ("conf=%i, polkit=%i, fg=%i, can=%i", conf_ok, polkit_ok, fg, *can);
 +	egg_debug ("conf=%i, fg=%i, can=%i", conf_ok, fg, *can);
  	return TRUE;
  }
  



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