- fixed theme copy

bzr-revno: 1668
This commit is contained in:
Andreas Preikschat 2011-06-30 16:56:55 +02:00
commit deddee5668

View File

@ -298,11 +298,10 @@ class ThemeManager(QtGui.QWidget):
Copies an existing theme to a new name Copies an existing theme to a new name
""" """
item = self.themeListWidget.currentItem() item = self.themeListWidget.currentItem()
oldThemeName = unicode( oldThemeName = unicode(item.data(QtCore.Qt.UserRole).toString())
translate('OpenLP.ThemeManager', 'Copy of %s', self.fileRenameForm.fileNameEdit.setText(
'Copy of <theme name>')) % unicode( unicode(translate('OpenLP.ThemeManager',
item.data(QtCore.Qt.UserRole).toString()) 'Copy of %s','Copy of <theme name>')) % oldThemeName)
self.fileRenameForm.fileNameEdit.setText(oldThemeName)
if self.fileRenameForm.exec_(True): if self.fileRenameForm.exec_(True):
newThemeName = unicode(self.fileRenameForm.fileNameEdit.text()) newThemeName = unicode(self.fileRenameForm.fileNameEdit.text())
if self.checkIfThemeExists(newThemeName): if self.checkIfThemeExists(newThemeName):