aboutsummaryrefslogtreecommitdiffstats
path: root/e-util
diff options
context:
space:
mode:
authorLauris Kaplinski <lauris@src.gnome.org>2000-08-23 10:56:59 +0800
committerLauris Kaplinski <lauris@src.gnome.org>2000-08-23 10:56:59 +0800
commitb906c345f9c03db2c3786e6570d3728c12a00be9 (patch)
tree007fc5e5c368642a2aa711fae952186227ac07ad /e-util
parent049c61546b2ec5910b85f8dc059aba5f0b0fcada (diff)
downloadgsoc2013-evolution-b906c345f9c03db2c3786e6570d3728c12a00be9.tar
gsoc2013-evolution-b906c345f9c03db2c3786e6570d3728c12a00be9.tar.gz
gsoc2013-evolution-b906c345f9c03db2c3786e6570d3728c12a00be9.tar.bz2
gsoc2013-evolution-b906c345f9c03db2c3786e6570d3728c12a00be9.tar.lz
gsoc2013-evolution-b906c345f9c03db2c3786e6570d3728c12a00be9.tar.xz
gsoc2013-evolution-b906c345f9c03db2c3786e6570d3728c12a00be9.tar.zst
gsoc2013-evolution-b906c345f9c03db2c3786e6570d3728c12a00be9.zip
UTF-8 in contact editor + some fixes for dealing with illegal strings
svn path=/trunk/; revision=4976
Diffstat (limited to 'e-util')
-rw-r--r--e-util/ChangeLog8
-rw-r--r--e-util/e-font.c6
2 files changed, 14 insertions, 0 deletions
diff --git a/e-util/ChangeLog b/e-util/ChangeLog
index 42ffd785d4..837a080fb3 100644
--- a/e-util/ChangeLog
+++ b/e-util/ChangeLog
@@ -1,6 +1,14 @@
2000-08-22 Lauris Kaplinski <lauris@helixcode.com>
* e-unicode.h:
+ * e-unicode.c: e_utf8_gtk_editable_get_chars
+ e_utf8_gtk_entry_get_text
+ e_utf8_gtk_entry_set_text
+ e_utf8_to_gtk_string: New convenience functions
+
+2000-08-22 Lauris Kaplinski <lauris@helixcode.com>
+
+ * e-unicode.h:
* e-unicode.c: Some convenience functions to deal with Gtk+ and UTF-8
* Makefile.am: Added e-unicode.h, e-unicode.c
diff --git a/e-util/e-font.c b/e-util/e-font.c
index a13f0b962c..35b9d4db72 100644
--- a/e-util/e-font.c
+++ b/e-util/e-font.c
@@ -95,6 +95,9 @@ e_font_utf8_text_width (EFont *font, EFontStyle style, char *text, int numbytes)
gchar *p;
gint uni, len;
+ g_return_val_if_fail (font != NULL, 0);
+ g_return_val_if_fail (text != NULL, 0);
+
iso = alloca (numbytes);
for (len = 0, p = text; p != NULL && p < (text + numbytes); len++, p = unicode_next_utf8 (p)) {
@@ -112,6 +115,9 @@ e_font_utf8_char_width (EFont *font, EFontStyle style, char *text)
unicode_char_t uni;
guchar iso;
+ g_return_val_if_fail (font != NULL, 0);
+ g_return_val_if_fail (text != NULL, 0);
+
if (!unicode_get_utf8 (text, &uni)) return 0;
if ((uni < ' ') || (uni > 255)) uni = ' ';