Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

50 lines (41 sloc) 1.596 kB
diff -Nru gnome-session-3.4.1.orig/gnome-session/gsm-manager.c gnome-session-3.4.1/gnome-session/gsm-manager.c
--- gnome-session-3.4.1.orig/gnome-session/gsm-manager.c 2012-04-24 14:34:27.525427743 -0400
+++ gnome-session-3.4.1/gnome-session/gsm-manager.c 2012-04-24 14:48:17.140933329 -0400
@@ -1143,12 +1143,20 @@
}
static void
+manager_ensure_up_client (GsmManager *manager)
+{
+ if (manager->priv->up_client == NULL)
+ manager->priv->up_client = up_client_new ();
+}
+
+static void
manager_attempt_hibernate (GsmManager *manager)
{
gboolean can_hibernate;
GError *error;
gboolean ret;
+ manager_ensure_up_client (manager);
can_hibernate = up_client_get_can_hibernate (manager->priv->up_client);
if (can_hibernate) {
@@ -1172,6 +1180,7 @@
GError *error;
gboolean ret;
+ manager_ensure_up_client (manager);
can_suspend = up_client_get_can_suspend (manager->priv->up_client);
if (can_suspend) {
@@ -2793,7 +2802,7 @@
NULL,
NULL, NULL);
- manager->priv->up_client = up_client_new ();
+ manager->priv->up_client = NULL;
manager->priv->shell = gsm_get_shell ();
}
@@ -3397,6 +3406,7 @@
gboolean can_suspend;
gboolean can_hibernate;
+ manager_ensure_up_client (manager);
g_object_get (manager->priv->up_client,
"can-suspend", &can_suspend,
"can-hibernate", &can_hibernate,
Jump to Line
Something went wrong with that request. Please try again.