MCPcopy Create free account
hub / github.com/pyfa-org/Pyfa / display

Method display

gui/builtinContextMenus/cargoFill.py:16–30  ·  view source on GitHub ↗
(self, callingWindow, srcContext, mainItem)

Source from the content-addressed store, hash-verified

14 self.mainFrame = gui.mainFrame.MainFrame.getInstance()
15
16 def display(self, callingWindow, srcContext, mainItem):
17 if srcContext not in ("marketItemGroup", "marketItemMisc", "cargoItem"):
18 return False
19
20 if mainItem is None:
21 return False
22
23 if self.mainFrame.getActiveFit() is None:
24 return False
25
26 if srcContext in ("marketItemGroup", "marketItemMisc"):
27 if not (mainItem.isCharge or mainItem.isCommodity):
28 return False
29
30 return True
31
32 def getText(self, callingWindow, itmContext, mainItem):
33 return _t("Fill Cargo With {0}").format(itmContext)

Callers

nothing calls this directly

Calls 1

getActiveFitMethod · 0.45

Tested by

no test coverage detected