summaryrefslogtreecommitdiff
path: root/src/gpm-control.c
diff options
context:
space:
mode:
authorStefan Seyfried <[email protected]>2014-04-09 15:12:17 +0200
committerStefano Karapetsas <[email protected]>2014-09-26 13:49:21 +0200
commitb0df99fa2eb1d7c9eed7e1424bffd6848382a79c (patch)
tree475d391c2849830866f8dd25d8141f03bdd70299 /src/gpm-control.c
parent5d70266e4ee075f001a0827ef4060eb8abf882ba (diff)
downloadmate-power-manager-b0df99fa2eb1d7c9eed7e1424bffd6848382a79c.tar.bz2
mate-power-manager-b0df99fa2eb1d7c9eed7e1424bffd6848382a79c.tar.xz
port mate-power-manager to upower-0.99 API
fix mate-power-manager for current upower versions
Diffstat (limited to 'src/gpm-control.c')
-rw-r--r--src/gpm-control.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gpm-control.c b/src/gpm-control.c
index ec50136..0562d38 100644
--- a/src/gpm-control.c
+++ b/src/gpm-control.c
@@ -289,10 +289,11 @@ gpm_control_suspend (GpmControl *control, GError **error)
}
g_object_unref(proxy);
}
+#if !UP_CHECK_VERSION(0, 99, 0)
else {
ret = up_client_suspend_sync (control->priv->client, NULL, error);
}
-
+#endif
egg_debug ("emitting resume");
g_signal_emit (control, signals [RESUME], 0, GPM_CONTROL_ACTION_SUSPEND);
@@ -399,10 +400,11 @@ gpm_control_hibernate (GpmControl *control, GError **error)
ret = TRUE;
}
}
+#if !UP_CHECK_VERSION(0, 99, 0)
else {
ret = up_client_hibernate_sync (control->priv->client, NULL, error);
}
-
+#endif
egg_debug ("emitting resume");
g_signal_emit (control, signals [RESUME], 0, GPM_CONTROL_ACTION_HIBERNATE);