aboutsummaryrefslogtreecommitdiff
path: root/src/apt-watcher.c
diff options
context:
space:
mode:
authorConor Curran <conor.curran@canonical.com>2011-08-10 18:01:29 +0100
committerConor Curran <conor.curran@canonical.com>2011-08-10 18:01:29 +0100
commit357374acb2a641a9c5d70cb6149293a0a07770f3 (patch)
tree8c8ac5869ebb4908f537e05f28db27261dabd180 /src/apt-watcher.c
parenta1a7357b58d182e077ebfe8fb11c083e5eb18839 (diff)
parent853ad495b863c179792044f1a74e8556d04e32db (diff)
downloadayatana-indicator-session-357374acb2a641a9c5d70cb6149293a0a07770f3.tar.gz
ayatana-indicator-session-357374acb2a641a9c5d70cb6149293a0a07770f3.tar.bz2
ayatana-indicator-session-357374acb2a641a9c5d70cb6149293a0a07770f3.zip
merged the lightdb dbus changes and the apt restartrequired awareness
Diffstat (limited to 'src/apt-watcher.c')
-rw-r--r--src/apt-watcher.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/src/apt-watcher.c b/src/apt-watcher.c
index 285eb81..72a63ac 100644
--- a/src/apt-watcher.c
+++ b/src/apt-watcher.c
@@ -266,11 +266,23 @@ apt_watcher_transaction_state_update_cb (AptTransaction* trans,
_("Updates Installing…"));
}
else if (state == FINISHED){
- dbusmenu_menuitem_property_set (self->apt_item,
- DBUSMENU_MENUITEM_PROP_LABEL,
- _("Software Up to Date"));
+ GVariant* reboot_result = g_dbus_proxy_get_cached_property (self->proxy,
+ "RebootRequired");
+ gboolean reboot;
+ g_variant_get (reboot_result, "b", &reboot);
+ if (reboot == FALSE){
+ dbusmenu_menuitem_property_set (self->apt_item,
+ DBUSMENU_MENUITEM_PROP_LABEL,
+ _("Software Up to Date"));
+ }
+ else{
+ dbusmenu_menuitem_property_set (self->apt_item,
+ DBUSMENU_MENUITEM_PROP_LABEL,
+ _("Reboot Required"));
+ session_dbus_restart_required (self->session_dbus_interface);
+ }
g_object_unref (G_OBJECT(self->current_transaction));
- self->current_transaction = NULL;
+ self->current_transaction = NULL;
}
self->current_state = state;
}