From 6d14ba233c435c930c3ae8460cf97e890c508ae5 Mon Sep 17 00:00:00 2001 From: Peter Landgren Date: Tue, 8 Sep 2009 10:13:48 +0000 Subject: [PATCH] String must be unicode for truncation to work for non ascii characters. svn: r13176 --- src/Editors/ObjectEntries.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Editors/ObjectEntries.py b/src/Editors/ObjectEntries.py index 245131da7..c7086566d 100644 --- a/src/Editors/ObjectEntries.py +++ b/src/Editors/ObjectEntries.py @@ -384,10 +384,10 @@ class NoteEntry(ObjEntry): def get_label(self, note): 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] + "..." return "%s [%s]" % (txt, note.gramps_id) def call_editor(self, obj=None):