forked from openlp/openlp
small fix for unicode Theme names
This commit is contained in:
parent
9cdc489735
commit
0f7c997214
@ -96,9 +96,8 @@ class ThemeXML(object):
|
||||
The path name to be added.
|
||||
"""
|
||||
if self.background_filename and path:
|
||||
self.theme_name = self.theme_name.rstrip().lstrip()
|
||||
self.background_filename = \
|
||||
self.background_filename.rstrip().lstrip()
|
||||
self.theme_name = self.theme_name.strip()
|
||||
self.background_filename = self.background_filename.strip()
|
||||
self.background_filename = os.path.join(path, self.theme_name,
|
||||
self.background_filename)
|
||||
|
||||
|
@ -138,8 +138,8 @@ class AmendThemeForm(QtGui.QDialog, Ui_AmendThemeDialog):
|
||||
|
||||
def accept(self):
|
||||
new_theme = ThemeXML()
|
||||
theme_name = unicode(self.ThemeNameEdit.displayText())
|
||||
new_theme.new_document(theme_name.encode('unicode-escape'))
|
||||
theme_name = unicode(self.ThemeNameEdit.text())
|
||||
new_theme.new_document(theme_name)
|
||||
save_from = None
|
||||
save_to = None
|
||||
if self.theme.background_mode == u'transparent':
|
||||
@ -209,8 +209,8 @@ class AmendThemeForm(QtGui.QDialog, Ui_AmendThemeDialog):
|
||||
self.previewTheme()
|
||||
|
||||
def onImageToolButtonClicked(self):
|
||||
filename = QtGui.QFileDialog.getOpenFileName(
|
||||
self, translate('AmendThemeForm', 'Open File'))
|
||||
filename = unicode(QtGui.QFileDialog.getOpenFileName(
|
||||
self, translate('AmendThemeForm', 'Open File')))
|
||||
if filename:
|
||||
self.ImageLineEdit.setText(filename)
|
||||
self.theme.background_filename = filename
|
||||
|
Loading…
Reference in New Issue
Block a user