[gnome-software] Don't flicker between GetUpdates and GetUpdateDetails



commit 66a22da9e4d2856c0eafc8e9eb48005c451040ed
Author: Richard Hughes <richard hughsie com>
Date:   Thu Jan 24 11:42:54 2013 +0000

    Don't flicker between GetUpdates and GetUpdateDetails

 src/gs-main.c |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/src/gs-main.c b/src/gs-main.c
index ab35271..0d357df 100644
--- a/src/gs-main.c
+++ b/src/gs-main.c
@@ -137,10 +137,17 @@ gs_main_progress_cb (PkProgress *progress,
 	PkRoleEnum role;
 	PkStatusEnum status;
 
-	/* action item, so no waiting panel */
+	/* don't flicker between GetUpdates and GetUpdateDetails */
 	g_object_get (progress,
+		      "status", &status,
 		      "role", &role,
 		      NULL);
+	if (role == PK_ROLE_ENUM_GET_UPDATES &&
+	    status == PK_STATUS_ENUM_FINISHED) {
+		return;
+	}
+
+	/* action item, so no waiting panel */
 	if (role == PK_ROLE_ENUM_INSTALL_PACKAGES ||
 	    role == PK_ROLE_ENUM_UPDATE_PACKAGES ||
 	    role == PK_ROLE_ENUM_REMOVE_PACKAGES) {
@@ -164,7 +171,6 @@ gs_main_progress_cb (PkProgress *progress,
 	}
 
 	g_object_get (progress,
-		      "status", &status,
 		      "percentage", &percentage,
 		      "allow-cancel", &allow_cancel,
 		      NULL);



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