Rename tag

This commit is contained in:
Tim Bentley 2013-06-25 15:44:56 +01:00
parent 26e80be5b7
commit b6954eba0f
3 changed files with 15 additions and 7 deletions

View File

@ -67,8 +67,8 @@ class FormattingTags(object):
if isinstance(tag[element], unicode):
tag[element] = tag[element].encode('utf8')
# Formatting Tags were also known as display tags.
Settings().setValue(u'displayTags/html_tags', json.dumps(tags) if tags else u'')
Settings().setValue(u'displayTags/html_tags_json', True)
Settings().setValue(u'formattingTags/html_tags', json.dumps(tags) if tags else u'')
Settings().setValue(u'formattingTags/html_tags_json', True)
@staticmethod
def load_tags():
@ -160,10 +160,12 @@ class FormattingTags(object):
FormattingTags.add_html_tags(temporary_tags)
# Formatting Tags were also known as display tags.
user_expands = Settings().value(u'displayTags/html_tags')
user_format_json = Settings().value(u'displayTags/html_tags_json')
user_format_json = Settings().value(u'formattingTags/html_tags_json')
# cPickle only accepts str not unicode strings
user_expands_string = str(user_expands)
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'))
if user_expands_string:
if user_format_json:
user_tags = json.loads(user_expands_string)

View File

@ -1,9 +1,14 @@
# -*- coding: utf-8 -*-
# vim: autoindent shiftwidth=4 expandtab textwidth=120 tabstop=4 softtabstop=4
###############################################################################
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2013 Raoul Snyman #
# Portions copyright (c) 2008-2013 Tim Bentley, Gerald Britton, Jonathan #
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #

View File

@ -116,7 +116,8 @@ class Settings(QtCore.QSettings):
u'advanced/x11 bypass wm': X11_BYPASS_DEFAULT,
u'crashreport/last directory': u'',
u'displayTags/html_tags': u'',
u'displayTags/html_tags_json': False,
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,