Fix up Theme form parentage.

bzr-revno: 870
This commit is contained in:
Raoul Snyman 2010-06-22 09:08:31 +02:00
commit 817e75898e
2 changed files with 5 additions and 5 deletions

View File

@ -37,9 +37,9 @@ log = logging.getLogger(u'AmendThemeForm')
class AmendThemeForm(QtGui.QDialog, Ui_AmendThemeDialog):
def __init__(self, thememanager, parent=None):
def __init__(self, parent):
QtGui.QDialog.__init__(self, parent)
self.thememanager = thememanager
self.thememanager = parent
self.path = None
self.theme = ThemeXML()
self.setupUi(self)

View File

@ -66,7 +66,7 @@ class ThemeManager(QtGui.QWidget):
translate('ThemeManager', 'Delete a theme.'), self.onDeleteTheme)
self.Toolbar.addSeparator()
self.Toolbar.addToolbarButton(
translate('ThemeManager', 'Import Theme'),
translate('ThemeManager', 'Import Theme'),
u':/general/general_import.png',
translate('ThemeManager', 'Import a theme.'), self.onImportTheme)
self.Toolbar.addToolbarButton(
@ -211,7 +211,7 @@ class ThemeManager(QtGui.QWidget):
else:
for plugin in self.parent.plugin_manager.plugins:
if not plugin.can_delete_theme(theme):
QtGui.QMessageBox.critical(self,
QtGui.QMessageBox.critical(self,
translate('ThemeManager', 'Error'),
unicode(translate('ThemeManager',
'Theme %s is use in %s plugin.')) % \
@ -248,7 +248,7 @@ class ThemeManager(QtGui.QWidget):
"""
item = self.ThemeListWidget.currentItem()
if item is None:
QtGui.QMessageBox.critical(self,
QtGui.QMessageBox.critical(self,
translate('ThemeManager', 'Error'),
translate('ThemeManager', 'You have not selected a theme.'))
return