mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-11 19:08:40 +00:00
Highlight matches when searching (only for >=2 chars entered)
This commit is contained in:
parent
00bf1d31a2
commit
4983110d50
1 changed files with 14 additions and 0 deletions
|
@ -781,6 +781,20 @@ class AllTorrents(BaseMode, component.Component):
|
||||||
elif row[1] == "Checking":
|
elif row[1] == "Checking":
|
||||||
fg = "blue"
|
fg = "blue"
|
||||||
|
|
||||||
|
if self.entering_search and len(self.search_string) > 1:
|
||||||
|
lcase_name = self.torrent_names[tidx-1].lower()
|
||||||
|
sstring_lower = self.search_string.lower()
|
||||||
|
if lcase_name.find(sstring_lower) != -1:
|
||||||
|
if tidx == self.cursel:
|
||||||
|
pass
|
||||||
|
elif tidx in self.marked:
|
||||||
|
bg = "magenta"
|
||||||
|
else:
|
||||||
|
bg = "green"
|
||||||
|
if fg == "green":
|
||||||
|
fg = "black"
|
||||||
|
attr = "bold"
|
||||||
|
|
||||||
if attr:
|
if attr:
|
||||||
colorstr = "{!%s,%s,%s!}"%(fg,bg,attr)
|
colorstr = "{!%s,%s,%s!}"%(fg,bg,attr)
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue