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.
|
The path name to be added.
|
||||||
"""
|
"""
|
||||||
if self.background_filename and path:
|
if self.background_filename and path:
|
||||||
self.theme_name = self.theme_name.rstrip().lstrip()
|
self.theme_name = self.theme_name.strip()
|
||||||
self.background_filename = \
|
self.background_filename = self.background_filename.strip()
|
||||||
self.background_filename.rstrip().lstrip()
|
|
||||||
self.background_filename = os.path.join(path, self.theme_name,
|
self.background_filename = os.path.join(path, self.theme_name,
|
||||||
self.background_filename)
|
self.background_filename)
|
||||||
|
|
||||||
|
@ -138,8 +138,8 @@ class AmendThemeForm(QtGui.QDialog, Ui_AmendThemeDialog):
|
|||||||
|
|
||||||
def accept(self):
|
def accept(self):
|
||||||
new_theme = ThemeXML()
|
new_theme = ThemeXML()
|
||||||
theme_name = unicode(self.ThemeNameEdit.displayText())
|
theme_name = unicode(self.ThemeNameEdit.text())
|
||||||
new_theme.new_document(theme_name.encode('unicode-escape'))
|
new_theme.new_document(theme_name)
|
||||||
save_from = None
|
save_from = None
|
||||||
save_to = None
|
save_to = None
|
||||||
if self.theme.background_mode == u'transparent':
|
if self.theme.background_mode == u'transparent':
|
||||||
@ -209,8 +209,8 @@ class AmendThemeForm(QtGui.QDialog, Ui_AmendThemeDialog):
|
|||||||
self.previewTheme()
|
self.previewTheme()
|
||||||
|
|
||||||
def onImageToolButtonClicked(self):
|
def onImageToolButtonClicked(self):
|
||||||
filename = QtGui.QFileDialog.getOpenFileName(
|
filename = unicode(QtGui.QFileDialog.getOpenFileName(
|
||||||
self, translate('AmendThemeForm', 'Open File'))
|
self, translate('AmendThemeForm', 'Open File')))
|
||||||
if filename:
|
if filename:
|
||||||
self.ImageLineEdit.setText(filename)
|
self.ImageLineEdit.setText(filename)
|
||||||
self.theme.background_filename = filename
|
self.theme.background_filename = filename
|
||||||
|
Loading…
Reference in New Issue
Block a user