MCPcopy Create free account
hub / github.com/echQoQ/RustSL / create_mem_mode_combobox

Function create_mem_mode_combobox

gui/ui_components.py:39–56  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

37
38
39def create_mem_mode_combobox():
40 combo = QComboBox()
41 mem_icon = get_icon('mem')
42
43 manifest = load_plugins_manifest()
44 mem_modes = manifest.get('alloc_mem_modes', [])
45
46 for m in mem_modes:
47 combo.addItem(mem_icon, m.get('label', m['id']), m['id'])
48
49 default_mem = get_default_value('alloc_mem_mode')
50 if default_mem:
51 for i in range(combo.count()):
52 if combo.itemData(i) == default_mem:
53 combo.setCurrentIndex(i)
54 break
55
56 return combo
57
58
59def create_load_payload_combobox():

Callers 1

Calls 3

get_iconFunction · 0.85
load_plugins_manifestFunction · 0.85
get_default_valueFunction · 0.85

Tested by

no test coverage detected