merge master

This commit is contained in:
chrys 2017-04-30 22:12:54 +02:00
commit 3d3a0f8296
2 changed files with 32 additions and 25 deletions

View File

@ -54,8 +54,11 @@ Driver:
https://docs.python.org/3.2/library/pty.html
- implement PTY Input driver
- ATK input driver (don't grab on graphical interface)
https://git.linux-a11y.org/AIT/pyatspi2/src/master/examples/keypress.py
- try to autodetect encoding (Easy for contribution)
https://stackoverflow.com/questions/6396659/how-do-you-get-the-encoding-of-the-terminal-from-within-a-python-script
- Dectalk SpeechDriver
https://github.com/tvraman/emacspeak/blob/master/servers/obsolete/python/dectalk.py
Settings:
- configuration should be overwritable with parameter and alternative paths (Easy for contribution)

View File

@ -65,6 +65,7 @@ class driver():
self.env['runtime']['debug'].writeDebugOut(str(e),debug.debugLevel.ERROR)
def getSessionInformation(self):
try:
bus = dbus.SystemBus()
if not self.ListSessions:
obj = bus.get_object('org.freedesktop.login1', '/org/freedesktop/login1')
@ -72,7 +73,7 @@ class driver():
self.ListSessions = inf.get_dbus_method('ListSessions')
sessions = self.ListSessions()
self.env['screen']['autoIgnoreScreens'] = []
self.env['screenData']['autoIgnoreScreens'] = []
for session in sessions:
obj = bus.get_object('org.freedesktop.login1', session[4])
inf = dbus.Interface(obj, 'org.freedesktop.DBus.Properties')
@ -85,11 +86,14 @@ class driver():
self.env['runtime']['debug'].writeDebugOut('No TTY found for session:' + session[4],debug.debugLevel.ERROR)
return
if sessionType.upper() == 'X11':
self.env['screen']['autoIgnoreScreens'].append(screen)
if screen == self.env['screen']['newTTY'] :
if self.env['general']['currUser'] != session[2]:
self.env['general']['prevUser'] = self.env['general']['currUser']
self.env['general']['currUser'] = session[2]
self.env['screenData']['autoIgnoreScreens'].append(screen)
if screen == self.env['screenData']['newTTY'] :
if self.env['generalInformation']['currUser'] != session[2]:
self.env['generalInformation']['prevUser'] = self.env['generalInformation']['currUser']
self.env['generalInformation']['currUser'] = session[2]
except Exception as e:
self.env['runtime']['debug'].writeDebugOut('getSessionInformation: Maybe no LoginD:' + str(e),debug.debugLevel.ERROR)
self.env['screenData']['autoIgnoreScreens'] = []
def update(self, trigger='onUpdate'):
newContentBytes = b''