From 36f9b37e4e565db0a2b42f7163e5acb92ad2f23e Mon Sep 17 00:00:00 2001 From: Tim G L Lyons Date: Fri, 17 Feb 2012 18:04:54 +0000 Subject: [PATCH] GEDCOM import: make generated GEDCOM notes monospaced svn: r18917 --- src/plugins/lib/libgedcom.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/plugins/lib/libgedcom.py b/src/plugins/lib/libgedcom.py index 9c6e44dad..9116a67a4 100644 --- a/src/plugins/lib/libgedcom.py +++ b/src/plugins/lib/libgedcom.py @@ -124,6 +124,7 @@ from DateHandler._DateParser import DateParser from gen.db.dbconst import EVENT_KEY from QuestionDialog import WarningDialog, InfoDialog from gen.lib.const import IDENTICAL, DIFFERENT +from gen.lib import (StyledText, StyledTextTag, StyledTextTagType) #------------------------------------------------------------------------- # @@ -2820,7 +2821,11 @@ class GedcomParser(UpdateCallback): return message = _("Records not imported into ") + record_name + ":\n\n" + \ state.msg - new_note = gen.lib.Note(message) + new_note = gen.lib.Note() + tag = StyledTextTag(StyledTextTagType.FONTFACE, 'Monospace', + [(0, len(message))]) + text = StyledText(message, [tag]) + new_note.set_styledtext(text) new_note.set_handle(Utils.create_id()) note_type = gen.lib.NoteType() note_type.set((gen.lib.NoteType.CUSTOM, _("GEDCOM import")))