aboutsummaryrefslogtreecommitdiff
path: root/src/users-service-dbus.c
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2010-02-25 11:56:16 -0600
committerTed Gould <ted@gould.cx>2010-02-25 11:56:16 -0600
commit6efdf35b5e3bfc25fa937b49c74f08d255aeb63c (patch)
tree6b25182d289609bba65170e18bfd70c9528e0320 /src/users-service-dbus.c
parentc9231bfee1c1ff91c20a76ba2f46a8d660ee1c67 (diff)
parentab02e295a6e21e1acb577516f0796d0ff4cc7092 (diff)
downloadayatana-indicator-session-6efdf35b5e3bfc25fa937b49c74f08d255aeb63c.tar.gz
ayatana-indicator-session-6efdf35b5e3bfc25fa937b49c74f08d255aeb63c.tar.bz2
ayatana-indicator-session-6efdf35b5e3bfc25fa937b49c74f08d255aeb63c.zip
* Upstream release 0.2.4
* When we can't shutdown with gnome-session fallback to using ConsoleKit. * Detect when GPM isn't available and don't error out. * Change suspend and hibernate detection property names for adjustment to upower.
Diffstat (limited to 'src/users-service-dbus.c')
-rw-r--r--src/users-service-dbus.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/users-service-dbus.c b/src/users-service-dbus.c
index d377089..0e5c922 100644
--- a/src/users-service-dbus.c
+++ b/src/users-service-dbus.c
@@ -1,3 +1,4 @@
+/* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */
/*
* Copyright 2009 Canonical Ltd.
*
@@ -183,7 +184,8 @@ users_service_dbus_init (UsersServiceDbus *self)
create_ck_proxy (self);
create_seat_proxy (self);
- users_loaded (priv->gdm_proxy, self);
+ if (priv->gdm_proxy)
+ users_loaded (priv->gdm_proxy, self);
}
static void
@@ -214,7 +216,7 @@ create_gdm_proxy (UsersServiceDbus *self)
{
if (error != NULL)
{
- g_error ("Unable to get DisplayManager proxy on system bus: %s", error->message);
+ g_warning ("Unable to get DisplayManager proxy on system bus: %s", error->message);
g_error_free (error);
}
@@ -679,6 +681,8 @@ users_loaded (DBusGProxy *proxy,
GError *error = NULL;
gint count;
+ g_return_if_fail (proxy != NULL);
+
service = (UsersServiceDbus *)user_data;
priv = USERS_SERVICE_DBUS_GET_PRIVATE (service);
@@ -859,6 +863,8 @@ gboolean
start_new_user_session (UsersServiceDbus *self,
UserData *user)
{
+ g_return_val_if_fail (IS_USERS_SERVICE_DBUS (self), FALSE);
+
UsersServiceDbusPrivate *priv = USERS_SERVICE_DBUS_GET_PRIVATE (self);
GError *error = NULL;
char *ssid;