diff options
author | Ken VanDine <ken.vandine@canonical.com> | 2011-08-10 16:23:32 -0400 |
---|---|---|
committer | Ken VanDine <ken.vandine@canonical.com> | 2011-08-10 16:23:32 -0400 |
commit | b5eb255fae2158fde84def56b46fa6c5424f5b84 (patch) | |
tree | 70f194a2b29a7f583160c1cd1630bfb373b7cdc2 /src/apt-watcher.c | |
parent | 108cec80746510d7f622ad0506a7f3d2a734c3ae (diff) | |
parent | fb32494de9b55663cec088ade6967da349c0cac7 (diff) | |
download | ayatana-indicator-session-b5eb255fae2158fde84def56b46fa6c5424f5b84.tar.gz ayatana-indicator-session-b5eb255fae2158fde84def56b46fa6c5424f5b84.tar.bz2 ayatana-indicator-session-b5eb255fae2158fde84def56b46fa6c5424f5b84.zip |
Import upstream version 0.3.1
Diffstat (limited to 'src/apt-watcher.c')
-rw-r--r-- | src/apt-watcher.c | 20 |
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; } |