diff --git a/src/gui/editors/displaytabs/namemodel.py b/src/gui/editors/displaytabs/namemodel.py index b67e08ed8..9cd771d38 100644 --- a/src/gui/editors/displaytabs/namemodel.py +++ b/src/gui/editors/displaytabs/namemodel.py @@ -137,7 +137,7 @@ class NameModel(gtk.TreeStore): nlist = name.get_note_list() if nlist: note = self.db.get_note_from_handle(nlist[0]) - text = note.get().replace('\n', ' ') + text = note.get().replace(u'\n', u' ') if len(text) > 80: text = text[:80]+"..." return text diff --git a/src/gui/editors/displaytabs/notemodel.py b/src/gui/editors/displaytabs/notemodel.py index c30b14eba..0d87fea8a 100644 --- a/src/gui/editors/displaytabs/notemodel.py +++ b/src/gui/editors/displaytabs/notemodel.py @@ -39,7 +39,7 @@ class NoteModel(gtk.ListStore): self.db = db for handle in note_list: note = self.db.get_note_from_handle(handle) - text = note.get().replace('\n', ' ') + text = note.get().replace(u'\n', u' ') if len(text) > 80: text = text[:80]+"..." self.append(row=[ diff --git a/src/gui/editors/objectentries.py b/src/gui/editors/objectentries.py index 672cf987f..dbfd41ff5 100644 --- a/src/gui/editors/objectentries.py +++ b/src/gui/editors/objectentries.py @@ -385,9 +385,7 @@ class NoteEntry(ObjEntry): return self.db.get_note_from_handle(handle) 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) + txt = u" ".join(note.get().split()) if len(txt) > 35: txt = txt[:35] + "..." return "%s [%s]" % (txt, note.gramps_id)