[gnome-settings-daemon] updates: ensure te user gets the updates notification if it's never been shown



commit 373e2e427b7f1c0b2c1ca49fa4fce76190ab1222
Author: Richard Hughes <richard hughsie com>
Date:   Tue Mar 15 18:06:33 2011 +0000

    updates: ensure te user gets the updates notification if it's never been shown

 plugins/updates/gsd-updates-manager.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/plugins/updates/gsd-updates-manager.c b/plugins/updates/gsd-updates-manager.c
index aa41771..f8229ba 100644
--- a/plugins/updates/gsd-updates-manager.c
+++ b/plugins/updates/gsd-updates-manager.c
@@ -356,9 +356,10 @@ notify_normal_updates_maybe (GsdUpdatesManager *manager, GPtrArray *array)
         g_settings_get (manager->priv->settings_gsd,
                         GSD_SETTINGS_LAST_UPDATES_NOTIFICATION,
                         "t", &time_last_notify);
-        if ((guint64) freq_updates_notify < time_now - time_last_notify) {
-                g_debug ("not showing non-critical notification as already shown %i days ago",
-                        (guint) (time_now - time_last_notify) / (24 * 60 * 60));
+        if (time_last_notify > 0 &&
+            (guint64) freq_updates_notify > time_now - time_last_notify) {
+                g_debug ("not showing non-critical notification as already shown %i hours ago",
+                        (guint) (time_now - time_last_notify) / (60 * 60));
                 return;
         }
 



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