From 03d1177085b65884ec168a2d664b5f61667df14a Mon Sep 17 00:00:00 2001 From: Martijn Voncken Date: Fri, 24 Oct 2008 18:20:58 +0000 Subject: [PATCH] gtk:allow icons for labels --- deluge/tracker_icons.py | 3 ++- deluge/ui/gtkui/filtertreeview.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/deluge/tracker_icons.py b/deluge/tracker_icons.py index 4090d0e74..8c0c53e18 100644 --- a/deluge/tracker_icons.py +++ b/deluge/tracker_icons.py @@ -95,7 +95,8 @@ class TrackerIcons(object): def get_async(self, tracker_host, callback): if tracker_host in self.images: 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 threading.Thread(target=self. _fetch_icon_thread, args=(tracker_host, callback)).start() diff --git a/deluge/ui/gtkui/filtertreeview.py b/deluge/ui/gtkui/filtertreeview.py index 59d8b1da3..38e0f4614 100644 --- a/deluge/ui/gtkui/filtertreeview.py +++ b/deluge/ui/gtkui/filtertreeview.py @@ -194,7 +194,7 @@ class FilterTreeView(component.Component): row = self.treestore.append(self.cat_nodes[cat],[cat, value, label, count , pix, True]) 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.treestore.set_value(row, FILTER_COLUMN, True)