diff MainWindow.py @ 155:a05719a6175e

move common functionality into an abstract backend class, have both backends inherit from it. Implement enough of the couchdb backend that reading feeds (and marking feed entries as read) is possible
author Dirk Olmes <dirk@xanthippe.ping.de>
date Sat, 27 Aug 2011 08:52:03 +0200
parents 65c4bb6d5add
children c345a26febc2
line wrap: on
line diff
--- a/MainWindow.py	Sat Aug 27 07:32:01 2011 +0200
+++ b/MainWindow.py	Sat Aug 27 08:52:03 2011 +0200
@@ -74,10 +74,9 @@
         self.ui.actionOpenLink.setEnabled(True)
 
         row = index.row()
-        feedEntry = self.backend.selectFeedEntry(row)
+        self.backend.selectFeedEntry(row)
 
-        # TODO this is not compatible with the couchdb backend
-        if feedEntry.feed.auto_load_entry_link:
+        if self.backend.selectedFeed.auto_load_entry_link:
             self.openLinkFromSelectedEntry()
         else:
             self.openSummaryFromSelectedEntry()
@@ -93,9 +92,7 @@
         self.ui.webView.setHtml(feedEntry.summary, baseUrl)
 
     def openLinkFromSelectedEntry(self):
-        feedEntry = self.backend.selectedFeedEntry
-        # TODO this is not compatible with the couchdb backend
-        if feedEntry.feed.always_open_in_browser:
+        if self.backend.selectedFeed.always_open_in_browser:
             self.openSelectedEntryInBrowser()
         else:
             self.openSelectedEntryInWebView()