comparison FeedSettings.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 8e73a8ae863f
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_FeedSettings import Ui_FeedSettings 3 from Ui_FeedSettings import Ui_FeedSettings
4 4
5 class FeedSettings(QtGui.QDialog): 5 class FeedSettings(QDialog):
6 """ 6 """
7 Copy all feed properties into the GUI on initialization. Collect all changes 7 Copy all feed properties into the GUI on initialization. Collect all changes
8 in a separate dict that's passed into the backend along with the feed to modify. 8 in a separate dict that's passed into the backend along with the feed to modify.
9 """ 9 """
10 def __init__(self, backend): 10 def __init__(self, backend):
11 QtGui.QWidget.__init__(self, None) 11 super(FeedSettings, self).__init__(None)
12 self.backend = backend 12 self.backend = backend
13 self.feed = backend.selectedFeed 13 self.feed = backend.selectedFeed
14 self.changes = {} 14 self.changes = {}
15 self.ui = Ui_FeedSettings() 15 self.ui = Ui_FeedSettings()
16 self.ui.setupUi(self) 16 self.ui.setupUi(self)
43 else: 43 else:
44 self.changes["always_open_in_browser"] = False 44 self.changes["always_open_in_browser"] = False
45 45
46 def accept(self): 46 def accept(self):
47 self.backend.updateFeed(self.feed, self.changes) 47 self.backend.updateFeed(self.feed, self.changes)
48 QtGui.QDialog.accept(self) 48 super(FeedSettings, self).accept()