KeyError on styled note (translation for Link); add missing link style on map

svn: r16963
This commit is contained in:
Jérôme Rapinat 2011-03-28 08:25:31 +00:00
parent 4398a0152b
commit 3c3255eac9

View File

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