aboutsummaryrefslogtreecommitdiff
path: root/src/apt-watcher.c
diff options
context:
space:
mode:
authorKen VanDine <ken.vandine@canonical.com>2011-08-10 16:34:26 -0400
committerKen VanDine <ken.vandine@canonical.com>2011-08-10 16:34:26 -0400
commitae81953d3491fcadae3b05c9535c6605a50a9467 (patch)
treecb8a8cbf0ad10b45c3457852acd02790bcd7f2c2 /src/apt-watcher.c
parentf0c187f8dd55d8b831892ce30937aed2b737c5f8 (diff)
parentb5eb255fae2158fde84def56b46fa6c5424f5b84 (diff)
downloadayatana-indicator-session-ae81953d3491fcadae3b05c9535c6605a50a9467.tar.gz
ayatana-indicator-session-ae81953d3491fcadae3b05c9535c6605a50a9467.tar.bz2
ayatana-indicator-session-ae81953d3491fcadae3b05c9535c6605a50a9467.zip
* New upstream release.
- restart is missing from SessionMenu (LP: #815077) - Don't allow starting programs via the greeter indicators (LP: #811853) - Printer menu item should launch system-config-printer (LP: #818602) - gudev integration - apt restart required awareness * debian/control - Added build depends on libgudev-1.0-dev
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;
}