fix mistakes

This commit is contained in:
chrys
2016-09-24 02:45:12 +02:00
parent f5c31b2406
commit 4500ca76aa
6 changed files with 17 additions and 62 deletions

View File

@ -14,16 +14,19 @@ class applicationManager():
def shutdown(self):
pass
def getCurrentApplication(self):
currApp = self.environment['screenData']['newApplication'].upper()
print(self.env['screenData']['newApplication'])
currApp = self.env['screenData']['newApplication'].upper()
if not currApp:
currApp == 'DEFAULT'
if currApp == '':
currApp == 'DEFAULT'
currApp == 'DEFAULT'
return currApp
def getPrevApplication(self):
prevApp = self.environment['screenData']['oldApplication'].upper()
prevApp = self.env['screenData']['oldApplication'].upper()
if not prevApp:
prevApp == 'DEFAULT'
if prevApp == '':
prevApp == 'DEFAULT'
return prevApp
def isApplicationChange(self):
return self.environment['screenData']['oldApplication'] != self.environment['screenData']['newApplication']
return self.env['screenData']['oldApplication'] != self.env['screenData']['newApplication']

View File

@ -25,15 +25,15 @@ class cursorManager():
return self.env['commandBuffer']['Marks']['1'] != None and \
self.env['commandBuffer']['Marks']['2'] != None
def setMark(self):
if not self.env['commandBuffer']['Marks']['1']:
if not self.env['commandBuffer']['Marks']['1']:
self.env['commandBuffer']['Marks']['1'] = self.env['screenData']['newCursorReview'].copy()
else:
self.env['commandBuffer']['Marks']['2'] = self.env['screenData']['newCursorReview'].copy()
def getReviewOrTextCursor(self):
if self.env['screenData']['newCursorReview']:
return = self.env['screenData']['newCursorReview'].copy()
return self.env['screenData']['newCursorReview'].copy()
else:
return = self.env['screenData']['newCursor'].copy()
return self.env['screenData']['newCursor'].copy()
def clearReviewCursor(self):
self.env['screenData']['oldCursorReview'] = None
self.env['screenData']['newCursorReview'] = None

View File

@ -17,7 +17,7 @@ screenData = {
'oldContentBytes': b'',
'oldContentText': '',
'oldContentAttrib': b'',
'oldApplication': [],
'oldApplication': '',
'oldTTY':'-1',
'newDelta': '',
'newNegativeDelta': '',
@ -27,6 +27,6 @@ screenData = {
'newContentText': '',
'newContentAttrib': b'',
'newTTY':'0',
'newApplication': [],
'newApplication': '',
'lastScreenUpdate': time.time()
}

View File

@ -32,4 +32,4 @@ class screenManager():
self.env['runtime']['settingsManager'].getSetting('screen', 'suspendingScreen').split(',')) or
(currScreen in self.autoIgnoreScreens))
def isScreenChange(self):
return self.environment['screenData']['newTTY'] != self.environment['screenData']['oldTTY']
return self.env['screenData']['newTTY'] != self.env['screenData']['oldTTY']