[gnome-packagekit] Don't show the auth-failure dialog in the update viewer



commit 27e4ff8f624b708fc41b8e234e4e643d0b1d39e5
Author: Richard Hughes <richard hughsie com>
Date:   Tue Aug 18 12:13:37 2009 +0100

    Don't show the auth-failure dialog in the update viewer

 src/gpk-update-viewer.c |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/src/gpk-update-viewer.c b/src/gpk-update-viewer.c
index 20c6a22..0e97573 100644
--- a/src/gpk-update-viewer.c
+++ b/src/gpk-update-viewer.c
@@ -2120,14 +2120,20 @@ gpk_update_viewer_error_code_cb (PkClient *client, PkErrorCodeEnum code, const g
 	/* ignore some errors */
 	if (code == PK_ERROR_ENUM_PROCESS_KILL ||
 	    code == PK_ERROR_ENUM_TRANSACTION_CANCELLED) {
-		egg_debug ("error ignored %s\n%s", pk_error_enum_to_text (code), details);
+		egg_debug ("error ignored %s: %s", pk_error_enum_to_text (code), details);
 		return;
 	}
 
 	/* ignore the ones we can handle */
 	if (code == PK_ERROR_ENUM_NO_LICENSE_AGREEMENT ||
 	    pk_error_code_is_need_untrusted (code)) {
-		egg_debug ("error ignored as we're handling %s\n%s", pk_error_enum_to_text (code), details);
+		egg_debug ("error ignored as we're handling %s: %s", pk_error_enum_to_text (code), details);
+		return;
+	}
+
+	/* ignore not authorised, which seems odd but this will happen if the user clicks cancel */
+	if (code == PK_ERROR_ENUM_NOT_AUTHORIZED) {
+		egg_debug ("auth failure '%s' ignored: %s", pk_error_enum_to_text (code), details);
 		return;
 	}
 



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