no syncing
This commit is contained in:
parent
a51f9f66c1
commit
d66ed11224
2 changed files with 3 additions and 10 deletions
10
pyferea.py
10
pyferea.py
|
@ -651,19 +651,16 @@ class FeedTree(Gtk.TreeView):
|
||||||
while (it):
|
while (it):
|
||||||
itc = self.model.iter_children(it)
|
itc = self.model.iter_children(it)
|
||||||
while (itc):
|
while (itc):
|
||||||
self.mark_read(itc, sync=False)
|
self.mark_read(itc)
|
||||||
itc = self.model.iter_next(itc)
|
itc = self.model.iter_next(itc)
|
||||||
it = self.model.iter_next(it)
|
it = self.model.iter_next(it)
|
||||||
self.feeddb.sync()
|
|
||||||
|
|
||||||
def mark_read(self, it, sync=True):
|
def mark_read(self, it):
|
||||||
feedurl = self.model.get_value(it, 0)
|
feedurl = self.model.get_value(it, 0)
|
||||||
feed = self.feeddb.get_feed(feedurl)
|
feed = self.feeddb.get_feed(feedurl)
|
||||||
self.feeddb.mark_read_feed(feedurl)
|
self.feeddb.mark_read_feed(feedurl)
|
||||||
self.model.set_value(it, 1, markup_escape_text(feed['title']))
|
self.model.set_value(it, 1, markup_escape_text(feed['title']))
|
||||||
self.emit("update-feed", feedurl)
|
self.emit("update-feed", feedurl)
|
||||||
if sync:
|
|
||||||
self.feeddb.sync()
|
|
||||||
|
|
||||||
def disable_context_update(self):
|
def disable_context_update(self):
|
||||||
it = self.model.get_iter_first()
|
it = self.model.get_iter_first()
|
||||||
|
@ -690,7 +687,7 @@ class FeedTree(Gtk.TreeView):
|
||||||
mark_item = Gtk.ImageMenuItem.new_from_stock(Gtk.STOCK_APPLY, None)
|
mark_item = Gtk.ImageMenuItem.new_from_stock(Gtk.STOCK_APPLY, None)
|
||||||
mark_item.set_label(_("Mark As Read"))
|
mark_item.set_label(_("Mark As Read"))
|
||||||
def on_mark_item_activate_cb(menuitem):
|
def on_mark_item_activate_cb(menuitem):
|
||||||
self.mark_read(it, sync=True)
|
self.mark_read(it)
|
||||||
self.emit("update-feed", feedurl)
|
self.emit("update-feed", feedurl)
|
||||||
mark_item.connect("activate", on_mark_item_activate_cb)
|
mark_item.connect("activate", on_mark_item_activate_cb)
|
||||||
|
|
||||||
|
@ -741,7 +738,6 @@ class FeedTree(Gtk.TreeView):
|
||||||
def update_feed_done(self, feedurl):
|
def update_feed_done(self, feedurl):
|
||||||
self.updating.remove(feedurl)
|
self.updating.remove(feedurl)
|
||||||
if self.updating: return
|
if self.updating: return
|
||||||
self.feeddb.sync()
|
|
||||||
|
|
||||||
# enable updating via context menu
|
# enable updating via context menu
|
||||||
it = self.model.get_iter_first()
|
it = self.model.get_iter_first()
|
||||||
|
|
|
@ -103,8 +103,5 @@ class SQLStorage():
|
||||||
def close(self):
|
def close(self):
|
||||||
self.conn.close()
|
self.conn.close()
|
||||||
|
|
||||||
def sync(self):
|
|
||||||
pass
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
convert("pyferea.sqlite")
|
convert("pyferea.sqlite")
|
||||||
|
|
Loading…
Reference in a new issue