Mercurial > hg > Feedworm
comparison MainWindow.py @ 122:f5afe0c1f4d2 backend
move more operations to the backend
author | Dirk Olmes <dirk@xanthippe.ping.de> |
---|---|
date | Sun, 21 Aug 2011 18:39:02 +0200 |
parents | 510a5d00e98a |
children | 862760b161b4 |
comparison
equal
deleted
inserted
replaced
121:510a5d00e98a | 122:f5afe0c1f4d2 |
---|---|
115 # TODO make browser configurable | 115 # TODO make browser configurable |
116 browser = "/usr/local/bin/opera" | 116 browser = "/usr/local/bin/opera" |
117 subprocess.Popen([browser, self.selectedEntry.link]) | 117 subprocess.Popen([browser, self.selectedEntry.link]) |
118 | 118 |
119 def toggleReadOnSelectedEntry(self): | 119 def toggleReadOnSelectedEntry(self): |
120 self.selectedEntry.toggleRead() | 120 self.backend.toggleRead(self.selectedEntry) |
121 self.session.commit() | |
122 self.ui.feedEntryList.doItemsLayout() | 121 self.ui.feedEntryList.doItemsLayout() |
123 | 122 |
124 def markSelectedFeedRead(self): | 123 def markSelectedFeedRead(self): |
125 self.selectedFeed.markAllEntriesRead() | 124 self.backend.markAllEntriesRead(self.selectedFeed) |
126 self.session.commit() | |
127 self.ui.feedEntryList.doItemsLayout() | 125 self.ui.feedEntryList.doItemsLayout() |
128 | 126 |
129 def markSelectedEntriesRead(self): | 127 def markSelectedEntriesRead(self): |
130 selectedIndexes = self.ui.feedEntryList.selectedIndexes() | 128 selectedIndexes = self.ui.feedEntryList.selectedIndexes() |
131 for index in selectedIndexes: | 129 for index in selectedIndexes: |