mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-10 02:18:41 +00:00
gtk:allow icons for labels
This commit is contained in:
parent
56a3a03a59
commit
03d1177085
2 changed files with 3 additions and 2 deletions
|
@ -95,7 +95,8 @@ class TrackerIcons(object):
|
||||||
def get_async(self, tracker_host, callback):
|
def get_async(self, tracker_host, callback):
|
||||||
if tracker_host in self.images:
|
if tracker_host in self.images:
|
||||||
callback(self.images[tracker_host])
|
callback(self.images[tracker_host])
|
||||||
else:
|
elif "." in tracker_host:
|
||||||
|
#only find icon if there's a dot in the name.
|
||||||
self.images[tracker_host] = None
|
self.images[tracker_host] = None
|
||||||
threading.Thread(target=self. _fetch_icon_thread,
|
threading.Thread(target=self. _fetch_icon_thread,
|
||||||
args=(tracker_host, callback)).start()
|
args=(tracker_host, callback)).start()
|
||||||
|
|
|
@ -194,7 +194,7 @@ class FilterTreeView(component.Component):
|
||||||
row = self.treestore.append(self.cat_nodes[cat],[cat, value, label, count , pix, True])
|
row = self.treestore.append(self.cat_nodes[cat],[cat, value, label, count , pix, True])
|
||||||
self.filters[(cat, value)] = row
|
self.filters[(cat, value)] = row
|
||||||
|
|
||||||
if cat == "tracker_host":
|
if cat == "tracker_host" or cat == "label":
|
||||||
self.tracker_icons.get_async(value, lambda filename: self.set_row_image(cat, value, filename))
|
self.tracker_icons.get_async(value, lambda filename: self.set_row_image(cat, value, filename))
|
||||||
|
|
||||||
self.treestore.set_value(row, FILTER_COLUMN, True)
|
self.treestore.set_value(row, FILTER_COLUMN, True)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue