fix application detection, remove debugging print

This commit is contained in:
chrys
2016-10-02 23:24:50 +02:00
parent 1c2d0caa56
commit 90129d4161
15 changed files with 27 additions and 26 deletions

View File

@ -29,7 +29,7 @@ class command():
if not self.env['commandBuffer']['bookMarks'][self.ID][currApp]['1']:
self.env['runtime']['outputManager'].presentText("Bookmark for application " + currApp + " not set", interrupt=True)
return
print('i',self.env['commandBuffer']['bookMarks'][self.ID][currApp]['1'])
# set marks
marked = ''
startMark = self.env['commandBuffer']['bookMarks'][self.ID][currApp]['1'].copy()

View File

@ -29,7 +29,7 @@ class command():
if not self.env['commandBuffer']['bookMarks'][self.ID][currApp]['1']:
self.env['runtime']['outputManager'].presentText("Bookmark for application " + currApp + " not set", interrupt=True)
return
print('i',self.env['commandBuffer']['bookMarks'][self.ID][currApp]['1'])
# set marks
marked = ''
startMark = self.env['commandBuffer']['bookMarks'][self.ID][currApp]['1'].copy()

View File

@ -29,7 +29,7 @@ class command():
if not self.env['commandBuffer']['bookMarks'][self.ID][currApp]['1']:
self.env['runtime']['outputManager'].presentText("Bookmark for application " + currApp + " not set", interrupt=True)
return
print('i',self.env['commandBuffer']['bookMarks'][self.ID][currApp]['1'])
# set marks
marked = ''
startMark = self.env['commandBuffer']['bookMarks'][self.ID][currApp]['1'].copy()

View File

@ -29,7 +29,7 @@ class command():
if not self.env['commandBuffer']['bookMarks'][self.ID][currApp]['1']:
self.env['runtime']['outputManager'].presentText("Bookmark for application " + currApp + " not set", interrupt=True)
return
print('i',self.env['commandBuffer']['bookMarks'][self.ID][currApp]['1'])
# set marks
marked = ''
startMark = self.env['commandBuffer']['bookMarks'][self.ID][currApp]['1'].copy()

View File

@ -29,7 +29,7 @@ class command():
if not self.env['commandBuffer']['bookMarks'][self.ID][currApp]['1']:
self.env['runtime']['outputManager'].presentText("Bookmark for application " + currApp + " not set", interrupt=True)
return
print('i',self.env['commandBuffer']['bookMarks'][self.ID][currApp]['1'])
# set marks
marked = ''
startMark = self.env['commandBuffer']['bookMarks'][self.ID][currApp]['1'].copy()

View File

@ -29,7 +29,7 @@ class command():
if not self.env['commandBuffer']['bookMarks'][self.ID][currApp]['1']:
self.env['runtime']['outputManager'].presentText("Bookmark for application " + currApp + " not set", interrupt=True)
return
print('i',self.env['commandBuffer']['bookMarks'][self.ID][currApp]['1'])
# set marks
marked = ''
startMark = self.env['commandBuffer']['bookMarks'][self.ID][currApp]['1'].copy()

View File

@ -29,7 +29,7 @@ class command():
if not self.env['commandBuffer']['bookMarks'][self.ID][currApp]['1']:
self.env['runtime']['outputManager'].presentText("Bookmark for application " + currApp + " not set", interrupt=True)
return
print('i',self.env['commandBuffer']['bookMarks'][self.ID][currApp]['1'])
# set marks
marked = ''
startMark = self.env['commandBuffer']['bookMarks'][self.ID][currApp]['1'].copy()

View File

@ -29,7 +29,7 @@ class command():
if not self.env['commandBuffer']['bookMarks'][self.ID][currApp]['1']:
self.env['runtime']['outputManager'].presentText("Bookmark for application " + currApp + " not set", interrupt=True)
return
print('i',self.env['commandBuffer']['bookMarks'][self.ID][currApp]['1'])
# set marks
marked = ''
startMark = self.env['commandBuffer']['bookMarks'][self.ID][currApp]['1'].copy()

View File

@ -29,7 +29,7 @@ class command():
if not self.env['commandBuffer']['bookMarks'][self.ID][currApp]['1']:
self.env['runtime']['outputManager'].presentText("Bookmark for application " + currApp + " not set", interrupt=True)
return
print('i',self.env['commandBuffer']['bookMarks'][self.ID][currApp]['1'])
# set marks
marked = ''
startMark = self.env['commandBuffer']['bookMarks'][self.ID][currApp]['1'].copy()

View File

@ -29,7 +29,7 @@ class command():
if not self.env['commandBuffer']['bookMarks'][self.ID][currApp]['1']:
self.env['runtime']['outputManager'].presentText("Bookmark for application " + currApp + " not set", interrupt=True)
return
print('i',self.env['commandBuffer']['bookMarks'][self.ID][currApp]['1'])
# set marks
marked = ''
startMark = self.env['commandBuffer']['bookMarks'][self.ID][currApp]['1'].copy()

View File

@ -18,7 +18,7 @@ class command():
def run(self):
currApp = self.env['runtime']['applicationManager'].getCurrentApplication()
del self.env['commandBuffer']['bookMarks'][self.ID][currApp]
self.env['runtime']['outputManager'].presentText('Bookmark ' + self.ID + " removed for application " + currApp, interrupt=True)

View File

@ -25,7 +25,7 @@ class screenManager():
self.env['runtime']['screenDriver'].getCurrScreen()
if not self.isSuspendingScreen():
if trigger == 'onUpdate':
self.env['runtime']['applicationManager'].getCurrentApplication()
self.env['runtime']['screenDriver'].getCurrApplication()
self.env['runtime']['screenDriver'].update(trigger)
self.env['screenData']['lastScreenUpdate'] = time.time()

View File

@ -34,8 +34,8 @@ class driver():
currScreen = self.env['screenData']['newTTY']
apps = subprocess.Popen('ps -t tty' + currScreen + ' -o comm,tty,stat', shell=True, stdout=subprocess.PIPE).stdout.read().decode()[:-1].split('\n')
except Exception as e:
return ''
print(e)
return
try:
for i in apps:
i = i.upper()
@ -48,13 +48,14 @@ class driver():
not "SH" == i[0] and \
not "PS" == i[0]:
if "TTY"+currScreen in i[1]:
if self.env['runtime']['applicationManager'].isApplicationChange():
if self.env['screenData']['newApplication'] != i[0]:
self.env['screenData']['oldApplication'] = self.env['screenData']['newApplication']
self.env['screenData']['newApplication'] = i[0]
return
except:
return ''
return ''
return
except Exception as e:
print(e)
return
return
def getIgnoreScreens(self):
xlist = []