MCPcopy Index your code
hub / github.com/pyfa-org/Pyfa / contextMenu

Method contextMenu

gui/builtinMarketBrowser/itemView.py:251–265  ·  view source on GitHub ↗
(self, event)

Source from the content-addressed store, hash-verified

249 self.filterItemStore()
250
251 def contextMenu(self, event):
252 clickedPos = self.getRowByAbs(event.Position)
253 self.ensureSelection(clickedPos)
254
255 # Check if something is selected, if so, spawn the menu for it
256 if clickedPos == -1:
257 return
258
259 item = self.active[clickedPos]
260 sMkt = self.sMkt
261 sourceContext = "marketItemMisc" if self.marketBrowser.mode in ("search", "recent") else "marketItemGroup"
262 itemContext = sMkt.getCategoryByItem(item).displayName
263
264 menu = ContextMenu.getMenu(self, item, (item,), (sourceContext, itemContext))
265 self.PopupMenu(menu)
266
267 def populate(self, items):
268 if len(items) > 0:

Callers

nothing calls this directly

Calls 4

getRowByAbsMethod · 0.80
ensureSelectionMethod · 0.80
getCategoryByItemMethod · 0.80
getMenuMethod · 0.80

Tested by

no test coverage detected