diff options
author | Ken VanDine <ken.vandine@canonical.com> | 2011-09-28 09:19:25 -0400 |
---|---|---|
committer | Ken VanDine <ken.vandine@canonical.com> | 2011-09-28 09:19:25 -0400 |
commit | d44c110df4e6702bb2441961c4d517f6885f5a3c (patch) | |
tree | 628e6d606000081a01cccc59e593ab914a6bff31 /src/apt-watcher.c | |
parent | 18f3158453229388605760aa8e738a9adb65109b (diff) | |
parent | a3fd1aa6abf470016825dbb288565018cf834c12 (diff) | |
download | ayatana-indicator-session-d44c110df4e6702bb2441961c4d517f6885f5a3c.tar.gz ayatana-indicator-session-d44c110df4e6702bb2441961c4d517f6885f5a3c.tar.bz2 ayatana-indicator-session-d44c110df4e6702bb2441961c4d517f6885f5a3c.zip |
* New upstream release.
* Fix convert file key naming (LP: #847807)
* Use environment variable to get seat path (LP: #856455)
* Fix abort when using ConsoleKit fallback (LP: #740382)
* Update session icon instead of creating a new one (LP: #854292)
* Update to latest Launchpad translations
Diffstat (limited to 'src/apt-watcher.c')
-rw-r--r-- | src/apt-watcher.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/apt-watcher.c b/src/apt-watcher.c index 2c5ed0b..d8bb7e2 100644 --- a/src/apt-watcher.c +++ b/src/apt-watcher.c @@ -177,8 +177,6 @@ apt_watcher_on_name_appeared (GDBusConnection *connection, "the system bus", name_owner); - apt_watcher_query_reboot_status (user_data); - g_dbus_proxy_call (watcher->proxy, "UpgradeSystem", g_variant_new("(b)", TRUE), @@ -299,6 +297,15 @@ apt_watcher_transaction_state_real_update_cb (AptTransaction* trans, if (self->current_state != UPGRADE_IN_PROGRESS){ query_again = TRUE; } + else{ + if (self->reboot_query != 0){ + g_source_remove (self->reboot_query); + self->reboot_query = 0; + } + self->reboot_query = g_timeout_add_seconds (1, + apt_watcher_query_reboot_status, + self); + } self->current_state = state; g_object_unref (G_OBJECT(self->current_transaction)); @@ -383,7 +390,7 @@ apt_watcher_query_reboot_status (gpointer data) GVariant* reboot_result = g_dbus_proxy_get_cached_property (self->proxy, "RebootRequired"); - gboolean reboot; + gboolean reboot = FALSE; g_variant_get (reboot_result, "b", &reboot); g_debug ("apt_watcher_query_reboot_status: reboot prop = %i", reboot); if (reboot == FALSE){ @@ -398,7 +405,7 @@ apt_watcher_query_reboot_status (gpointer data) else{ dbusmenu_menuitem_property_set (self->apt_item, DBUSMENU_MENUITEM_PROP_LABEL, - _("Restart to complete updates…")); + _("Restart to Complete Updates…")); dbusmenu_menuitem_property_set (self->apt_item, DBUSMENU_MENUITEM_PROP_DISPOSITION, DBUSMENU_MENUITEM_DISPOSITION_ALERT); @@ -461,7 +468,7 @@ static void apt_watcher_signal_cb ( GDBusProxy* proxy, if (reboot_required){ dbusmenu_menuitem_property_set (self->apt_item, DBUSMENU_MENUITEM_PROP_LABEL, - _("Restart to complete updates…")); + _("Restart to Complete Updates…")); dbusmenu_menuitem_property_set (self->apt_item, DBUSMENU_MENUITEM_PROP_DISPOSITION, DBUSMENU_MENUITEM_DISPOSITION_ALERT); |