summaryrefslogtreecommitdiff
path: root/src/gpm-prefs-core.c
diff options
context:
space:
mode:
authorStefano Karapetsas <[email protected]>2014-04-22 18:00:55 +0200
committerStefano Karapetsas <[email protected]>2014-04-22 18:00:55 +0200
commitd96bb779e9d88d83ba2bf54e8610bf966dcdf1c9 (patch)
treebb895796d71a346eff190714b865928d82980422 /src/gpm-prefs-core.c
parent8cb168b752f4130e88daefa400bb9bf07cf18227 (diff)
parentd59f4b8bd38e1628af3a992ae8e96b8e069ab738 (diff)
downloadmate-power-manager-d96bb779e9d88d83ba2bf54e8610bf966dcdf1c9.tar.bz2
mate-power-manager-d96bb779e9d88d83ba2bf54e8610bf966dcdf1c9.tar.xz
Merge pull request #98 from seife/master
make m-p-m work with current upower-0.99
Diffstat (limited to 'src/gpm-prefs-core.c')
-rw-r--r--src/gpm-prefs-core.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gpm-prefs-core.c b/src/gpm-prefs-core.c
index 7a2662d..6abb792 100644
--- a/src/gpm-prefs-core.c
+++ b/src/gpm-prefs-core.c
@@ -811,7 +811,9 @@ gpm_prefs_init (GpmPrefs *prefs)
UpDevice *device;
UpDeviceKind kind;
GpmBrightness *brightness;
+#if !UP_CHECK_VERSION(0, 99, 0)
gboolean ret;
+#endif
guint i;
GDBusProxy *proxy;
@@ -897,9 +899,11 @@ gpm_prefs_init (GpmPrefs *prefs)
else {
/* are we allowed to shutdown? */
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
}
if (LOGIND_RUNNING()) {
@@ -953,14 +957,14 @@ gpm_prefs_init (GpmPrefs *prefs)
brightness = gpm_brightness_new ();
prefs->priv->has_lcd = gpm_brightness_has_hw (brightness);
g_object_unref (brightness);
-
+#if !UP_CHECK_VERSION(0, 99, 0)
/* get device list */
ret = up_client_enumerate_devices_sync (prefs->priv->client, NULL, &error);
if (!ret) {
egg_warning ("failed to get device list: %s", error->message);
g_error_free (error);
}
-
+#endif
devices = up_client_get_devices (prefs->priv->client);
for (i=0; i<devices->len; i++) {
device = g_ptr_array_index (devices, i);