Mercurial > hg > Feedworm
comparison PreferencesDialog.py @ 218:699d8f1cebd4
unify imports, especially Qt imports. Use consistent super syntax
author | Dirk Olmes <dirk@xanthippe.ping.de> |
---|---|
date | Sun, 27 Apr 2014 06:04:57 +0200 |
parents | bb3c851b18b1 |
children | f0b5bdce1189 |
comparison
equal
deleted
inserted
replaced
217:bb3c851b18b1 | 218:699d8f1cebd4 |
---|---|
1 # -*- coding: utf-8 -*- | 1 # -*- coding: utf-8 -*- |
2 from PyQt4 import QtGui | 2 from PyQt4.QtGui import QDialog |
3 from Ui_Preferences import Ui_Preferences | 3 from Ui_Preferences import Ui_Preferences |
4 | 4 |
5 class PreferencesDialog(QtGui.QDialog): | 5 class PreferencesDialog(QDialog): |
6 def __init__(self, backend=None): | 6 def __init__(self, backend=None): |
7 QtGui.QWidget.__init__(self, None) | 7 super(PreferencesDialog, self).__init__(None) |
8 self.backend = backend | 8 self.backend = backend |
9 self.preferences = backend.preferences() | 9 self.preferences = backend.preferences() |
10 self.ui = Ui_Preferences() | 10 self.ui = Ui_Preferences() |
11 self.ui.setupUi(self) | 11 self.ui.setupUi(self) |
12 self.fillUi() | 12 self.fillUi() |
81 self.preferences.setDaysToKeepFeedEntries(text) | 81 self.preferences.setDaysToKeepFeedEntries(text) |
82 | 82 |
83 def accept(self): | 83 def accept(self): |
84 self.storeProxySettings() | 84 self.storeProxySettings() |
85 self.preferences.commit(); | 85 self.preferences.commit(); |
86 QtGui.QDialog.accept(self) | 86 super(PreferencesDialog, self).accept() |
87 | 87 |
88 def reject(self): | 88 def reject(self): |
89 self.preferences.rollback() | 89 self.preferences.rollback() |
90 QtGui.QDialog.reject(self) | 90 super(PreferencesDialog, self).reject() |
91 |