diff --git a/straw/FeedListView.py b/straw/FeedListView.py index 2c66fec..51e15cf 100644 --- a/straw/FeedListView.py +++ b/straw/FeedListView.py @@ -525,7 +525,7 @@ class FeedsView(MVP.WidgetView): self.foreach_selected(lambda o,*args: o.feed.router.stop_polling()) def on_menu_mark_all_as_read_activate(self, *args): - self.foreach_selected(lambda o,*args: o.feed.mark_items_as_read()) + self.foreach_selected(lambda o,*args: o.node.mark_items_as_read()) def on_remove_selected_feed(self, *args): nodes = [tv_node for tv_node in self.selected()] diff --git a/straw/model/__init__.py b/straw/model/__init__.py index fc4cf6f..1bf46ae 100644 --- a/straw/model/__init__.py +++ b/straw/model/__init__.py @@ -269,6 +269,10 @@ class Feed(Node): else: self.props.unread_count += 1 + def mark_items_as_read(self): + for item in self.items: + item.set_property("is_read", True) + class Item(GObject): persistent_properties = [ "id", "title", "feed_id", "is_read", "link", "pub_date", "description" ] persistent_table = "items"