mirror of https://github.com/kivy/kivy.git
Merge pull request #1138 from alexandre-mbm/modules-study_and_test
For the modules/__init__.py, fixes from Issue #792
This commit is contained in:
commit
1be3f52cf9
|
@ -147,17 +147,20 @@ class ModuleBase:
|
|||
name, context)
|
||||
Logger.debug(msg)
|
||||
module.start(win, context)
|
||||
self.mods[name]['activated'] = True
|
||||
|
||||
def deactivate_module(self, name, win):
|
||||
'''Deactivate a module from a window'''
|
||||
if not name in self.mods:
|
||||
Logger.warning('Modules: Module <%s> not found' % name)
|
||||
return
|
||||
if not hasattr(self.mods[name], 'module'):
|
||||
if not 'module' in self.mods[name]:
|
||||
return
|
||||
|
||||
module = self.mods[name]['module']
|
||||
if self.mods[name]['activated']:
|
||||
module.stop(win, self.mods[name]['context'])
|
||||
self.mods[name]['activated'] = False
|
||||
|
||||
def register_window(self, win):
|
||||
'''Add window in window list'''
|
||||
|
|
Loading…
Reference in New Issue