← Back to team overview

ayatana-commits team mailing list archive

[Merge] lp:~cjcurran/indicator-session/startup-restart-required into lp:indicator-session

 

Conor Curran has proposed merging lp:~cjcurran/indicator-session/startup-restart-required into lp:indicator-session.

Requested reviews:
  Ted Gould (ted)

For more details, see:
https://code.launchpad.net/~cjcurran/indicator-session/startup-restart-required/+merge/75687

Removed startup RebootRequired query, this most have been causing the incorrect restart state flagged at start up, also reinserted the call to query the restart required after an upgrade is finished, this apt api is a mystery
-- 
https://code.launchpad.net/~cjcurran/indicator-session/startup-restart-required/+merge/75687
Your team ayatana-commits is subscribed to branch lp:indicator-session.
=== modified file 'src/apt-watcher.c'
--- src/apt-watcher.c	2011-09-14 16:17:55 +0000
+++ src/apt-watcher.c	2011-09-16 09:12:23 +0000
@@ -177,8 +177,6 @@
            "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 @@
       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 @@
   
   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){


Follow ups