[gnome-software] Withdraw notification when prepared update gets invalidated
- From: Kalev Lember <klember src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] Withdraw notification when prepared update gets invalidated
- Date: Tue, 23 Jun 2015 14:14:10 +0000 (UTC)
commit dff5d863d8f7ed2d61cba67c42de7a7b925d5851
Author: Kalev Lember <klember redhat com>
Date: Tue Jun 23 14:54:43 2015 +0200
Withdraw notification when prepared update gets invalidated
When something external touches the package database and PackageKit
removes the /usr/lib/PackageKit/prepared-update file, make sure we also
withdraw the "Updates Available" notification. This ensures that we
don't leave behind stale notifications that open up a blank "Software is
up to date" page.
https://bugzilla.gnome.org/show_bug.cgi?id=749306
src/gs-update-monitor.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/gs-update-monitor.c b/src/gs-update-monitor.c
index dc09ea9..27bd556 100644
--- a/src/gs-update-monitor.c
+++ b/src/gs-update-monitor.c
@@ -113,6 +113,13 @@ offline_update_monitor_cb (GFileMonitor *file_monitor,
GFileMonitorEvent event_type,
GsUpdateMonitor *monitor)
{
+ if (!g_file_query_exists (monitor->offline_update_file, NULL)) {
+ g_debug ("prepared update removed; withdrawing updates-available notification");
+ g_application_withdraw_notification (monitor->application,
+ "updates-available");
+ return;
+ }
+
notify_offline_update_available (monitor);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]