From 9744e428cb4b9ce0246b75dcf8d9027546f0cdc2 Mon Sep 17 00:00:00 2001 From: chrys Date: Sat, 17 Sep 2016 02:14:11 +0200 Subject: [PATCH] add parameter to getDescription --- .../onInput/54000-present_char_if_cursor_change_horizontal.py | 3 ++- .../onInput/55000-present_line_if_cursor_change_vertical.py | 3 ++- .../commands/onScreenChanged/50000-char_echo.py | 2 +- .../commands/onScreenChanged/60000-word_echo.py | 3 ++- .../commands/onScreenChanged/62000-spell_check.py | 3 ++- .../commands/onScreenChanged/65000-char_delete_echo.py | 4 ++-- .../commands/onScreenChanged/70000-incomming.py | 3 ++- .../commands/onScreenChanged/75000-incomming_promote.py | 3 ++- .../onScreenChanged/80000-screen_change_announcement.py | 3 ++- .../onScreenChanged/85000-screen_chnage_reset_marks.py | 3 ++- .../onScreenChanged/88000-screen_chnage_leve_review_mode.py | 3 ++- src/fenrir-package/core/commandManager.py | 3 ++- 12 files changed, 23 insertions(+), 13 deletions(-) diff --git a/src/fenrir-package/commands/onInput/54000-present_char_if_cursor_change_horizontal.py b/src/fenrir-package/commands/onInput/54000-present_char_if_cursor_change_horizontal.py index fb4dd633..43bf5bed 100644 --- a/src/fenrir-package/commands/onInput/54000-present_char_if_cursor_change_horizontal.py +++ b/src/fenrir-package/commands/onInput/54000-present_char_if_cursor_change_horizontal.py @@ -7,8 +7,9 @@ class command(): return environment def shutdown(self, environment): return environment - def getDescription(self): + def getDescription(self, environment): return '' + def run(self, environment): # TTY Change if environment['screenData']['newTTY'] != environment['screenData']['oldTTY']: diff --git a/src/fenrir-package/commands/onInput/55000-present_line_if_cursor_change_vertical.py b/src/fenrir-package/commands/onInput/55000-present_line_if_cursor_change_vertical.py index 8766e4b1..b36a74af 100644 --- a/src/fenrir-package/commands/onInput/55000-present_line_if_cursor_change_vertical.py +++ b/src/fenrir-package/commands/onInput/55000-present_line_if_cursor_change_vertical.py @@ -7,8 +7,9 @@ class command(): return environment def shutdown(self, environment): return environment - def getDescription(self): + def getDescription(self, environment): return '' + def run(self, environment): if environment['screenData']['newTTY'] != environment['screenData']['oldTTY']: return environment diff --git a/src/fenrir-package/commands/onScreenChanged/50000-char_echo.py b/src/fenrir-package/commands/onScreenChanged/50000-char_echo.py index abdc3ffe..26975a26 100644 --- a/src/fenrir-package/commands/onScreenChanged/50000-char_echo.py +++ b/src/fenrir-package/commands/onScreenChanged/50000-char_echo.py @@ -7,7 +7,7 @@ class command(): return environment def shutdown(self, environment): return environment - def getDescription(self): + def getDescription(self, environment): return '' def run(self, environment): diff --git a/src/fenrir-package/commands/onScreenChanged/60000-word_echo.py b/src/fenrir-package/commands/onScreenChanged/60000-word_echo.py index 540f504a..434e87da 100644 --- a/src/fenrir-package/commands/onScreenChanged/60000-word_echo.py +++ b/src/fenrir-package/commands/onScreenChanged/60000-word_echo.py @@ -8,8 +8,9 @@ class command(): return environment def shutdown(self, environment): return environment - def getDescription(self): + def getDescription(self, environment): return '' + def run(self, environment): if not environment['runtime']['settingsManager'].getSettingAsBool(environment, 'keyboard', 'wordEcho'): return environment diff --git a/src/fenrir-package/commands/onScreenChanged/62000-spell_check.py b/src/fenrir-package/commands/onScreenChanged/62000-spell_check.py index 177a5d68..f3320315 100644 --- a/src/fenrir-package/commands/onScreenChanged/62000-spell_check.py +++ b/src/fenrir-package/commands/onScreenChanged/62000-spell_check.py @@ -15,8 +15,9 @@ class command(): return environment def shutdown(self, environment): return environment - def getDescription(self): + def getDescription(self, environment): return 'No Description found' + def run(self, environment): if not environment['runtime']['settingsManager'].getSettingAsBool(environment, 'general', 'autoSpellCheck'): return environment diff --git a/src/fenrir-package/commands/onScreenChanged/65000-char_delete_echo.py b/src/fenrir-package/commands/onScreenChanged/65000-char_delete_echo.py index c7196c60..35e80d06 100644 --- a/src/fenrir-package/commands/onScreenChanged/65000-char_delete_echo.py +++ b/src/fenrir-package/commands/onScreenChanged/65000-char_delete_echo.py @@ -7,10 +7,10 @@ class command(): return environment def shutdown(self, environment): return environment - def getDescription(self): + def getDescription(self, environment): return '' + def run(self, environment): - if not environment['runtime']['settingsManager'].getSettingAsBool(environment, 'keyboard', 'charDeleteEcho'): return environment diff --git a/src/fenrir-package/commands/onScreenChanged/70000-incomming.py b/src/fenrir-package/commands/onScreenChanged/70000-incomming.py index 615f4aa8..bd4eb3ce 100644 --- a/src/fenrir-package/commands/onScreenChanged/70000-incomming.py +++ b/src/fenrir-package/commands/onScreenChanged/70000-incomming.py @@ -7,8 +7,9 @@ class command(): return environment def shutdown(self, environment): return environment - def getDescription(self): + def getDescription(self, environment): return '' + def run(self, environment): if not environment['runtime']['settingsManager'].getSettingAsBool(environment, 'speech', 'autoReadIncomming'): return environment diff --git a/src/fenrir-package/commands/onScreenChanged/75000-incomming_promote.py b/src/fenrir-package/commands/onScreenChanged/75000-incomming_promote.py index 93bf711b..c3d5acdd 100644 --- a/src/fenrir-package/commands/onScreenChanged/75000-incomming_promote.py +++ b/src/fenrir-package/commands/onScreenChanged/75000-incomming_promote.py @@ -8,8 +8,9 @@ class command(): return environment def shutdown(self, environment): return environment - def getDescription(self): + def getDescription(self, environment): return '' + def run(self, environment): if not environment['runtime']['settingsManager'].getSettingAsBool(environment, 'promote', 'enabled'): return environment diff --git a/src/fenrir-package/commands/onScreenChanged/80000-screen_change_announcement.py b/src/fenrir-package/commands/onScreenChanged/80000-screen_change_announcement.py index c790b910..54c78684 100644 --- a/src/fenrir-package/commands/onScreenChanged/80000-screen_change_announcement.py +++ b/src/fenrir-package/commands/onScreenChanged/80000-screen_change_announcement.py @@ -7,8 +7,9 @@ class command(): return environment def shutdown(self, environment): return environment - def getDescription(self): + def getDescription(self, environment): return '' + def run(self, environment): if environment['screenData']['newTTY'] == environment['screenData']['oldTTY']: return environment diff --git a/src/fenrir-package/commands/onScreenChanged/85000-screen_chnage_reset_marks.py b/src/fenrir-package/commands/onScreenChanged/85000-screen_chnage_reset_marks.py index 15d9de89..6c25bf4d 100644 --- a/src/fenrir-package/commands/onScreenChanged/85000-screen_chnage_reset_marks.py +++ b/src/fenrir-package/commands/onScreenChanged/85000-screen_chnage_reset_marks.py @@ -7,8 +7,9 @@ class command(): return environment def shutdown(self, environment): return environment - def getDescription(self): + def getDescription(self, environment): return '' + def run(self, environment): if environment['screenData']['newTTY'] == environment['screenData']['oldTTY']: return environment diff --git a/src/fenrir-package/commands/onScreenChanged/88000-screen_chnage_leve_review_mode.py b/src/fenrir-package/commands/onScreenChanged/88000-screen_chnage_leve_review_mode.py index a65dd920..561c6f13 100644 --- a/src/fenrir-package/commands/onScreenChanged/88000-screen_chnage_leve_review_mode.py +++ b/src/fenrir-package/commands/onScreenChanged/88000-screen_chnage_leve_review_mode.py @@ -7,8 +7,9 @@ class command(): return environment def shutdown(self, environment): return environment - def getDescription(self): + def getDescription(self, environment): return '' + def run(self, environment): if environment['screenData']['newTTY'] == environment['screenData']['oldTTY']: return environment diff --git a/src/fenrir-package/core/commandManager.py b/src/fenrir-package/core/commandManager.py index f21a071d..b08e54da 100644 --- a/src/fenrir-package/core/commandManager.py +++ b/src/fenrir-package/core/commandManager.py @@ -54,7 +54,8 @@ class commandManager(): if self.commandExists(environment, command, section): try: if environment['generalInformation']['tutorialMode']: - environment['commands'][section][command].getDescription(environment) + description = environment['commands'][section][command].getDescription(environment) + environment['runtime']['outputManager'].presentText(environment, description, interrupt=True) else: environment['commands'][section][command].run(environment) except Exception as e: