Revert Changes

This commit is contained in:
Tim Bentley 2010-07-09 21:27:18 +01:00
parent b438cb22a5
commit 9d77444ddf
3 changed files with 9 additions and 28 deletions

View File

@ -646,20 +646,13 @@ class Ui_AmendThemeDialog(object):
QtGui.QDialogButtonBox.Ok)
self.ThemeButtonBox.setObjectName(u'ThemeButtonBox')
self.AmendThemeLayout.addWidget(self.ThemeButtonBox)
self.SaveAsButton = QtGui.QPushButton(
translate('AmendThemeForm','Save &as'))
self.SaveAsButton.setCheckable(True)
self.SaveAsButton.setAutoDefault(False)
self.ThemeButtonBox.addButton(self.SaveAsButton,
QtGui.QDialogButtonBox.ActionRole)
self.retranslateUi(AmendThemeDialog)
self.ThemeTabWidget.setCurrentIndex(0)
QtCore.QObject.connect(self.ThemeButtonBox,
QtCore.SIGNAL(u'accepted()'), AmendThemeDialog.accept)
QtCore.QObject.connect(self.ThemeButtonBox,
QtCore.SIGNAL(u'rejected()'), AmendThemeDialog.reject)
QtCore.QObject.connect(self.SaveAsButton,
QtCore.SIGNAL(u'clicked()'), AmendThemeDialog.saveAs)
QtCore.QMetaObject.connectSlotsByName(AmendThemeDialog)
AmendThemeDialog.setTabOrder(self.ThemeButtonBox, self.ThemeNameEdit)
AmendThemeDialog.setTabOrder(self.ThemeNameEdit, self.ThemeTabWidget)

View File

@ -137,12 +137,6 @@ class AmendThemeForm(QtGui.QDialog, Ui_AmendThemeDialog):
QtCore.SIGNAL(u'stateChanged(int)'),
self.onSlideTransitionCheckBoxChanged)
def saveAs(self):
self.ThemeNameEdit.setEnabled(True)
self.SaveAsButton.setEnabled(False)
self.ThemeNameEdit.setText(u'')
self.ThemeNameEdit.setFocus()
def accept(self):
new_theme = ThemeXML()
theme_name = unicode(self.ThemeNameEdit.text())
@ -206,7 +200,7 @@ class AmendThemeForm(QtGui.QDialog, Ui_AmendThemeDialog):
save_from, save_to) is not False:
return QtGui.QDialog.accept(self)
def loadTheme(self, theme, newTheme=False):
def loadTheme(self, theme):
log.debug(u'LoadTheme %s', theme)
self.theme = theme
# Stop the initial screen setup generating 1 preview per field!
@ -214,12 +208,6 @@ class AmendThemeForm(QtGui.QDialog, Ui_AmendThemeDialog):
self.paintUi(self.theme)
self.allowPreview = True
self.previewTheme()
self.ThemeNameEdit.setEnabled(True)
self.SaveAsButton.setEnabled(False)
if not newTheme:
self.ThemeNameEdit.setEnabled(False)
self.SaveAsButton.setEnabled(True)
def onImageToolButtonClicked(self):
images_filter = get_images_filter()

View File

@ -173,7 +173,7 @@ class ThemeManager(QtGui.QWidget):
editing form for the user to make their customisations.
"""
theme = self.createThemeFromXml(self.baseTheme(), self.path)
self.amendThemeForm.loadTheme(theme, True)
self.amendThemeForm.loadTheme(theme)
self.saveThemeName = u''
self.amendThemeForm.exec_()