add parameter to getDescription

This commit is contained in:
chrys 2016-09-17 02:14:11 +02:00
parent 482394c92a
commit 9744e428cb
12 changed files with 23 additions and 13 deletions

View File

@ -7,8 +7,9 @@ class command():
return environment return environment
def shutdown(self, environment): def shutdown(self, environment):
return environment return environment
def getDescription(self): def getDescription(self, environment):
return '' return ''
def run(self, environment): def run(self, environment):
# TTY Change # TTY Change
if environment['screenData']['newTTY'] != environment['screenData']['oldTTY']: if environment['screenData']['newTTY'] != environment['screenData']['oldTTY']:

View File

@ -7,8 +7,9 @@ class command():
return environment return environment
def shutdown(self, environment): def shutdown(self, environment):
return environment return environment
def getDescription(self): def getDescription(self, environment):
return '' return ''
def run(self, environment): def run(self, environment):
if environment['screenData']['newTTY'] != environment['screenData']['oldTTY']: if environment['screenData']['newTTY'] != environment['screenData']['oldTTY']:
return environment return environment

View File

@ -7,7 +7,7 @@ class command():
return environment return environment
def shutdown(self, environment): def shutdown(self, environment):
return environment return environment
def getDescription(self): def getDescription(self, environment):
return '' return ''
def run(self, environment): def run(self, environment):

View File

@ -8,8 +8,9 @@ class command():
return environment return environment
def shutdown(self, environment): def shutdown(self, environment):
return environment return environment
def getDescription(self): def getDescription(self, environment):
return '' return ''
def run(self, environment): def run(self, environment):
if not environment['runtime']['settingsManager'].getSettingAsBool(environment, 'keyboard', 'wordEcho'): if not environment['runtime']['settingsManager'].getSettingAsBool(environment, 'keyboard', 'wordEcho'):
return environment return environment

View File

@ -15,8 +15,9 @@ class command():
return environment return environment
def shutdown(self, environment): def shutdown(self, environment):
return environment return environment
def getDescription(self): def getDescription(self, environment):
return 'No Description found' return 'No Description found'
def run(self, environment): def run(self, environment):
if not environment['runtime']['settingsManager'].getSettingAsBool(environment, 'general', 'autoSpellCheck'): if not environment['runtime']['settingsManager'].getSettingAsBool(environment, 'general', 'autoSpellCheck'):
return environment return environment

View File

@ -7,10 +7,10 @@ class command():
return environment return environment
def shutdown(self, environment): def shutdown(self, environment):
return environment return environment
def getDescription(self): def getDescription(self, environment):
return '' return ''
def run(self, environment): def run(self, environment):
if not environment['runtime']['settingsManager'].getSettingAsBool(environment, 'keyboard', 'charDeleteEcho'): if not environment['runtime']['settingsManager'].getSettingAsBool(environment, 'keyboard', 'charDeleteEcho'):
return environment return environment

View File

@ -7,8 +7,9 @@ class command():
return environment return environment
def shutdown(self, environment): def shutdown(self, environment):
return environment return environment
def getDescription(self): def getDescription(self, environment):
return '' return ''
def run(self, environment): def run(self, environment):
if not environment['runtime']['settingsManager'].getSettingAsBool(environment, 'speech', 'autoReadIncomming'): if not environment['runtime']['settingsManager'].getSettingAsBool(environment, 'speech', 'autoReadIncomming'):
return environment return environment

View File

@ -8,8 +8,9 @@ class command():
return environment return environment
def shutdown(self, environment): def shutdown(self, environment):
return environment return environment
def getDescription(self): def getDescription(self, environment):
return '' return ''
def run(self, environment): def run(self, environment):
if not environment['runtime']['settingsManager'].getSettingAsBool(environment, 'promote', 'enabled'): if not environment['runtime']['settingsManager'].getSettingAsBool(environment, 'promote', 'enabled'):
return environment return environment

View File

@ -7,8 +7,9 @@ class command():
return environment return environment
def shutdown(self, environment): def shutdown(self, environment):
return environment return environment
def getDescription(self): def getDescription(self, environment):
return '' return ''
def run(self, environment): def run(self, environment):
if environment['screenData']['newTTY'] == environment['screenData']['oldTTY']: if environment['screenData']['newTTY'] == environment['screenData']['oldTTY']:
return environment return environment

View File

@ -7,8 +7,9 @@ class command():
return environment return environment
def shutdown(self, environment): def shutdown(self, environment):
return environment return environment
def getDescription(self): def getDescription(self, environment):
return '' return ''
def run(self, environment): def run(self, environment):
if environment['screenData']['newTTY'] == environment['screenData']['oldTTY']: if environment['screenData']['newTTY'] == environment['screenData']['oldTTY']:
return environment return environment

View File

@ -7,8 +7,9 @@ class command():
return environment return environment
def shutdown(self, environment): def shutdown(self, environment):
return environment return environment
def getDescription(self): def getDescription(self, environment):
return '' return ''
def run(self, environment): def run(self, environment):
if environment['screenData']['newTTY'] == environment['screenData']['oldTTY']: if environment['screenData']['newTTY'] == environment['screenData']['oldTTY']:
return environment return environment

View File

@ -54,7 +54,8 @@ class commandManager():
if self.commandExists(environment, command, section): if self.commandExists(environment, command, section):
try: try:
if environment['generalInformation']['tutorialMode']: 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: else:
environment['commands'][section][command].run(environment) environment['commands'][section][command].run(environment)
except Exception as e: except Exception as e: