[gnome-settings-daemon/gnome-3-8] updates: Avoid warning when on AC



commit 54eff0625867b5509b49b5c9b8291b2e8b9ad9e0
Author: Bastien Nocera <hadess hadess net>
Date:   Mon Jun 30 16:24:40 2014 +0200

    updates: Avoid warning when on AC
    
    When on AC, we wouldn't be resetting the timeout ID, and throwing
    a warning later on, when the network state changed.

 plugins/updates/gsd-updates-refresh.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/plugins/updates/gsd-updates-refresh.c b/plugins/updates/gsd-updates-refresh.c
index ebd566f..c244d37 100644
--- a/plugins/updates/gsd-updates-refresh.c
+++ b/plugins/updates/gsd-updates-refresh.c
@@ -297,6 +297,7 @@ change_state (GsdUpdatesRefresh *refresh)
         /* no point continuing if we have no network */
         if (!refresh->priv->network_active) {
                 g_debug ("not when no network");
+                refresh->priv->timeout_id = 0;
                 return FALSE;
         }
 
@@ -305,6 +306,7 @@ change_state (GsdUpdatesRefresh *refresh)
                                       GSD_SETTINGS_UPDATE_BATTERY);
         if (!ret && refresh->priv->on_battery) {
                 g_debug ("not when on battery");
+                refresh->priv->timeout_id = 0;
                 return FALSE;
         }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]