[gnome-packagekit] Don't show (0) in the update viewer if there is nothing to download
- From: Richard Hughes <rhughes src gnome org>
- To: svn-commits-list gnome org
- Subject: [gnome-packagekit] Don't show (0) in the update viewer if there is nothing to download
- Date: Tue, 21 Jul 2009 12:47:17 +0000 (UTC)
commit e49a106222337d30dbff55a2bd5f5157927038be
Author: Richard Hughes <richard hughsie com>
Date: Tue Jul 21 13:42:42 2009 +0100
Don't show (0) in the update viewer if there is nothing to download
src/gpk-update-viewer.c | 25 +++++++++++++++++--------
1 files changed, 17 insertions(+), 8 deletions(-)
---
diff --git a/src/gpk-update-viewer.c b/src/gpk-update-viewer.c
index f4315a2..55fe175 100644
--- a/src/gpk-update-viewer.c
+++ b/src/gpk-update-viewer.c
@@ -839,14 +839,23 @@ gpk_update_viewer_reconsider_info (GtkTreeModel *model)
if (number_total == 0) {
gtk_label_set_label (GTK_LABEL (widget), "");
} else {
- text_size = g_format_size_for_display (size_total);
- /* TRANSLATORS: how many updates are selected in the UI */
- text = g_strdup_printf (ngettext ("%i update selected (%s)",
- "%i updates selected (%s)",
- number_total), number_total, text_size);
- gtk_label_set_label (GTK_LABEL (widget), text);
- g_free (text);
- g_free (text_size);
+ if (size_total == 0) {
+ /* TRANSLATORS: how many updates are selected in the UI */
+ text = g_strdup_printf (ngettext ("%i update selected",
+ "%i updates selected",
+ number_total), number_total);
+ gtk_label_set_label (GTK_LABEL (widget), text);
+ g_free (text);
+ } else {
+ text_size = g_format_size_for_display (size_total);
+ /* TRANSLATORS: how many updates are selected in the UI, and the size of packages to download */
+ text = g_strdup_printf (ngettext ("%i update selected (%s)",
+ "%i updates selected (%s)",
+ number_total), number_total, text_size);
+ gtk_label_set_label (GTK_LABEL (widget), text);
+ g_free (text);
+ g_free (text_size);
+ }
}
widget = GTK_WIDGET (gtk_builder_get_object (builder, "label_summary"));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]