comparison MainWindow.py @ 71:228da10cc98b

MainWindow relies on FeedList to get the feeds to display now. FeedList has two inner/private classes: one for returning all known feeds and one to return only feeds with unread entries.
author Dirk Olmes <dirk@xanthippe.ping.de>
date Wed, 11 Aug 2010 03:10:32 +0200
parents db35ab7753f0
children 1e6f6ed38dd0
comparison
equal deleted inserted replaced
70:842727971796 71:228da10cc98b
8 from Preferences import Preferences 8 from Preferences import Preferences
9 from PreferencesDialog import PreferencesDialog 9 from PreferencesDialog import PreferencesDialog
10 from PyQt4 import QtGui 10 from PyQt4 import QtGui
11 from PyQt4.QtCore import QUrl 11 from PyQt4.QtCore import QUrl
12 from Ui_MainWindow import Ui_MainWindow 12 from Ui_MainWindow import Ui_MainWindow
13 import FeedList
13 import subprocess 14 import subprocess
14 15
15 STATUS_MESSAGE_DISPLAY_MILLIS = 20000 16 STATUS_MESSAGE_DISPLAY_MILLIS = 20000
16 17
17 class MainWindow(QtGui.QMainWindow): 18 class MainWindow(QtGui.QMainWindow):
22 self.ui = Ui_MainWindow() 23 self.ui = Ui_MainWindow()
23 self.ui.setupUi(self) 24 self.ui.setupUi(self)
24 self.updateFeedList() 25 self.updateFeedList()
25 self.initFeedEntryList() 26 self.initFeedEntryList()
26 27
27 def updateFeedList(self): 28 def updateFeedList(self):
28 self.allFeeds = Feed.all(self.session) 29 self.allFeeds = FeedList.getFeeds(self.session)
29 feedModel = DisplayModel(self, self.allFeeds, Feed.userPresentableString) 30 feedModel = DisplayModel(self, self.allFeeds, Feed.userPresentableString)
30 self.ui.feedList.setModel(feedModel) 31 self.ui.feedList.setModel(feedModel)
31 self.ui.feedList.update() 32 self.ui.feedList.update()
32 33
33 def initFeedEntryList(self): 34 def initFeedEntryList(self):