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



commit a24bb05f44c2c8a63a2bee520413a8f3eb066249
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 7769d54..c99c23b 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]