aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChyla Zbigniew <chyla@src.gnome.org>2001-08-25 22:21:41 +0800
committerChyla Zbigniew <chyla@src.gnome.org>2001-08-25 22:21:41 +0800
commitd30a9fe66f53affdf3e01141996572a9448a10fc (patch)
treef120279259d40656c7bb5837fa2adc6b531c12c2
parent2e9a3cadccaac442173c4527f0ba492d29501a64 (diff)
downloadgsoc2013-evolution-d30a9fe66f53affdf3e01141996572a9448a10fc.tar.gz
gsoc2013-evolution-d30a9fe66f53affdf3e01141996572a9448a10fc.tar.zst
gsoc2013-evolution-d30a9fe66f53affdf3e01141996572a9448a10fc.zip
Convert UTF-8 strings to locale's encoding before putting them in canvas
* e-table-group-container.c (compute_text): Convert UTF-8 strings to locale's encoding before putting them in canvas item. svn path=/trunk/; revision=12472
-rw-r--r--widgets/table/e-table-group-container.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/widgets/table/e-table-group-container.c b/widgets/table/e-table-group-container.c
index ce10fbf9a8..8eca550d6b 100644
--- a/widgets/table/e-table-group-container.c
+++ b/widgets/table/e-table-group-container.c
@@ -20,6 +20,7 @@
#include "gal/util/e-util.h"
#include "gal/widgets/e-canvas.h"
#include "gal/widgets/e-canvas-utils.h"
+#include "gal/widgets/e-unicode.h"
#include "gal/e-text/e-text.h"
#include "e-table-defines.h"
@@ -331,20 +332,27 @@ etgc_unrealize (GnomeCanvasItem *item)
static void
compute_text (ETableGroupContainer *etgc, ETableGroupContainerChildNode *child_node)
{
- gchar *text;
- if (etgc->ecol->text)
+ gchar *text, *s1, *s2;
+
+ if (etgc->ecol->text) {
+ s1 = e_utf8_to_locale_string (etgc->ecol->text);
+ s2 = e_utf8_to_locale_string (child_node->string);
text = g_strdup_printf ((child_node->count == 1)
? _("%s : %s (%d item)")
: _("%s : %s (%d items)"),
- etgc->ecol->text,
- child_node->string,
+ s1, s2,
(gint) child_node->count);
- else
+ g_free (s1);
+ g_free (s2);
+ } else {
+ s1 = e_utf8_to_locale_string (child_node->string);
text = g_strdup_printf ((child_node->count == 1)
? _("%s (%d item)")
: _("%s (%d items)"),
- child_node->string,
+ s1,
(gint) child_node->count);
+ g_free (s1);
+ }
gnome_canvas_item_set (child_node->text,
"text", text,
NULL);