From b6954eba0f4f6d6314ed51d1ef19dc89115014f4 Mon Sep 17 00:00:00 2001 From: Tim Bentley Date: Tue, 25 Jun 2013 15:44:56 +0100 Subject: [PATCH] Rename tag --- openlp/core/lib/formattingtags.py | 12 +++++++----- openlp/core/lib/imagemanager.py | 7 ++++++- openlp/core/lib/settings.py | 3 ++- 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/openlp/core/lib/formattingtags.py b/openlp/core/lib/formattingtags.py index c136f00aa..96591e1c4 100644 --- a/openlp/core/lib/formattingtags.py +++ b/openlp/core/lib/formattingtags.py @@ -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) diff --git a/openlp/core/lib/imagemanager.py b/openlp/core/lib/imagemanager.py index 412eddd1e..f8af5d0a0 100644 --- a/openlp/core/lib/imagemanager.py +++ b/openlp/core/lib/imagemanager.py @@ -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, # diff --git a/openlp/core/lib/settings.py b/openlp/core/lib/settings.py index 427c24c58..48a3a72c1 100644 --- a/openlp/core/lib/settings.py +++ b/openlp/core/lib/settings.py @@ -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,