aboutsummaryrefslogtreecommitdiffstats
path: root/widgets
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@ximian.com>2001-10-03 07:39:03 +0800
committerChris Lahey <clahey@src.gnome.org>2001-10-03 07:39:03 +0800
commit7d2487975feeee0be69890e92fe3eca609fe25c3 (patch)
treefafa20ef17dea20f258a1607ab4e1b703fcf929c /widgets
parentf88a537b586a44540327812e3054fdab32bb03a0 (diff)
downloadgsoc2013-evolution-7d2487975feeee0be69890e92fe3eca609fe25c3.tar
gsoc2013-evolution-7d2487975feeee0be69890e92fe3eca609fe25c3.tar.gz
gsoc2013-evolution-7d2487975feeee0be69890e92fe3eca609fe25c3.tar.bz2
gsoc2013-evolution-7d2487975feeee0be69890e92fe3eca609fe25c3.tar.lz
gsoc2013-evolution-7d2487975feeee0be69890e92fe3eca609fe25c3.tar.xz
gsoc2013-evolution-7d2487975feeee0be69890e92fe3eca609fe25c3.tar.zst
gsoc2013-evolution-7d2487975feeee0be69890e92fe3eca609fe25c3.zip
Transcode empty message from utf8 to gtk charset. Fixes Ximian bug #2468.
2001-10-02 Christopher James Lahey <clahey@ximian.com> * gal/widgets/e-reflow.c (set_empty): Transcode empty message from utf8 to gtk charset. Fixes Ximian bug #2468. svn path=/trunk/; revision=13360
Diffstat (limited to 'widgets')
-rw-r--r--widgets/misc/e-reflow.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/widgets/misc/e-reflow.c b/widgets/misc/e-reflow.c
index 126f9d7dfd..3674b6d11f 100644
--- a/widgets/misc/e-reflow.c
+++ b/widgets/misc/e-reflow.c
@@ -30,6 +30,7 @@
#include "e-canvas.h"
#include "gal/e-text/e-text.h"
#include "gal/util/e-util.h"
+#include "gal/widgets/e-unicode.h"
#include <gtk/gtksignal.h>
#include "e-selection-model-simple.h"
@@ -347,19 +348,22 @@ set_empty(EReflow *reflow)
if (reflow->count == 0) {
if (reflow->empty_text) {
if (reflow->empty_message) {
+ char *empty_message = e_utf8_to_gtk_string (GTK_WIDGET (GNOME_CANVAS_ITEM (reflow)->canvas), reflow->empty_message);
gnome_canvas_item_set(reflow->empty_text,
"width", reflow->minimum_width,
- "text", reflow->empty_message,
+ "text", empty_message,
NULL);
e_canvas_item_move_absolute(reflow->empty_text,
reflow->minimum_width / 2,
0);
+ g_free (empty_message);
} else {
gtk_object_destroy(GTK_OBJECT(reflow->empty_text));
reflow->empty_text = NULL;
}
} else {
- if (reflow->empty_message)
+ if (reflow->empty_message) {
+ char *empty_message = e_utf8_to_gtk_string (GTK_WIDGET (GNOME_CANVAS_ITEM (reflow)->canvas), reflow->empty_message);
reflow->empty_text =
gnome_canvas_item_new(GNOME_CANVAS_GROUP(reflow),
e_text_get_type(),
@@ -370,12 +374,14 @@ set_empty(EReflow *reflow)
"font_gdk", GTK_WIDGET(GNOME_CANVAS_ITEM(reflow)->canvas)->style->font,
"fill_color", "black",
"justification", GTK_JUSTIFY_CENTER,
- "text", reflow->empty_message,
+ "text", empty_message,
"draw_background", FALSE,
NULL);
- e_canvas_item_move_absolute(reflow->empty_text,
- reflow->minimum_width / 2,
- 0);
+ g_free (empty_message);
+ e_canvas_item_move_absolute(reflow->empty_text,
+ reflow->minimum_width / 2,
+ 0);
+ }
}
} else {
if (reflow->empty_text) {