[gnome-packagekit] When the update viewer is no longer being shown, force an update of the updates



commit 33dddac4043e5faddec5f749bea3ab534e2a35b2
Author: Richard Hughes <richard hughsie com>
Date:   Thu Oct 1 11:04:54 2009 +0100

    When the update viewer is no longer being shown, force an update of the updates
    
    This should prevent the icon and viewer getting out of sync, even when the daemon goes crazy

 src/gpk-check-update.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/gpk-check-update.c b/src/gpk-check-update.c
index d8a652f..c347150 100644
--- a/src/gpk-check-update.c
+++ b/src/gpk-check-update.c
@@ -1220,6 +1220,13 @@ gpk_cupdate_connection_changed_cb (EggDbusMonitor *monitor, gboolean connected,
 	egg_debug ("update viewer on the bus: %i", connected);
 	cupdate->priv->icon_inhibit_update_viewer_connected = connected;
 	gpk_check_update_set_icon_visibility (cupdate);
+
+	/* if the update viewer is coming back, do a check for updates so we don't
+	 *  show there are updates when the update viewer just said there were none */
+	if (!connected) {
+		egg_debug ("updatdate viewer back cb");
+		g_idle_add ((GSourceFunc) gpk_check_update_query_updates_idle_cb, cupdate);
+	}
 }
 
 /**



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