From b7b50454971a4e1cf1c2e5d514b635d65b56c6a8 Mon Sep 17 00:00:00 2001 From: Peter Landgren Date: Tue, 8 Sep 2009 10:01:58 +0000 Subject: [PATCH] String must be unicode for truncation to work for non ascii characters. svn: r13175 --- src/PluginUtils/_GuiOptions.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/PluginUtils/_GuiOptions.py b/src/PluginUtils/_GuiOptions.py index e6ff8a6b2..bc31f8eba 100644 --- a/src/PluginUtils/_GuiOptions.py +++ b/src/PluginUtils/_GuiOptions.py @@ -688,10 +688,10 @@ class GuiNoteOption(gtk.HBox): if note: note_id = note.get_gramps_id() txt = " ".join(note.get().split()) + #String must be unicode for truncation to work for non ascii characters + txt = unicode(txt) if len(txt) > 35: - txt = txt[:35]+"..." - else: - txt = txt + txt = txt[:35] + "..." txt = "%s [%s]" % (txt, note_id) self.__note_label.set_text( txt )