|
|
|
@ -161,6 +161,8 @@ class LeftPane(urwid.ListBox):
|
|
|
|
def markAsRead(self):
|
|
|
|
def markAsRead(self):
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
focus_widget, idx = self.get_focus()
|
|
|
|
focus_widget, idx = self.get_focus()
|
|
|
|
|
|
|
|
if self.processAttrMap(focus_widget.attr_map)[0] == "Favorites":
|
|
|
|
|
|
|
|
return
|
|
|
|
del self.body[idx]
|
|
|
|
del self.body[idx]
|
|
|
|
if idx > 0:
|
|
|
|
if idx > 0:
|
|
|
|
idx -= 1
|
|
|
|
idx -= 1
|
|
|
|
@ -195,8 +197,9 @@ class RightPane(urwid.ListBox):
|
|
|
|
|
|
|
|
|
|
|
|
def makeColumns(article):
|
|
|
|
def makeColumns(article):
|
|
|
|
title = article[1]
|
|
|
|
title = article[1]
|
|
|
|
|
|
|
|
Utils.writeLog(article[0])
|
|
|
|
if isCategoryView:
|
|
|
|
if isCategoryView:
|
|
|
|
title += " (" + article[-1] + ")"
|
|
|
|
title = [title, ("feed", " — " + article[-1])]
|
|
|
|
cols = [
|
|
|
|
cols = [
|
|
|
|
(2, urwid.Text(status)),
|
|
|
|
(2, urwid.Text(status)),
|
|
|
|
(16, urwid.Text(article[3])),
|
|
|
|
(16, urwid.Text(article[3])),
|
|
|
|
@ -210,7 +213,7 @@ class RightPane(urwid.ListBox):
|
|
|
|
urwid.AttrMap(
|
|
|
|
urwid.AttrMap(
|
|
|
|
urwid.Columns(makeColumns(article)),
|
|
|
|
urwid.Columns(makeColumns(article)),
|
|
|
|
article[0],
|
|
|
|
article[0],
|
|
|
|
"reveal focus") for article in articles]
|
|
|
|
{"feed": "reveal focus", None: "reveal focus"}) for article in articles]
|
|
|
|
walker = urwid.SimpleListWalker(items)
|
|
|
|
walker = urwid.SimpleListWalker(items)
|
|
|
|
self.body = walker
|
|
|
|
self.body = walker
|
|
|
|
|
|
|
|
|
|
|
|
@ -396,6 +399,7 @@ class TUI(urwid.Frame):
|
|
|
|
tui = cls()
|
|
|
|
tui = cls()
|
|
|
|
palette = [("linebox", "bold", "dark cyan", "standout"), ("text", "dark cyan", "dark cyan"),
|
|
|
|
palette = [("linebox", "bold", "dark cyan", "standout"), ("text", "dark cyan", "dark cyan"),
|
|
|
|
("favorite", "dark green", "black"),
|
|
|
|
("favorite", "dark green", "black"),
|
|
|
|
|
|
|
|
("feed", "bold", "black"),
|
|
|
|
('header', 'white', 'black'), ('reveal focus', 'black', 'dark cyan', 'standout')]
|
|
|
|
('header', 'white', 'black'), ('reveal focus', 'black', 'dark cyan', 'standout')]
|
|
|
|
loop = urwid.MainLoop(
|
|
|
|
loop = urwid.MainLoop(
|
|
|
|
tui,
|
|
|
|
tui,
|
|
|
|
|