(self, callingWindow, srcContext, mainItem)
| 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) |
nothing calls this directly
no test coverage detected