Merge branch 'master' of evefit.org:pyfa
This commit is contained in:
@@ -26,7 +26,8 @@ def getStaticBitmap(name, parent, location):
|
||||
static.SetBitmap(getBitmap(name,location))
|
||||
return static
|
||||
|
||||
locationMap = {"pack": os.path.join(config.staticPath, "icons")}
|
||||
locationMap = {"pack": os.path.join(config.staticPath, "icons"),
|
||||
"ships": os.path.join(config.staticPath, "icons/ships")}
|
||||
|
||||
def getBitmap(name,location):
|
||||
icon = getImage(name, location)
|
||||
@@ -35,8 +36,13 @@ def getBitmap(name,location):
|
||||
|
||||
def getImage(name, location):
|
||||
if location in locationMap:
|
||||
location = locationMap[location]
|
||||
path = os.path.join(location, "icon%s.png" % name)
|
||||
if location == "pack":
|
||||
location = locationMap[location]
|
||||
path = os.path.join(location, "icon%s.png" % name)
|
||||
else:
|
||||
location = locationMap[location]
|
||||
path = os.path.join(location, "%s.png" % name)
|
||||
|
||||
else:
|
||||
location = os.path.join(config.path, location)
|
||||
path = os.path.join(location, name + ".png")
|
||||
|
||||
@@ -27,8 +27,9 @@ from gui.contextMenu import ContextMenu
|
||||
|
||||
class BoosterView(d.Display):
|
||||
DEFAULT_COLS = ["Activity Checkbox",
|
||||
"attr:boosterness",
|
||||
"Name",
|
||||
"attr:boosterness"]
|
||||
]
|
||||
|
||||
def __init__(self, parent):
|
||||
d.Display.__init__(self, parent)
|
||||
|
||||
@@ -103,10 +103,10 @@ class FirepowerViewFull(StatsView):
|
||||
def refreshPanel(self, fit):
|
||||
#If we did anything intresting, we'd update our labels to reflect the new fit's stats here
|
||||
|
||||
stats = (("labelFullDpsWeapon", lambda: fit.weaponDPS, 3, 0, 9, "%s DPS",None),
|
||||
("labelFullDpsDrone", lambda: fit.droneDPS, 3, 0, 9, "%s DPS", None),
|
||||
("labelFullVolleyTotal", lambda: fit.weaponVolley, 3, 0, 9, "%s", "Volley: %.1f"),
|
||||
("labelFullDpsTotal", lambda: fit.totalDPS, 3, 0, 9, "%s", None))
|
||||
stats = (("labelFullDpsWeapon", lambda: fit.weaponDPS, 3, 0, 0, "%s DPS",None),
|
||||
("labelFullDpsDrone", lambda: fit.droneDPS, 3, 0, 0, "%s DPS", None),
|
||||
("labelFullVolleyTotal", lambda: fit.weaponVolley, 3, 0, 0, "%s", "Volley: %.1f"),
|
||||
("labelFullDpsTotal", lambda: fit.totalDPS, 3, 0, 0, "%s", None))
|
||||
|
||||
counter = 0
|
||||
for labelName, value, prec, lowest, highest, valueFormat, altFormat in stats:
|
||||
|
||||
@@ -78,7 +78,7 @@ class TargetingMiscViewFull(StatsView):
|
||||
labels = (("Speed", "Speed", "m/s"),
|
||||
("Align time", "AlignTime", "s"),
|
||||
("Signature", "SigRadius", "m"),
|
||||
#("Warp Speed", "WarpSpeed", "au/s"),
|
||||
("Warp Speed", "WarpSpeed", "AU/s"),
|
||||
("Cargo", "Cargo", u"m\u00B3"))
|
||||
|
||||
for header, labelShort, unit in labels:
|
||||
@@ -105,7 +105,7 @@ class TargetingMiscViewFull(StatsView):
|
||||
("labelFullSpeed", lambda: fit.ship.getModifiedItemAttr("maxVelocity"), 3, 0, 0, "m/s"),
|
||||
("labelFullAlignTime", lambda: fit.alignTime, 3, 0, 0, "s"),
|
||||
("labelFullSigRadius", lambda: fit.ship.getModifiedItemAttr("signatureRadius"), 3, 0, 9, ""),
|
||||
#("labelFullWarpSpeed", lambda: fit.warpSpeed, 3, 0, 0, "au/s"),
|
||||
("labelFullWarpSpeed", lambda: fit.warpSpeed, 3, 0, 0, "AU/s"),
|
||||
("labelFullCargo", lambda: fit.extraAttributes["capacity"], 3, 0, 9, u"m\u00B3"))
|
||||
counter = 0
|
||||
for labelName, value, prec, lowest, highest, unit in stats:
|
||||
|
||||
@@ -34,7 +34,12 @@ class ModulePrice(ViewColumn):
|
||||
|
||||
|
||||
def getText(self, mod):
|
||||
return False if mod.item is not None else ""
|
||||
if mod.item is None:
|
||||
return ""
|
||||
|
||||
sMarket = service.Market.getInstance()
|
||||
price = sMarket.getPriceNow(mod.item.ID).price
|
||||
return formatAmount(price, 3, 3, 9) if price is not None else False
|
||||
|
||||
def delayedText(self, mod, display, colItem):
|
||||
def callback(requests):
|
||||
|
||||
@@ -286,7 +286,9 @@ class ItemView(d.Display):
|
||||
|
||||
self.items = items if items is not None else self.items
|
||||
self.usedMetas = usedMetas if usedMetas is not None else self.usedMetas
|
||||
self.update(self.items)
|
||||
sMarket = service.Market.getInstance()
|
||||
|
||||
self.update(sMarket.filterItems(self.items))
|
||||
|
||||
#Gray out empty toggles
|
||||
self.toggleButtons(self.usedMetas)
|
||||
|
||||
1606
gui/shipBrowser.py
1606
gui/shipBrowser.py
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user