intial working window mode in screenDriver
This commit is contained in:
parent
455aacf834
commit
26e3057ab1
@ -79,7 +79,7 @@ device=all
|
|||||||
grabDevices=True
|
grabDevices=True
|
||||||
ignoreShortcuts=False
|
ignoreShortcuts=False
|
||||||
# the current shortcut layout located in /etc/fenrir/keyboard
|
# the current shortcut layout located in /etc/fenrir/keyboard
|
||||||
keyboardLayout=test
|
keyboardLayout=desktop
|
||||||
# echo chars while typing.
|
# echo chars while typing.
|
||||||
charEcho=False
|
charEcho=False
|
||||||
# echo deleted chars
|
# echo deleted chars
|
||||||
|
@ -124,7 +124,6 @@ class driver():
|
|||||||
# changes on the screen
|
# changes on the screen
|
||||||
oldScreenText = self.env['runtime']['screenManager'].getWindowAreaInText(self.env['screenData']['oldContentText'])
|
oldScreenText = self.env['runtime']['screenManager'].getWindowAreaInText(self.env['screenData']['oldContentText'])
|
||||||
newScreenText = self.env['runtime']['screenManager'].getWindowAreaInText(self.env['screenData']['newContentText'])
|
newScreenText = self.env['runtime']['screenManager'].getWindowAreaInText(self.env['screenData']['newContentText'])
|
||||||
print(newScreenText)
|
|
||||||
if (self.env['screenData']['oldContentText'] != self.env['screenData']['newContentText']) and \
|
if (self.env['screenData']['oldContentText'] != self.env['screenData']['newContentText']) and \
|
||||||
(self.env['screenData']['newContentText'] != '' ):
|
(self.env['screenData']['newContentText'] != '' ):
|
||||||
if oldScreenText == '' and\
|
if oldScreenText == '' and\
|
||||||
@ -139,10 +138,11 @@ class driver():
|
|||||||
diff = difflib.ndiff(self.env['screenData']['oldContentText'][diffStart:diffStart + self.env['screenData']['columns']],\
|
diff = difflib.ndiff(self.env['screenData']['oldContentText'][diffStart:diffStart + self.env['screenData']['columns']],\
|
||||||
self.env['screenData']['newContentText'][diffStart:diffStart + self.env['screenData']['columns']])
|
self.env['screenData']['newContentText'][diffStart:diffStart + self.env['screenData']['columns']])
|
||||||
else:
|
else:
|
||||||
diff = difflib.ndiff( oldScreenText[diffStart:].split('\n'),\
|
diff = difflib.ndiff( oldScreenText[0:].split('\n'),\
|
||||||
newScreenText[diffStart:].split('\n'))
|
newScreenText[0:].split('\n'))
|
||||||
|
|
||||||
diffList = list(diff)
|
diffList = list(diff)
|
||||||
|
|
||||||
self.env['screenData']['newDelta'] = ''.join(x[2:] for x in diffList if x.startswith('+ '))
|
self.env['screenData']['newDelta'] = ''.join(x[2:] for x in diffList if x.startswith('+ '))
|
||||||
self.env['screenData']['newNegativeDelta'] = ''.join(x[2:] for x in diffList if x.startswith('- '))
|
self.env['screenData']['newNegativeDelta'] = ''.join(x[2:] for x in diffList if x.startswith('- '))
|
||||||
|
print(self.env['screenData']['newDelta'])
|
||||||
|
Loading…
Reference in New Issue
Block a user