improve output for pdmenu

This commit is contained in:
chrys 2018-06-08 20:43:25 +02:00
parent 2f39ae9a3d
commit 9a0ce77236
3 changed files with 13 additions and 0 deletions

View File

@ -26,8 +26,10 @@ for directory in directories:
destDir = '/etc/fenrirscreenreader/keyboard' destDir = '/etc/fenrirscreenreader/keyboard'
elif 'config/settings' in directory: elif 'config/settings' in directory:
destDir = '/etc/fenrirscreenreader/settings' destDir = '/etc/fenrirscreenreader/settings'
print(forceSettings)
if not forceSettings: if not forceSettings:
try: try:
print('delete')
del(files[files.index('config/settings/settings.conf')]) del(files[files.index('config/settings/settings.conf')])
except: except:
pass pass

View File

@ -22,6 +22,9 @@ class command():
return return
if self.env['runtime']['cursorManager'].isCursorVerticalMove(): if self.env['runtime']['cursorManager'].isCursorVerticalMove():
return return
if self.env['screen']['newCursor']['x'] == == self.env['runtime']['screenManager'].getColums() - 1 and\
self.env['screen']['newCursor']['y'] == self.env['runtime']['screenManager'].getRows() - 1):
return
if self.env['runtime']['inputManager'].getShortcutType() in ['KEY']: if self.env['runtime']['inputManager'].getShortcutType() in ['KEY']:
if not (self.env['runtime']['inputManager'].getLastDeepestInput() in [['KEY_UP'],['KEY_DOWN']]): if not (self.env['runtime']['inputManager'].getLastDeepestInput() in [['KEY_UP'],['KEY_DOWN']]):
return return

View File

@ -15,6 +15,12 @@ class screenManager():
self.prevScreenIgnored = False self.prevScreenIgnored = False
self.prevScreenText = '' self.prevScreenText = ''
self.currScreenText = '' self.currScreenText = ''
self.colums = None
self.rows = None
def getRows(self):
return self.rows
def getColumns(self):
return self.colums
def initialize(self, environment): def initialize(self, environment):
self.env = environment self.env = environment
self.env['runtime']['settingsManager'].loadDriver(\ self.env['runtime']['settingsManager'].loadDriver(\
@ -97,6 +103,8 @@ class screenManager():
# get metadata like cursor or screensize # get metadata like cursor or screensize
self.env['screen']['lines'] = int( eventData['lines']) self.env['screen']['lines'] = int( eventData['lines'])
self.env['screen']['columns'] = int( eventData['columns']) self.env['screen']['columns'] = int( eventData['columns'])
self.colums = int( eventData['columns'])
self.rows = int( eventData['lines'])
self.env['screen']['newCursor']['x'] = int( eventData['textCursor']['x']) self.env['screen']['newCursor']['x'] = int( eventData['textCursor']['x'])
self.env['screen']['newCursor']['y'] = int( eventData['textCursor']['y']) self.env['screen']['newCursor']['y'] = int( eventData['textCursor']['y'])
self.env['screen']['newTTY'] = eventData['screen'] self.env['screen']['newTTY'] = eventData['screen']