[gnome-packagekit/glib2: 70/79] 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/glib2: 70/79] Only show 'and n other security updates when there are other updates to list. Fixes rh#527149
- Date: Tue, 6 Oct 2009 09:50:37 +0000 (UTC)
commit c3d06fe886c85480013012f30ac2843af66dfcff
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 0926be1..0142f7a 100644
--- a/src/gpk-check-update.c
+++ b/src/gpk-check-update.c
@@ -938,10 +938,12 @@ gpk_check_update_get_updates_finished_cb (GObject *object, GAsyncResult *res, Gp
g_strfreev (split);
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]