openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #13287
[Merge] lp:~meths/openlp/trivialfixes into lp:openlp
Jon Tibble has proposed merging lp:~meths/openlp/trivialfixes into lp:openlp.
Requested reviews:
OpenLP Core (openlp-core)
Related bugs:
Bug #892668 in OpenLP: "Duplicate entries in Recent Files list (win7)"
https://bugs.launchpad.net/openlp/+bug/892668
Bug #900481 in OpenLP: "Trackback on startup on Mac OS"
https://bugs.launchpad.net/openlp/+bug/900481
For more details, see:
https://code.launchpad.net/~meths/openlp/trivialfixes/+merge/85257
Fix v1 theme import when name is unicode (Bug #882819)
Then fix the logging of said themes
--
https://code.launchpad.net/~meths/openlp/trivialfixes/+merge/85257
Your team OpenLP Core is requested to review the proposed merge of lp:~meths/openlp/trivialfixes into lp:openlp.
=== modified file 'openlp/core/ui/thememanager.py'
--- openlp/core/ui/thememanager.py 2011-11-19 12:00:36 +0000
+++ openlp/core/ui/thememanager.py 2011-12-11 18:42:28 +0000
@@ -526,13 +526,11 @@
zip = zipfile.ZipFile(filename)
themename = None
for file in zip.namelist():
+ # Handle UTF-8 files
ucsfile = file_is_unicode(file)
if not ucsfile:
- critical_error_message_box(
- message=translate('OpenLP.ThemeManager',
- 'File is not a valid theme.\n'
- 'The content encoding is not UTF-8.'))
- continue
+ # Handle native Unicode files from Windows
+ ucsfile = file
osfile = unicode(QtCore.QDir.toNativeSeparators(ucsfile))
theme_dir = None
if osfile.endswith(os.path.sep):
@@ -620,7 +618,7 @@
"""
name = theme.theme_name
theme_pretty_xml = theme.extract_formatted_xml()
- log.debug(u'saveTheme %s %s', name, theme_pretty_xml)
+ log.debug(u'saveTheme %s %s', name, theme_pretty_xml.decode(u'utf-8'))
theme_dir = os.path.join(self.path, name)
check_directory_exists(theme_dir)
theme_file = os.path.join(theme_dir, name + u'.xml')
Follow ups