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

Method display

gui/builtinContextMenus/itemStats.py:17–35  ·  view source on GitHub ↗
(self, callingWindow, srcContext, mainItem)

Source from the content-addressed store, hash-verified

15 self.mainFrame = gui.mainFrame.MainFrame.getInstance()
16
17 def display(self, callingWindow, srcContext, mainItem):
18 if srcContext not in (
19 "marketItemGroup", "marketItemMisc",
20 "fittingModule", "fittingCharge",
21 "fittingShip", "baseShip",
22 "cargoItem", "droneItem",
23 "implantItem", "boosterItem",
24 "skillItem", "projectedModule",
25 "projectedDrone", "projectedCharge",
26 "itemStats", "fighterItem",
27 "implantItemChar", "projectedFighter",
28 "fittingMode"
29 ):
30 return False
31
32 if (mainItem is None or getattr(mainItem, "isEmpty", False)) and srcContext != "fittingShip":
33 return False
34
35 return True
36
37 def getText(self, callingWindow, itmContext, mainItem):
38 return _t("{} Stats").format(itmContext if itmContext is not None else _t("Item"))

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected