(self, callingWindow, srcContext, mainItem)
| 15 | self.mainFrame = gui.mainFrame.MainFrame.getInstance() |
| 16 | |
| 17 | def display(self, callingWindow, srcContext, mainItem): |
| 18 | if srcContext not in ('marketItemGroup', 'marketItemMisc'): |
| 19 | return False |
| 20 | |
| 21 | if self.mainFrame.getActiveFit() is None: |
| 22 | return False |
| 23 | |
| 24 | if mainItem is None: |
| 25 | return False |
| 26 | |
| 27 | if mainItem.category.name != 'Drone': |
| 28 | return False |
| 29 | |
| 30 | fitID = self.mainFrame.getActiveFit() |
| 31 | fit = Fit.getInstance().getFit(fitID) |
| 32 | amount = droneStackLimit(fit, mainItem) |
| 33 | if amount < 1: |
| 34 | return False |
| 35 | |
| 36 | self.amount = amount |
| 37 | return True |
| 38 | |
| 39 | def getText(self, callingWindow, itmContext, mainItem): |
| 40 | return _t('Add {} to Drone Bay{}').format( |
nothing calls this directly
no test coverage detected