diff options
author | Ted Gould <ted@gould.cx> | 2012-03-09 15:26:56 -0600 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2012-03-09 15:26:56 -0600 |
commit | 4930d8b50fcd5d92eec258659a78278d3d253db6 (patch) | |
tree | 0c6c42ff52b40e25debd2d7e1da385b990ca036b | |
parent | 9bdc8031ccdd14ac1cb6ecb959210b8631059b77 (diff) | |
parent | ed3bab33563907dcd32ac4371f0c825cb4d980f5 (diff) | |
download | ayatana-indicator-session-4930d8b50fcd5d92eec258659a78278d3d253db6.tar.gz ayatana-indicator-session-4930d8b50fcd5d92eec258659a78278d3d253db6.tar.bz2 ayatana-indicator-session-4930d8b50fcd5d92eec258659a78278d3d253db6.zip |
Sync with U. Desktop
-rw-r--r-- | debian/changelog | 24 | ||||
-rw-r--r-- | src/apt-watcher.c | 24 | ||||
-rw-r--r-- | src/user-menu-mgr.c | 28 |
3 files changed, 63 insertions, 13 deletions
diff --git a/debian/changelog b/debian/changelog index acd1f0d..cc76a42 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,24 @@ -indicator-session (0.3.92-0ubuntu1~ppa1) precise; urgency=low +indicator-session (0.3.92-0ubuntu3) precise; urgency=low + + * Backport mvo's restart required fix, with the new aptdaemon that + should fix the issue for good (lp: #942104) + + -- Sebastien Bacher <seb128@ubuntu.com> Fri, 09 Mar 2012 13:39:43 +0100 + +indicator-session (0.3.92-0ubuntu2) precise; urgency=low + + * Backport r243 and r244, should fix the restart required status update + once aptdaemon is fixed to correctly emit signals (lp: #942104) + * debian/patches/restore_session_lock.patch, debian/rules: + - replace by a backport of the official commit + + -- Sebastien Bacher <seb128@ubuntu.com> Tue, 06 Mar 2012 16:06:57 +0100 + +indicator-session (0.3.92-0ubuntu1) precise; urgency=low + + * debian/patches/restore_session_lock.patch, debian/rules: + - get the indicator to enforce locking again since we still have cases + where locking is not done otherwise (lp: #939518) [ Martin Pitt ] * debian/control: Add alternative packagekit dependency, since this ought to @@ -9,7 +29,7 @@ indicator-session (0.3.92-0ubuntu1~ppa1) precise; urgency=low * Make GUDev dependency optional for non-Linux kernels * Add accessibility strings on the icons (LP: #891861) - -- Ted Gould <ted@ubuntu.com> Thu, 23 Feb 2012 09:18:34 -0600 + -- Sebastien Bacher <seb128@ubuntu.com> Thu, 23 Feb 2012 19:42:06 +0100 indicator-session (0.3.91-0ubuntu1) precise; urgency=low diff --git a/src/apt-watcher.c b/src/apt-watcher.c index 6e8a5c9..092942f 100644 --- a/src/apt-watcher.c +++ b/src/apt-watcher.c @@ -52,6 +52,7 @@ get_updates_complete (GObject *source_object, AptWatcher* self = APT_WATCHER (user_data); PkResults *results; + PkRestartEnum restart_required; GError *error = NULL; results = pk_client_generic_finish (PK_CLIENT(source_object), res, &error); @@ -83,6 +84,20 @@ get_updates_complete (GObject *source_object, DBUSMENU_MENUITEM_PROP_LABEL, _("Software Up to Date")); } + + /* check if there was a restart required info in the signal */ + restart_required = pk_results_get_require_restart_worst (results); + if (restart_required == PK_RESTART_ENUM_SYSTEM || + restart_required == PK_RESTART_ENUM_SECURITY_SYSTEM) { + dbusmenu_menuitem_property_set (self->apt_item, + DBUSMENU_MENUITEM_PROP_LABEL, + _("Restart to Complete Updates…")); + dbusmenu_menuitem_property_set (self->apt_item, + DBUSMENU_MENUITEM_PROP_DISPOSITION, + DBUSMENU_MENUITEM_DISPOSITION_ALERT); + session_dbus_restart_required (self->session_dbus_interface); + } + g_ptr_array_unref (packages); g_object_unref (results); g_object_unref (source_object); @@ -115,15 +130,6 @@ static void apt_watcher_signal_cb ( GDBusProxy* proxy, g_debug ("updates changed signal received"); apt_watcher_check_for_updates (self); } - else if (g_strcmp0(signal_name, "RestartScheduled") == 0) { - g_debug ("RestartScheduled signal received"); - dbusmenu_menuitem_property_set (self->apt_item, - DBUSMENU_MENUITEM_PROP_LABEL, - _("Restart to Complete Updates…")); - dbusmenu_menuitem_property_set (self->apt_item, - DBUSMENU_MENUITEM_PROP_DISPOSITION, - DBUSMENU_MENUITEM_DISPOSITION_ALERT); - } } static void diff --git a/src/user-menu-mgr.c b/src/user-menu-mgr.c index 7aad2af..3f4bdc4 100644 --- a/src/user-menu-mgr.c +++ b/src/user-menu-mgr.c @@ -285,11 +285,29 @@ check_new_session () return TRUE; } +/* Check to see if the lockdown key is protecting from + locking the screen. If not, lock it. */ +static void +lock_if_possible (void) { + ensure_settings_client (); + + if (!g_settings_get_boolean (settings, LOCKDOWN_KEY_SCREENSAVER)) { + lock_screen(NULL, 0, NULL); + } + + return; +} + + /* Starts a new generic session */ static void activate_new_session (DbusmenuMenuitem * mi, guint timestamp, gpointer user_data) { - users_service_dbus_show_greeter (USERS_SERVICE_DBUS(user_data)); + lock_if_possible(); + + users_service_dbus_show_greeter (USERS_SERVICE_DBUS(user_data)); + + return; } /* Activates a session for a particular user. */ @@ -299,6 +317,8 @@ activate_user_session (DbusmenuMenuitem *mi, guint timestamp, gpointer user_data UserData *user = (UserData *)user_data; UsersServiceDbus *service = user->service; + lock_if_possible(); + users_service_dbus_activate_user_session (service, user); } @@ -386,7 +406,11 @@ activate_guest_session (DbusmenuMenuitem * mi, guint timestamp, gpointer user_da UserMenuMgr* user_mgr = USER_MENU_MGR(user_data); UsersServiceDbus *service = user_mgr->users_dbus_interface; - users_service_dbus_activate_guest_session(service); + lock_if_possible(); + + if (users_service_dbus_activate_guest_session(service)) { + return; + } } |