diff options
author | infirit <[email protected]> | 2016-04-17 19:23:33 +0200 |
---|---|---|
committer | monsta <[email protected]> | 2017-03-07 22:17:52 +0300 |
commit | a4d30e30fdf9ae097ced2e92c9a5130126ff9b94 (patch) | |
tree | cb90eecd76a3e80f9dfc0092bc4f2644c78c0e07 /src/gpm-prefs-core.c | |
parent | a11f72eee66b3dc244313a5cd0fc20fd7a1530ad (diff) | |
download | mate-power-manager-a4d30e30fdf9ae097ced2e92c9a5130126ff9b94.tar.bz2 mate-power-manager-a4d30e30fdf9ae097ced2e92c9a5130126ff9b94.tar.xz |
Replace deprecated UPower functions with ConsoleKit2 equivalents
This requires ConsoleKit2 0.9.2.
+ some corrections for issues mentioned at https://github.com/mate-desktop/mate-power-manager/pull/209
Diffstat (limited to 'src/gpm-prefs-core.c')
-rw-r--r-- | src/gpm-prefs-core.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/gpm-prefs-core.c b/src/gpm-prefs-core.c index f6847e0..5346ab9 100644 --- a/src/gpm-prefs-core.c +++ b/src/gpm-prefs-core.c @@ -755,13 +755,10 @@ gpm_prefs_init (GpmPrefs *prefs) g_object_unref(proxy); } else { - /* are we allowed to shutdown? */ + /* Get values from ConsoleKit */ egg_console_kit_can_stop (prefs->priv->console, &prefs->priv->can_shutdown, NULL); -#if !UP_CHECK_VERSION(0, 99, 0) - /* get values from UpClient */ - prefs->priv->can_suspend = up_client_get_can_suspend (prefs->priv->client); - prefs->priv->can_hibernate = up_client_get_can_hibernate (prefs->priv->client); -#endif + egg_console_kit_can_suspend (prefs->priv->console, &prefs->priv->can_suspend, NULL); + egg_console_kit_can_hibernate (prefs->priv->console, &prefs->priv->can_hibernate, NULL); } if (LOGIND_RUNNING()) { |