Commit 2 of 2, code refactor and cleanup.
This commit is contained in:
@ -4,21 +4,8 @@
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.commands.vmenu_navigation.vmenu_search_base import 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('a')
|
||||
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__('a')
|
||||
|
@ -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('b')
|
||||
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__('b')
|
||||
|
@ -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('c')
|
||||
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__('c')
|
||||
|
@ -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('d')
|
||||
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__('d')
|
||||
|
@ -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('e')
|
||||
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__('e')
|
||||
|
@ -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('f')
|
||||
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__('f')
|
||||
|
@ -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('g')
|
||||
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__('g')
|
||||
|
@ -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('h')
|
||||
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__('h')
|
||||
|
@ -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('i')
|
||||
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__('i')
|
||||
|
@ -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('j')
|
||||
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__('j')
|
||||
|
@ -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('k')
|
||||
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__('k')
|
||||
|
@ -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('l')
|
||||
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__('l')
|
||||
|
@ -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('m')
|
||||
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__('m')
|
||||
|
@ -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('n')
|
||||
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__('n')
|
||||
|
@ -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('o')
|
||||
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__('o')
|
||||
|
@ -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('p')
|
||||
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__('p')
|
||||
|
@ -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('q')
|
||||
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__('q')
|
||||
|
@ -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('r')
|
||||
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__('r')
|
||||
|
@ -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('s')
|
||||
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__('s')
|
||||
|
@ -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('t')
|
||||
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__('t')
|
||||
|
@ -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('u')
|
||||
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__('u')
|
||||
|
@ -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('v')
|
||||
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__('v')
|
||||
|
@ -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('a')
|
||||
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__('w')
|
||||
|
@ -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('x')
|
||||
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__('x')
|
||||
|
@ -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('y')
|
||||
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__('y')
|
||||
|
@ -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')
|
||||
|
@ -0,0 +1,29 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
class VMenuSearchCommand():
|
||||
"""Base class for VMenu search commands"""
|
||||
def __init__(self, search_char):
|
||||
self.search_char = search_char.lower()
|
||||
|
||||
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(self.search_char)
|
||||
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
|
Reference in New Issue
Block a user