| 1 |
#!/usr/bin/env python3 |
| 2 |
# -*- coding: utf-8 -*- |
| 3 |
|
| 4 |
# Fenrir TTY screen reader |
| 5 |
# By Chrys, Storm Dragon, and contributors. |
| 6 |
|
| 7 |
|
| 8 |
from fenrirscreenreader.core.i18n import _ |
| 9 |
|
| 10 |
|
| 11 |
class command: |
| 12 |
def __init__(self): |
| 13 |
pass |
| 14 |
|
| 15 |
def initialize(self, environment): |
| 16 |
self.env = environment |
| 17 |
|
| 18 |
def shutdown(self): |
| 19 |
pass |
| 20 |
|
| 21 |
def get_description(self): |
| 22 |
return _("get previous quick menu entry") |
| 23 |
|
| 24 |
def run(self): |
| 25 |
menu = "" |
| 26 |
value = "" |
| 27 |
if self.env["runtime"]["QuickMenuManager"].prev_entry(): |
| 28 |
menu = self.env["runtime"]["QuickMenuManager"].get_current_entry() |
| 29 |
if menu != "": |
| 30 |
value = self.env["runtime"][ |
| 31 |
"QuickMenuManager" |
| 32 |
].get_current_value() |
| 33 |
self.env["runtime"]["OutputManager"].present_text( |
| 34 |
menu + " " + value, interrupt=True |
| 35 |
) |
| 36 |
else: |
| 37 |
self.env["runtime"]["OutputManager"].present_text( |
| 38 |
_("Quick menu not available"), interrupt=True |
| 39 |
) |
| 40 |
|
| 41 |
def set_callback(self, callback): |
| 42 |
pass |