From 2edb3106d56fe999c80c1ce28d4a8d8baaa1fec3 Mon Sep 17 00:00:00 2001 From: cncfanatics Date: Fri, 8 Oct 2010 22:43:55 +0200 Subject: [PATCH] Display icons for affected by tab, and fetch skill icons in prefetcher --- gui/itemStats.py | 8 +++++++- service/prefetch.py | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/gui/itemStats.py b/gui/itemStats.py index 2a49c1434..6dc99c5ac 100644 --- a/gui/itemStats.py +++ b/gui/itemStats.py @@ -409,7 +409,7 @@ class ItemAffectedBy (wx.Panel): info = things[afflictor.item.name] info[0].add(afflictor) info[1].add(attrName) - itemIcon = self.imageList.Add(bitmapLoader.getBitmap("skill_small", "icons")) + for itemName, info in things.iteritems(): # if wx.Platform in ['__WXGTK__', '__WXMSW__']: # color = wx.SystemSettings_GetColour(wx.SYS_COLOUR_3DLIGHT) @@ -419,6 +419,12 @@ class ItemAffectedBy (wx.Panel): afflictors, attrNames = info counter = len(afflictors) + baseAfflictor = afflictors.pop() + print baseAfflictor + if baseAfflictor.item.icon: + itemIcon = self.imageList.Add(bitmapLoader.getBitmap(baseAfflictor.item.icon.iconFile, "pack")) + else: + itemIcon = -1 child = self.affectedBy.AppendItem(root, "%s" % itemName if counter == 1 else "%s x %d" % (itemName,counter), itemIcon) # self.effectList.SetItemBackgroundColour(index, color) diff --git a/service/prefetch.py b/service/prefetch.py index 5dc6b5f69..87703855f 100755 --- a/service/prefetch.py +++ b/service/prefetch.py @@ -26,7 +26,7 @@ class PrefetchThread(threading.Thread): # We're a daemon thread, as such, interpreter might get shut down while we do stuff # Make sure we don't throw tracebacks to console try: - eos.db.getItemsByCategory("Skill", eager=("effects", "attributes")) + eos.db.getItemsByCategory("Skill", eager=("effects", "attributes", "icon")) cMarket = service.Market.getInstance() root = cMarket.getShipRoot() for id, _ in root: