summaryrefslogtreecommitdiff
path: root/src/gpm-control.c
diff options
context:
space:
mode:
authorStefan Seyfried <[email protected]>2014-04-09 15:12:17 +0200
committerStefan Seyfried <[email protected]>2014-04-09 15:12:17 +0200
commitd59f4b8bd38e1628af3a992ae8e96b8e069ab738 (patch)
treebb895796d71a346eff190714b865928d82980422 /src/gpm-control.c
parent220a4e0a64aca0579f50e6e57d4eca848b3ac57f (diff)
downloadmate-power-manager-d59f4b8bd38e1628af3a992ae8e96b8e069ab738.tar.bz2
mate-power-manager-d59f4b8bd38e1628af3a992ae8e96b8e069ab738.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);