aboutsummaryrefslogtreecommitdiffstats
path: root/e-util
diff options
context:
space:
mode:
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 = ' ';