From c0b7a8662a2df0dcca820aa8b6f8b654e7ef21b6 Mon Sep 17 00:00:00 2001 From: Sebastien Bacher Date: Thu, 23 Feb 2012 19:41:54 +0100 Subject: * 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) --- debian/changelog | 6 +++- debian/patches/restore_session_lock.patch | 57 +++++++++++++++++++++++++++++++ debian/rules | 1 + 3 files changed, 63 insertions(+), 1 deletion(-) create mode 100644 debian/patches/restore_session_lock.patch diff --git a/debian/changelog b/debian/changelog index ed2372f..07ce249 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,5 +1,9 @@ indicator-session (0.3.92-0ubuntu1) UNRELEASED; 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 work with either the aptdaemon pkcompat or packagekit itself. @@ -9,7 +13,7 @@ indicator-session (0.3.92-0ubuntu1) UNRELEASED; urgency=low * Make GUDev dependency optional for non-Linux kernels * Add accessibility strings on the icons (LP: #891861) - -- Ted Gould Thu, 23 Feb 2012 09:18:34 -0600 + -- Sebastien Bacher Thu, 23 Feb 2012 19:27:24 +0100 indicator-session (0.3.91-0ubuntu1) precise; urgency=low diff --git a/debian/patches/restore_session_lock.patch b/debian/patches/restore_session_lock.patch new file mode 100644 index 0000000..ef4effb --- /dev/null +++ b/debian/patches/restore_session_lock.patch @@ -0,0 +1,57 @@ +=== 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 43ffda2..1561939 100644 --- a/debian/rules +++ b/debian/rules @@ -5,6 +5,7 @@ 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)/ -- cgit v1.2.3 From 86561325c0e7883e0b74a4f28bcd4a7f09c15d8f Mon Sep 17 00:00:00 2001 From: Sebastien Bacher Date: Thu, 23 Feb 2012 19:42:10 +0100 Subject: releasing version 0.3.92-0ubuntu1 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 07ce249..2f0aa7b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -indicator-session (0.3.92-0ubuntu1) UNRELEASED; urgency=low +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 @@ -13,7 +13,7 @@ indicator-session (0.3.92-0ubuntu1) UNRELEASED; urgency=low * Make GUDev dependency optional for non-Linux kernels * Add accessibility strings on the icons (LP: #891861) - -- Sebastien Bacher Thu, 23 Feb 2012 19:27:24 +0100 + -- Sebastien Bacher Thu, 23 Feb 2012 19:42:06 +0100 indicator-session (0.3.91-0ubuntu1) precise; urgency=low -- cgit v1.2.3 From aabe8764970005779fe938e44c85b844eba220cc Mon Sep 17 00:00:00 2001 From: Sebastien Bacher Date: Mon, 27 Feb 2012 18:38:21 +0100 Subject: Revert r239, there are still issues, to sort next cycle --- src/user-menu-mgr.c | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) 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; + } } -- cgit v1.2.3 From 0810650fabce99c29ee5b4c9966a68a07b230058 Mon Sep 17 00:00:00 2001 From: Conor Curran Date: Tue, 6 Mar 2012 09:43:37 +0000 Subject: listen for the right signal --- src/apt-watcher.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/apt-watcher.c b/src/apt-watcher.c index 6e8a5c9..b62354a 100644 --- a/src/apt-watcher.c +++ b/src/apt-watcher.c @@ -115,7 +115,7 @@ 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, -- cgit v1.2.3 From 98f37a07e608cd3fb1e86594a536f352a4ef13ff Mon Sep 17 00:00:00 2001 From: Conor Curran Date: Tue, 6 Mar 2012 12:10:53 +0000 Subject: make sure to change the icon on the panel when we get a restart signal from package kit --- src/apt-watcher.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/apt-watcher.c b/src/apt-watcher.c index b62354a..c638a93 100644 --- a/src/apt-watcher.c +++ b/src/apt-watcher.c @@ -122,8 +122,9 @@ static void apt_watcher_signal_cb ( GDBusProxy* proxy, _("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 -- cgit v1.2.3 From 0b3dbda1d637d0809e8350a36b7b7b37fccce5dd Mon Sep 17 00:00:00 2001 From: Sebastien Bacher Date: Tue, 6 Mar 2012 16:07:02 +0100 Subject: releasing version 0.3.92-0ubuntu2 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 9c5956c..1762aca 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,11 +1,11 @@ -indicator-session (0.3.92-0ubuntu2) UNRELEASED; urgency=low +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 Tue, 06 Mar 2012 11:12:37 +0100 + -- Sebastien Bacher Tue, 06 Mar 2012 16:06:57 +0100 indicator-session (0.3.92-0ubuntu1) precise; urgency=low -- cgit v1.2.3 From 6f222333dd2c85a8023ed0e4b05c6ff7f74f3731 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Thu, 8 Mar 2012 14:26:42 +0100 Subject: src/apt-watcher.c: check the pk_results_get_require_restart_worst() in get_updates() too --- src/apt-watcher.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/apt-watcher.c b/src/apt-watcher.c index c638a93..73ebdb9 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); -- cgit v1.2.3 From 9e862f15a1f4a86a0a5215c27d6d71905efebfd5 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Thu, 8 Mar 2012 14:28:01 +0100 Subject: src/apt-watcher.c: remove no longer needed code, this RestartRequired is a bit misleading as it about that the PK daemon got restarted not about system or session --- src/apt-watcher.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/apt-watcher.c b/src/apt-watcher.c index 73ebdb9..092942f 100644 --- a/src/apt-watcher.c +++ b/src/apt-watcher.c @@ -130,16 +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, "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); - session_dbus_restart_required (self->session_dbus_interface); - } } static void -- cgit v1.2.3 From ed3bab33563907dcd32ac4371f0c825cb4d980f5 Mon Sep 17 00:00:00 2001 From: Sebastien Bacher Date: Fri, 9 Mar 2012 13:39:48 +0100 Subject: releasing version 0.3.92-0ubuntu3 --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index dba9618..cc76a42 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,9 +1,9 @@ -indicator-session (0.3.92-0ubuntu3) UNRELEASED; 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 Fri, 09 Mar 2012 13:38:37 +0100 + -- Sebastien Bacher Fri, 09 Mar 2012 13:39:43 +0100 indicator-session (0.3.92-0ubuntu2) precise; urgency=low -- cgit v1.2.3