diff --git a/ui/buttons.py b/ui/buttons.py index 24779e1..84fd76b 100644 --- a/ui/buttons.py +++ b/ui/buttons.py @@ -8,7 +8,7 @@ page_buttons = import_pages('buttons') -bindings = { p:p.buttons for p in page_buttons } +bindings = { p:m.buttons for p, m in page_buttons.items() } bindings['help_menu'] = { 'single': { 'L': state.app.close_menu, diff --git a/ui/config_loader.py b/ui/config_loader.py index b4a7d8f..d922fca 100644 --- a/ui/config_loader.py +++ b/ui/config_loader.py @@ -32,4 +32,4 @@ def import_pages(module): 'system_menu', 'language' ]) - return { p:__import__(f'.{p}.{module}') for p in pages } + return { p:__import__(f'{p}.{module}', globals(), fromlist=[None], level=1) for p in pages }