MCPcopy Create free account
hub / github.com/brain-workshop/brainworkshop / close

Method close

brainworkshop.py:2379–2388  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2377 Menu.__init__(self, options, vals, {}, names, title=_('Choose sound sets to Sound n-back tasks.'))
2378
2379 def close(self):
2380 cfg.AUDIO1_SETS = []
2381 cfg.AUDIO2_SETS = []
2382 for k,v in self.new_sets.items():
2383 if k.startswith('1') and v: cfg.AUDIO1_SETS.append(k[1:])
2384 elif k.startswith('2') and v: cfg.AUDIO2_SETS.append(k[1:])
2385 cfg.CHANNEL_AUDIO1 = self.values['cfg.CHANNEL_AUDIO1'].value()
2386 cfg.CHANNEL_AUDIO2 = self.values['cfg.CHANNEL_AUDIO2'].value()
2387 Menu.close(self)
2388 update_all_labels()
2389
2390 def select(self):
2391 Menu.select(self)

Callers

nothing calls this directly

Calls 3

update_all_labelsFunction · 0.85
valueMethod · 0.80
closeMethod · 0.45

Tested by

no test coverage detected