From de975c303ae18d449e5f25d692afdc9bfc52d1bd Mon Sep 17 00:00:00 2001 From: Lauris Kaplinski Date: Wed, 7 Feb 2001 19:57:19 +0000 Subject: Added Akira's japanese etc. encodings to e-font svn path=/trunk/; revision=8056 --- widgets/misc/e-unicode.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'widgets/misc/e-unicode.c') diff --git a/widgets/misc/e-unicode.c b/widgets/misc/e-unicode.c index 0cb889e323..13a700489f 100644 --- a/widgets/misc/e-unicode.c +++ b/widgets/misc/e-unicode.c @@ -16,6 +16,7 @@ #include #include #include +#include #include "e-unicode.h" #include "e-font.h" @@ -186,15 +187,19 @@ e_utf8_from_gtk_event_key (GtkWidget *widget, guint keyval, const gchar *string) gchar *utf; gint unilen; - unival = gdk_keyval_to_unicode (keyval); + if (keyval == GDK_VoidSymbol) { + utf = e_utf8_from_gtk_string (widget, string); + } else { + unival = gdk_keyval_to_unicode (keyval); - if (unival < ' ') return NULL; + if (unival < ' ') return NULL; - utf = g_new (gchar, 7); + utf = g_new (gchar, 7); - unilen = g_unichar_to_utf8 (unival, utf); + unilen = g_unichar_to_utf8 (unival, utf); - utf[unilen] = '\0'; + utf[unilen] = '\0'; + } return utf; } -- cgit v1.2.3