[gnome-packagekit/gnome-2-28] Only show 'and n other security updates when there are other updates to list. Fixes rh#527149
- From: Richard Hughes <rhughes src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-packagekit/gnome-2-28] Only show 'and n other security updates when there are other updates to list. Fixes rh#527149
- Date: Fri, 9 Oct 2009 07:10:11 +0000 (UTC)
commit 5ff1dd84318bad683e2ae652a307294d853c5cb4
Author: Richard Hughes <richard hughsie com>
Date: Mon Oct 5 10:00:24 2009 +0100
Only show 'and n other security updates when there are other updates to list. Fixes rh#527149
src/gpk-check-update.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/src/gpk-check-update.c b/src/gpk-check-update.c
index d8a652f..041c4a2 100644
--- a/src/gpk-check-update.c
+++ b/src/gpk-check-update.c
@@ -854,10 +854,12 @@ gpk_check_update_process_updates (GpkCheckUpdate *cupdate, PkPackageList *list,
obj->id->name, obj->summary);
if (++showing == GPK_CHECK_UPDATE_MAX_NUMBER_SECURITY_ENTRIES) {
more = security_array->len - showing;
- /* TRANSLATORS: we have a notification that won't fit, so append on how many other we are not showing */
- g_string_append_printf (status_security, ngettext ("and %d other security update",
- "and %d other security updates", more), more);
- g_string_append (status_security, "...\n");
+ if (more > 0) {
+ /* TRANSLATORS: we have a notification that won't fit, so append on how many other we are not showing */
+ g_string_append_printf (status_security, ngettext ("and %d other security update",
+ "and %d other security updates", more), more);
+ g_string_append (status_security, "...\n");
+ }
break;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]