[gnome-software/gnome-3-30] update monitor: Show update notifications also when auto updates are disabled



commit 86ebf1e40fa416d147cd57e4eb6125a8cd35d355
Author: Kalev Lember <klember redhat com>
Date:   Mon Dec 17 17:00:13 2018 +0100

    update monitor: Show update notifications also when auto updates are disabled
    
    Keep doing what we did in 3.28 and show updates available notifications
    also when the "download-updates" setting is disabled. In this case,
    however, we don't first download all the updates, but just notify
    immediately when we know that updates are available for download.

 src/gs-update-monitor.c | 9 +++++++++
 1 file changed, 9 insertions(+)
---
diff --git a/src/gs-update-monitor.c b/src/gs-update-monitor.c
index b21fd426..a29e708d 100644
--- a/src/gs-update-monitor.c
+++ b/src/gs-update-monitor.c
@@ -435,6 +435,15 @@ get_updates_finished_cb (GObject *object, GAsyncResult *res, gpointer data)
                                                    monitor);
                return;
        }
+
+       /* notify immediately if auto-updates are turned off */
+       if (download_updates_data->mode == GS_UPDATE_MONITOR_MODE_DO_AUTOUPDATES &&
+           !g_settings_get_boolean (monitor->settings, "download-updates")) {
+               if (has_important_updates (apps) ||
+                   no_updates_for_a_week (monitor)) {
+                       notify_offline_update_available (monitor);
+               }
+       }
 }
 
 static gboolean


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