rename onScreenChange to onScreenUpdate and create onScreenChange
This commit is contained in:
parent
e9b97945a3
commit
02520c9739
7
TODO
7
TODO
@ -17,8 +17,6 @@ ToDos in Priority order:
|
||||
possiblity to forewart shortcut (or use them as shortcut) [pressing twice while timeout]
|
||||
cleanup inputManager
|
||||
split input driver out of the handler
|
||||
- add screenManager
|
||||
abstract screen driver
|
||||
|
||||
- dictonary for special chars and string replacements
|
||||
- punctuation
|
||||
@ -46,7 +44,6 @@ ToDos in Priority order:
|
||||
first item
|
||||
last item
|
||||
- improve performance
|
||||
- pass environment instance in init and remove it from function calls
|
||||
|
||||
- implement onScreenChange (new onScreenUpdate) commands
|
||||
read highlighted text mode
|
||||
@ -214,3 +211,7 @@ ps a -o tty,comm | grep -e Xorg | grep -v "grep -e Xorg"
|
||||
promoted text
|
||||
clear_marks_on_screen_change
|
||||
leve_review_mode_on_screen_change
|
||||
|
||||
- add screenManager
|
||||
abstract screen driver
|
||||
- pass environment instance in init and remove it from function calls
|
||||
|
@ -17,8 +17,6 @@ class command():
|
||||
return 'No Description found'
|
||||
|
||||
def run(self):
|
||||
if self.env['screenData']['newTTY'] == self.env['screenData']['oldTTY']:
|
||||
return
|
||||
self.env['runtime']['outputManager'].presentText("screen " + str(self.env['screenData']['newTTY']),soundIcon='ChangeTTY', interrupt=True)
|
||||
self.env['runtime']['outputManager'].presentText(self.env['screenData']['newDelta'], interrupt=False)
|
||||
|
||||
|
@ -17,8 +17,6 @@ class command():
|
||||
return 'No Description found'
|
||||
|
||||
def run(self):
|
||||
if self.env['screenData']['newTTY'] == self.env['screenData']['oldTTY']:
|
||||
return
|
||||
self.env['commandBuffer']['Marks']['1'] = None
|
||||
self.env['commandBuffer']['Marks']['2'] = None
|
||||
|
||||
|
@ -17,8 +17,6 @@ class command():
|
||||
return 'No Description found'
|
||||
|
||||
def run(self):
|
||||
if self.env['screenData']['newTTY'] == self.env['screenData']['oldTTY']:
|
||||
return
|
||||
self.env['screenData']['oldCursorReview'] = None
|
||||
self.env['screenData']['newCursorReview'] = None
|
||||
|
||||
|
@ -14,12 +14,14 @@ class commandManager():
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
self.env['runtime']['commandManager'].loadCommands('commands')
|
||||
environment['runtime']['commandManager'].loadCommands('onInput')
|
||||
environment['runtime']['commandManager'].loadCommands('onScreenChanged')
|
||||
self.env['runtime']['commandManager'].loadCommands('onInput')
|
||||
self.env['runtime']['commandManager'].loadCommands('onScreenUpdate')
|
||||
self.env['runtime']['commandManager'].loadCommands('onScreenChanged')
|
||||
|
||||
def shutdown(self):
|
||||
self.env['runtime']['commandManager'].shutdownCommands('commands')
|
||||
self.env['runtime']['commandManager'].shutdownCommands('onInput')
|
||||
self.env['runtime']['commandManager'].shutdownCommands('onScreenUpdate')
|
||||
self.env['runtime']['commandManager'].shutdownCommands('onScreenChanged')
|
||||
|
||||
def loadCommands(self, section='commands'):
|
||||
|
@ -32,6 +32,8 @@ commands = {
|
||||
},
|
||||
'onScreenChanged':{
|
||||
},
|
||||
'onScreenUpdate':{
|
||||
},
|
||||
'commands':{
|
||||
}
|
||||
}
|
||||
|
@ -51,8 +51,10 @@ class fenrir():
|
||||
self.environment['runtime']['debug'].writeDebugOut(str(e),debug.debugLevel.ERROR)
|
||||
|
||||
self.environment['runtime']['commandManager'].executeTriggerCommands('onInput')
|
||||
if self.environment['screenData']['newTTY'] == self.environment['screenData']['oldTTY']:
|
||||
self.environment['runtime']['commandManager'].executeTriggerCommands('onScreenUpdate')
|
||||
else:
|
||||
self.environment['runtime']['commandManager'].executeTriggerCommands('onScreenChanged')
|
||||
|
||||
self.handleCommands()
|
||||
|
||||
def prepareCommand(self):
|
||||
|
Loading…
Reference in New Issue
Block a user