diff options
-rw-r--r-- | debian/changelog | 9 | ||||
-rw-r--r-- | debian/patches/restore_session_lock.patch | 57 | ||||
-rw-r--r-- | debian/rules | 1 | ||||
-rw-r--r-- | src/apt-watcher.c | 7 | ||||
-rw-r--r-- | src/user-menu-mgr.c | 28 |
5 files changed, 39 insertions, 63 deletions
diff --git a/debian/changelog b/debian/changelog index 2f0aa7b..9c5956c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +indicator-session (0.3.92-0ubuntu2) UNRELEASED; 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 11:12:37 +0100 + indicator-session (0.3.92-0ubuntu1) precise; urgency=low * debian/patches/restore_session_lock.patch, debian/rules: diff --git a/debian/patches/restore_session_lock.patch b/debian/patches/restore_session_lock.patch deleted file mode 100644 index ef4effb..0000000 --- a/debian/patches/restore_session_lock.patch +++ /dev/null @@ -1,57 +0,0 @@ -=== modified file 'src/user-menu-mgr.c' ---- src/user-menu-mgr.c 2012-02-10 07:33:14 +0000 -+++ src/user-menu-mgr.c 2012-02-23 18:19:12 +0000 -@@ -285,11 +285,29 @@ - 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 @@ - UserData *user = (UserData *)user_data; - UsersServiceDbus *service = user->service; - -+ lock_if_possible(); -+ - users_service_dbus_activate_user_session (service, user); - } - -@@ -386,7 +406,11 @@ - 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; -+ } - } - - - diff --git a/debian/rules b/debian/rules index 1561939..43ffda2 100644 --- a/debian/rules +++ b/debian/rules @@ -5,7 +5,6 @@ DEB_MAKE_FLAVORS = gtk2 gtk3 include /usr/share/cdbs/1/rules/debhelper.mk include /usr/share/cdbs/1/class/gnome.mk -include /usr/share/cdbs/1/rules/simple-patchsys.mk DEB_MAKE_DESTDIRSKEL = $(CURDIR)/debian/tmp/@FLAVOR@ DEB_DESTDIR = $(CURDIR)/debian/tmp/$(cdbs_make_curflavor)/ diff --git a/src/apt-watcher.c b/src/apt-watcher.c index 6e8a5c9..c638a93 100644 --- a/src/apt-watcher.c +++ b/src/apt-watcher.c @@ -115,15 +115,16 @@ 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) { + else if (g_strcmp0(signal_name, "RestartSchedule") == 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); - } + DBUSMENU_MENUITEM_DISPOSITION_ALERT); + session_dbus_restart_required (self->session_dbus_interface); + } } 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; + } } |