[gnome-software/wip/iainl/ubuntu-xenial] Only show the session manager restart if there were any non-live updates
- From: William Hua <williamhua src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/wip/iainl/ubuntu-xenial] Only show the session manager restart if there were any non-live updates
- Date: Tue, 12 Apr 2016 14:23:47 +0000 (UTC)
commit 516f4b32cd17a93b1f22193024e617c92056596d
Author: Richard Hughes <richard hughsie com>
Date: Fri Apr 8 09:33:05 2016 +0100
Only show the session manager restart if there were any non-live updates
src/gs-shell-updates.c | 26 ++++++++++++++------------
1 files changed, 14 insertions(+), 12 deletions(-)
---
diff --git a/src/gs-shell-updates.c b/src/gs-shell-updates.c
index 1868e84..9491800 100644
--- a/src/gs-shell-updates.c
+++ b/src/gs-shell-updates.c
@@ -942,7 +942,6 @@ gs_shell_updates_perform_update_cb (GsPluginLoader *plugin_loader,
GAsyncResult *res,
GsShellUpdates *self)
{
- g_autoptr(GDBusConnection) bus = NULL;
g_autoptr(GError) error = NULL;
/* get the results */
@@ -951,17 +950,20 @@ gs_shell_updates_perform_update_cb (GsPluginLoader *plugin_loader,
return;
}
- /* trigger reboot */
- bus = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, NULL);
- g_dbus_connection_call (bus,
- "org.gnome.SessionManager",
- "/org/gnome/SessionManager",
- "org.gnome.SessionManager",
- "Reboot",
- NULL, NULL, G_DBUS_CALL_FLAGS_NONE,
- G_MAXINT, NULL,
- gs_shell_updates_reboot_failed_cb,
- self);
+ /* trigger reboot if any application was not updatable live */
+ if (!self->all_updates_are_live) {
+ g_autoptr(GDBusConnection) bus = NULL;
+ bus = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, NULL);
+ g_dbus_connection_call (bus,
+ "org.gnome.SessionManager",
+ "/org/gnome/SessionManager",
+ "org.gnome.SessionManager",
+ "Reboot",
+ NULL, NULL, G_DBUS_CALL_FLAGS_NONE,
+ G_MAXINT, NULL,
+ gs_shell_updates_reboot_failed_cb,
+ self);
+ }
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]