This commit is contained in:
Kovid Goyal 2014-07-10 08:29:38 +05:30
parent 0d47072f4c
commit 30d4453a7b
2 changed files with 2 additions and 2 deletions

View File

@ -272,7 +272,6 @@ def create_formats(highlighter):
'class_selector': theme['Special'], 'class_selector': theme['Special'],
'pseudo_selector': theme['Special'], 'pseudo_selector': theme['Special'],
'tag': theme['Identifier'], 'tag': theme['Identifier'],
'link': theme['Link'],
} }
for name, msg in { for name, msg in {
'unknown-normal': _('Invalid text'), 'unknown-normal': _('Invalid text'),
@ -280,6 +279,7 @@ def create_formats(highlighter):
}.iteritems(): }.iteritems():
f = formats[name] = syntax_text_char_format(formats['error']) f = formats[name] = syntax_text_char_format(formats['error'])
f.setToolTip(msg) f.setToolTip(msg)
formats['link'] = syntax_text_char_format(theme['Link'])
formats['link'].setToolTip(_('Hold down the Ctrl key and click to open this link')) formats['link'].setToolTip(_('Hold down the Ctrl key and click to open this link'))
formats['link'].setProperty(LINK_PROPERTY, True) formats['link'].setProperty(LINK_PROPERTY, True)
return formats return formats

View File

@ -508,7 +508,6 @@ def create_formats(highlighter, add_css=True):
'preproc': t['PreProc'], 'preproc': t['PreProc'],
'nbsp': t['SpecialCharacter'], 'nbsp': t['SpecialCharacter'],
'spell': t['SpellError'], 'spell': t['SpellError'],
'link': t['Link'],
} }
for name, msg in { for name, msg in {
'<': _('An unescaped < is not allowed. Replace it with &lt;'), '<': _('An unescaped < is not allowed. Replace it with &lt;'),
@ -527,6 +526,7 @@ def create_formats(highlighter, add_css=True):
if add_css: if add_css:
formats['css_sub_formats'] = create_css_formats(highlighter) formats['css_sub_formats'] = create_css_formats(highlighter)
formats['spell'].setProperty(SPELL_PROPERTY, True) formats['spell'].setProperty(SPELL_PROPERTY, True)
formats['link'] = syntax_text_char_format(t['Link'])
formats['link'].setProperty(LINK_PROPERTY, True) formats['link'].setProperty(LINK_PROPERTY, True)
formats['link'].setToolTip(_('Hold down the Ctrl key and click to open this link')) formats['link'].setToolTip(_('Hold down the Ctrl key and click to open this link'))
return formats return formats