From 3c3255eac94a41e13b85c95fc60c66d17df3ea27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Rapinat?= Date: Mon, 28 Mar 2011 08:25:31 +0000 Subject: [PATCH] KeyError on styled note (translation for Link); add missing link style on map svn: r16963 --- src/gui/widgets/styledtextbuffer.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gui/widgets/styledtextbuffer.py b/src/gui/widgets/styledtextbuffer.py index 0855aaa0e..e052f4eaa 100644 --- a/src/gui/widgets/styledtextbuffer.py +++ b/src/gui/widgets/styledtextbuffer.py @@ -66,6 +66,7 @@ ALLOWED_STYLES = ( StyledTextTagType.HIGHLIGHT, StyledTextTagType.FONTFACE, StyledTextTagType.FONTSIZE, + StyledTextTagType.LINK, ) STYLE_TO_PROPERTY = { @@ -76,6 +77,7 @@ STYLE_TO_PROPERTY = { StyledTextTagType.HIGHLIGHT: 'background', StyledTextTagType.FONTFACE: 'family', StyledTextTagType.FONTSIZE: 'size-points', + StyledTextTagType.LINK: 'link', } (MATCH_START, @@ -553,7 +555,7 @@ class StyledTextBuffer(UndoableBuffer): s_tags = s_text.get_tags() for s_tag in s_tags: - if s_tag.name == 'Link': + if s_tag.name == _('Link'): g_tag = LinkTag(self, s_tag.value, foreground="blue", underline=UNDERLINE_SINGLE)