# HG changeset patch # User Dirk Olmes # Date 1279850770 -7200 # Node ID c82f5538733c83c7a95bad8b9b287d05f2d4e92a # Parent 0f9b3e57cff0b476120aa8289bf7a4ab1bd8ef7a add a menu item to mark all entries in a feed as read diff -r 0f9b3e57cff0 -r c82f5538733c Feed.py --- a/Feed.py Tue May 18 03:17:06 2010 +0200 +++ b/Feed.py Fri Jul 23 04:06:10 2010 +0200 @@ -29,3 +29,7 @@ def incrementNextUpdateDate(self): delta = timedelta(minutes=self.update_interval) self.next_update = datetime.now() + delta + + def toggleRead(self): + for entry in self.entries: + entry.toggleRead() \ No newline at end of file diff -r 0f9b3e57cff0 -r c82f5538733c MainWindow.py --- a/MainWindow.py Tue May 18 03:17:06 2010 +0200 +++ b/MainWindow.py Fri Jul 23 04:06:10 2010 +0200 @@ -35,6 +35,7 @@ self.selectedFeed = self.allFeeds[index.row()] self.ui.actionFeedSettings.setEnabled(True) + self.ui.actionMarkFeedRead.setEnabled(True) self.sortedEntries = self.selectedFeed.entriesSortedByUpdateDate() model = DisplayModel(self, self.sortedEntries, FeedEntry.userPresentableString) @@ -67,6 +68,11 @@ self.selectedEntry.toggleRead() self.session.commit() self.ui.feedList.update() + + def toggleReadOnSelectedFeed(self): + self.selectedFeed.toggleRead() + self.session.commit() + self.ui.feedEntryList.update() def addFeed(self): addFeed = AddFeed(self.session) diff -r 0f9b3e57cff0 -r c82f5538733c Ui_MainWindow.ui --- a/Ui_MainWindow.ui Tue May 18 03:17:06 2010 +0200 +++ b/Ui_MainWindow.ui Fri Jul 23 04:06:10 2010 +0200 @@ -63,6 +63,8 @@ Feed + + @@ -80,6 +82,7 @@ Feedworm + @@ -153,6 +156,45 @@ Settings ... + + + false + + + Mark all read + + + Mark all articles in current feed as read + + + Ctrl+M + + + + + false + + + Update + + + Update selected feed + + + Ctrl+U + + + + + false + + + Update feeds + + + Ctrl+Shift+U + + @@ -309,6 +351,22 @@ + + actionMarkFeedRead + activated() + MainWindow + toggleReadOnSelectedFeed() + + + -1 + -1 + + + 495 + 374 + + + addFeed() @@ -319,5 +377,6 @@ openLinkFromSelectedEntry() showPreferences() showFeedSettings() + toggleReadOnSelectedFeed()