blob: 06c968c5791c6d99448909765bbb08efa0052d1c (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
--- cinnamon-session/csm-consolekit.c.orig 2013-11-22 10:57:50.000000000 +0000
+++ cinnamon-session/csm-consolekit.c 2014-04-03 10:54:40.480547301 +0000
@@ -816,16 +816,22 @@
csm_consolekit_can_suspend (CsmSystem *system)
{
CsmConsolekit *consolekit = CSM_CONSOLEKIT (system);
-
+#ifdef HAVE_OLD_UPOWER
return up_client_get_can_suspend (consolekit->priv->up_client);
+#else
+ return FALSE;
+#endif
}
static gboolean
csm_consolekit_can_hibernate (CsmSystem *system)
{
CsmConsolekit *consolekit = CSM_CONSOLEKIT (system);
-
+#ifdef HAVE_OLD_UPOWER
return up_client_get_can_hibernate (consolekit->priv->up_client);
+#else
+ return FALSE;
+#endif
}
static void
@@ -835,7 +841,11 @@
GError *error = NULL;
gboolean ret;
+#ifdef HAVE_OLD_UPOWER
ret = up_client_suspend_sync (consolekit->priv->up_client, NULL, &error);
+#else
+ ret = FALSE;
+#endif
if (!ret) {
g_warning ("Unexpected suspend failure: %s", error->message);
g_error_free (error);
@@ -849,7 +859,11 @@
GError *error = NULL;
gboolean ret;
+#ifdef HAVE_OLD_UPOWER
ret = up_client_hibernate_sync (consolekit->priv->up_client, NULL, &error);
+#else
+ ret = FALSE;
+#endif
if (!ret) {
g_warning ("Unexpected hibernate failure: %s", error->message);
g_error_free (error);
|