aboutsummaryrefslogtreecommitdiffstats
path: root/widgets
diff options
context:
space:
mode:
authorjacob berkman <jacob@ximian.com>2001-05-25 02:58:04 +0800
committerJacob Berkman <jberkman@src.gnome.org>2001-05-25 02:58:04 +0800
commitc28a61bf2605c493d0d835b957a0182e2d6c8761 (patch)
tree49b1ffceb93452ee4842e110bb7066eee460966e /widgets
parentcd3efd875d94048a256179987de66f8766e31a69 (diff)
downloadgsoc2013-evolution-c28a61bf2605c493d0d835b957a0182e2d6c8761.tar.gz
gsoc2013-evolution-c28a61bf2605c493d0d835b957a0182e2d6c8761.tar.zst
gsoc2013-evolution-c28a61bf2605c493d0d835b957a0182e2d6c8761.zip
format similar to nautilus
2001-05-24 jacob berkman <jacob@ximian.com> * e-cell-size.c (ecd_get_text): format similar to nautilus 2001-05-23 jacob berkman <jacob@ximian.com> * e-table-group-container.c: internationalize the grouping text string svn path=/trunk/; revision=9966
Diffstat (limited to 'widgets')
-rw-r--r--widgets/table/e-cell-size.c6
-rw-r--r--widgets/table/e-table-group-container.c15
2 files changed, 12 insertions, 9 deletions
diff --git a/widgets/table/e-cell-size.c b/widgets/table/e-cell-size.c
index 09133d9dff..3d406f2b6d 100644
--- a/widgets/table/e-cell-size.c
+++ b/widgets/table/e-cell-size.c
@@ -21,14 +21,14 @@ ecd_get_text(ECellText *cell, ETableModel *model, int col, int row)
gfloat fsize;
if (size < 1024) {
- return g_strdup_printf ("%d", size);
+ return g_strdup_printf ("%d bytes", size);
} else {
fsize = ((gfloat) size) / 1024.0;
if (fsize < 1024.0) {
- return g_strdup_printf ("%.2f K", fsize);
+ return g_strdup_printf ("%d K", (int)fsize);
} else {
fsize /= 1024.0;
- return g_strdup_printf ("%.2f M", fsize);
+ return g_strdup_printf ("%.1f MB", fsize);
}
}
}
diff --git a/widgets/table/e-table-group-container.c b/widgets/table/e-table-group-container.c
index 5d55d17415..034c5625b8 100644
--- a/widgets/table/e-table-group-container.c
+++ b/widgets/table/e-table-group-container.c
@@ -12,6 +12,7 @@
#include <config.h>
#include <gdk/gdkkeysyms.h>
#include <gtk/gtksignal.h>
+#include <libgnome/libgnome.h>
#include <libgnomeui/gnome-canvas-rect-ellipse.h>
#include "e-table-group-container.h"
#include "e-table-group-leaf.h"
@@ -332,16 +333,18 @@ compute_text (ETableGroupContainer *etgc, ETableGroupContainerChildNode *child_n
{
gchar *text;
if (etgc->ecol->text)
- text = g_strdup_printf ("%s : %s (%d item%s)",
+ text = g_strdup_printf ((child_node->count == 1)
+ ? _("%s : %s (%d item)")
+ : _("%s : %s (%d items)"),
etgc->ecol->text,
child_node->string,
- (gint) child_node->count,
- child_node->count == 1 ? "" : "s");
+ (gint) child_node->count);
else
- text = g_strdup_printf ("%s (%d item%s)",
+ text = g_strdup_printf ((child_node->count == 1)
+ ? _("%s (%d item)")
+ : _("%s (%d items)"),
child_node->string,
- (gint) child_node->count,
- child_node->count == 1 ? "" : "s");
+ (gint) child_node->count);
gnome_canvas_item_set (child_node->text,
"text", text,
NULL);