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

Method display

gui/builtinContextMenus/cargoAdd.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"):
18 return False
19
20 if mainItem is None:
21 return False
22
23 sFit = Fit.getInstance()
24 fitID = self.mainFrame.getActiveFit()
25 fit = sFit.getFit(fitID)
26
27 if not fit or (fit.isStructure and mainItem.category.ID != 8):
28 return False
29
30 return True
31
32 def getText(self, callingWindow, itmContext, mainItem):
33 return _t("Add {} to Cargo").format(itmContext)

Callers

nothing calls this directly

Calls 3

getFitMethod · 0.80
getInstanceMethod · 0.45
getActiveFitMethod · 0.45

Tested by

no test coverage detected