clean up tags

This commit is contained in:
Tim Bentley 2013-06-30 06:30:42 +01:00
parent b6954eba0f
commit 96fbb5ddbb
2 changed files with 2 additions and 13 deletions

View File

@ -158,19 +158,10 @@ class FormattingTags(object):
u'end html': u'', u'protected': True, u'temporary': False})
FormattingTags.add_html_tags(base_tags)
FormattingTags.add_html_tags(temporary_tags)
# Formatting Tags were also known as display tags.
user_format_json = Settings().value(u'formattingTags/html_tags_json')
# cPickle only accepts str not unicode strings
if user_format_json:
user_expands_string = str(Settings().value(u'formattingTags/html_tags'))
else:
user_expands_string = str(Settings().value(u'displayTags/html_tags'))
user_expands_string = str(Settings().value(u'formattingTags/html_tags'))
if user_expands_string:
if user_format_json:
user_tags = json.loads(user_expands_string)
else:
user_tags = cPickle.loads(user_expands_string)
user_tags = json.loads(user_expands_string)
for tag in user_tags:
for element in tag:
if isinstance(tag[element], str):

View File

@ -115,9 +115,7 @@ class Settings(QtCore.QSettings):
u'advanced/single click preview': False,
u'advanced/x11 bypass wm': X11_BYPASS_DEFAULT,
u'crashreport/last directory': u'',
u'displayTags/html_tags': u'',
u'formattingTags/html_tags': u'',
u'formattingTags/html_tags_json': False,
u'core/audio repeat list': False,
u'core/auto open': False,
u'core/auto preview': False,