Commit 2 of 2, code refactor and cleanup.

This commit is contained in:
Storm Dragon
2025-06-08 14:26:24 -04:00
parent ddc1b43304
commit 5cc719a6f3
69 changed files with 827 additions and 1489 deletions

View File

@ -4,21 +4,13 @@
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
import importlib.util
import os
_spec = importlib.util.spec_from_file_location("vmenu_search_base", os.path.join(os.path.dirname(__file__), "vmenu_search_base.py"))
_module = importlib.util.module_from_spec(_spec)
_spec.loader.exec_module(_module)
VMenuSearchCommand = _module.VMenuSearchCommand
class command():
class command(VMenuSearchCommand):
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('search for an menu entry')
def run(self):
text = self.env['runtime']['vmenuManager'].searchEntry('z')
if text != '':
self.env['runtime']['outputManager'].presentText(text, interrupt=True)
else:
self.env['runtime']['outputManager'].presentText(_('not found'), soundIcon='ErrorScreen', interrupt=True)
def setCallback(self, callback):
pass
super().__init__('z')