diff options
author | Ken VanDine <ken.vandine@canonical.com> | 2010-02-25 16:04:43 -0500 |
---|---|---|
committer | Ken VanDine <ken.vandine@canonical.com> | 2010-02-25 16:04:43 -0500 |
commit | b10f319af43c3e770ae3bd2788b4dfd3ba12010f (patch) | |
tree | bd8a3de3ef6b669df3695b80fef184bfbff17768 | |
parent | c0e6bba3332cbe1e74e0e2f60e734d43eb4937f9 (diff) | |
parent | 7309355f8339fd0cc3c149769bce5d9452bc5e44 (diff) | |
download | ayatana-indicator-session-b10f319af43c3e770ae3bd2788b4dfd3ba12010f.tar.gz ayatana-indicator-session-b10f319af43c3e770ae3bd2788b4dfd3ba12010f.tar.bz2 ayatana-indicator-session-b10f319af43c3e770ae3bd2788b4dfd3ba12010f.zip |
releasing version 0.2.4-0ubuntu1
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | debian/changelog | 16 | ||||
-rw-r--r-- | debian/patches/fix-session-menu-without-gdm.patch | 46 | ||||
-rw-r--r-- | src/gtk-dialog/gtk-logout-helper.c | 40 | ||||
-rw-r--r-- | src/session-service.c | 4 | ||||
-rw-r--r-- | src/users-service-dbus.c | 10 |
6 files changed, 67 insertions, 51 deletions
diff --git a/configure.ac b/configure.ac index 221da2c..b3bfd8b 100644 --- a/configure.ac +++ b/configure.ac @@ -4,7 +4,7 @@ AC_INIT(src/indicator-session.c) AC_PREREQ(2.53) AM_CONFIG_HEADER(config.h) -AM_INIT_AUTOMAKE(indicator-session, 0.2.3) +AM_INIT_AUTOMAKE(indicator-session, 0.2.4) AM_MAINTAINER_MODE diff --git a/debian/changelog b/debian/changelog index 4c608d4..043f650 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,18 @@ +indicator-session (0.2.4-0ubuntu1) lucid; urgency=low + + * 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. + + [Ken VanDine] + * debian/patches/fix-session-menu-without-gdm.patch + - dropped patch, merged upstream + + -- Ted Gould <ted@ubuntu.com> Thu, 25 Feb 2010 11:57:41 -0600 + indicator-session (0.2.3-0ubuntu2) lucid; urgency=low * debian/patches/fix-session-menu-without-gdm.patch @@ -341,3 +356,4 @@ indicator-sus (0.1~ppa1) intrepid; urgency=low * Initial release -- Ted Gould <ted@ubuntu.com> Thu, 04 Dec 2008 23:51:41 -0800 + diff --git a/debian/patches/fix-session-menu-without-gdm.patch b/debian/patches/fix-session-menu-without-gdm.patch deleted file mode 100644 index 7b4b197..0000000 --- a/debian/patches/fix-session-menu-without-gdm.patch +++ /dev/null @@ -1,46 +0,0 @@ -=== modified file 'src/users-service-dbus.c' ---- src/users-service-dbus.c 2010-02-09 23:24:23 +0000 -+++ src/users-service-dbus.c 2010-02-19 12:22:47 +0000 -@@ -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 @@ - 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 @@ - { - 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 @@ - 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 @@ - 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; - diff --git a/src/gtk-dialog/gtk-logout-helper.c b/src/gtk-dialog/gtk-logout-helper.c index d8aea6b..4c6614c 100644 --- a/src/gtk-dialog/gtk-logout-helper.c +++ b/src/gtk-dialog/gtk-logout-helper.c @@ -30,6 +30,44 @@ with this program. If not, see <http://www.gnu.org/licenses/>. #include "gconf-helper.h" static void +consolekit_fallback (LogoutDialogAction action) +{ + DBusGConnection * sbus = dbus_g_bus_get(DBUS_BUS_SYSTEM, NULL); + g_return_if_fail(sbus != NULL); /* worst case */ + DBusGProxy * proxy = dbus_g_proxy_new_for_name(sbus, "org.freedesktop.ConsoleKit", + "/org/freedesktop/ConsoleKit/Manager", + "org.freedesktop.ConsoleKit.Manager"); + + if (proxy == NULL) { + g_warning("Unable to get consolekit proxy"); + return; + } + + switch (action) { + case LOGOUT_DIALOG_LOGOUT: + g_warning("Unable to fallback to ConsoleKit for logout as it's a session issue. We need some sort of session handler."); + break; + case LOGOUT_DIALOG_SHUTDOWN: + dbus_g_proxy_call_no_reply(proxy, + "Stop", + G_TYPE_INVALID); + break; + case LOGOUT_DIALOG_RESTART: + dbus_g_proxy_call_no_reply(proxy, + "Restart", + G_TYPE_INVALID); + break; + default: + g_warning("Unknown action"); + break; + } + + g_object_unref(proxy); + + return; +} + +static void session_action (LogoutDialogAction action) { DBusGConnection * sbus; @@ -50,6 +88,8 @@ session_action (LogoutDialogAction action) if (sm_proxy == NULL) { g_warning("Unable to get DBus proxy to SessionManager interface: %s", error->message); g_error_free(error); + + consolekit_fallback(action); return; } diff --git a/src/session-service.c b/src/session-service.c index 9fb9ee7..289bff8 100644 --- a/src/session-service.c +++ b/src/session-service.c @@ -226,7 +226,7 @@ up_changed_cb (DBusGProxy * proxy, gpointer user_data) G_TYPE_STRING, UP_INTERFACE, G_TYPE_STRING, - "can-suspend", + "CanSuspend", G_TYPE_INVALID, G_TYPE_VALUE, G_TYPE_INVALID); @@ -242,7 +242,7 @@ up_changed_cb (DBusGProxy * proxy, gpointer user_data) G_TYPE_STRING, UP_INTERFACE, G_TYPE_STRING, - "can-hibernate", + "CanHibernate", G_TYPE_INVALID, G_TYPE_VALUE, G_TYPE_INVALID); 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; |