Add "jump to" in drone, implant & booster views

This commit is contained in:
cncfanatics
2010-10-21 15:40:30 +02:00
parent 0a83c10bb8
commit b76a793661

View File

@@ -8,13 +8,14 @@ class MarketJump(ContextMenu):
self.mainFrame = gui.mainFrame.MainFrame.getInstance()
def display(self, context, selection):
return context in ("module", "ammo", "itemSearch") and (not selection[0].isEmpty if context == "module" else True)
return context in ("module", "ammo", "itemSearch", "drone", "implant", "booster") \
and (not selection[0].isEmpty if context == "module" else True)
def getText(self, context, selection):
return "Jump to %s Market Group" % (context.capitalize() if context != "itemSearch" else "Item")
def activate(self, context, selection, i):
if context == "module":
if context in ("module", "drone", "implant", "booster"):
item = selection[0].item
elif context == "ammo":
item = selection[0].charge