String must be unicode for truncation to work for non ascii characters.

svn: r13175
This commit is contained in:
Peter Landgren 2009-09-08 10:01:58 +00:00
parent 37db7366c1
commit b7b5045497

View File

@ -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 )