add to char review

This commit is contained in:
chrys
2018-05-29 00:06:52 +02:00
parent 21bdcdb56e
commit 3bffb8b80c
11 changed files with 41 additions and 6 deletions

View File

@ -24,6 +24,13 @@ class command():
char_utils.getCurrentChar(self.env['screen']['newCursorReview']['x'], self.env['screen']['newCursorReview']['y'], self.env['screen']['newContentText'])
self.env['runtime']['outputManager'].presentText(currChar ,interrupt=True, ignorePunctuation=True, announceCapital=True, flush=False)
# is has attribute it enabled?
if self.env['runtime']['settingsManager'].getSettingAsBool('general', 'hasAttributes'):
cursorPos = self.env['screen']['newCursorReview']
if not self.env['runtime']['attributeManager'].hasAttributes(cursorPos):
return
self.env['runtime']['outputManager'].presentText('has attribute', soundIcon='HasAttributes', interrupt=False)
def setCallback(self, callback):
pass

View File

@ -28,6 +28,13 @@ class command():
self.env['runtime']['outputManager'].presentText(_('end of screen'), interrupt=True, soundIcon='EndOfScreen')
if lineBreak:
if self.env['runtime']['settingsManager'].getSettingAsBool('review', 'lineBreak'):
self.env['runtime']['outputManager'].presentText(_('line break'), interrupt=False, soundIcon='EndOfLine')
self.env['runtime']['outputManager'].presentText(_('line break'), interrupt=False, soundIcon='EndOfLine')
# is has attribute it enabled?
if self.env['runtime']['settingsManager'].getSettingAsBool('general', 'hasAttributes'):
cursorPos = self.env['screen']['newCursorReview']
if not self.env['runtime']['attributeManager'].hasAttributes(cursorPos):
return
self.env['runtime']['outputManager'].presentText('has attribute', soundIcon='HasAttributes', interrupt=False)
def setCallback(self, callback):
pass

View File

@ -31,6 +31,13 @@ class command():
self.env['runtime']['outputManager'].presentText(_('end of screen'), interrupt=True, soundIcon='EndOfScreen')
if lineBreak:
if self.env['runtime']['settingsManager'].getSettingAsBool('review', 'lineBreak'):
self.env['runtime']['outputManager'].presentText(_('line break'), interrupt=False, soundIcon='EndOfLine')
self.env['runtime']['outputManager'].presentText(_('line break'), interrupt=False, soundIcon='EndOfLine')
# is has attribute it enabled?
if self.env['runtime']['settingsManager'].getSettingAsBool('general', 'hasAttributes'):
cursorPos = self.env['screen']['newCursorReview']
if not self.env['runtime']['attributeManager'].hasAttributes(cursorPos):
return
self.env['runtime']['outputManager'].presentText('has attribute', soundIcon='HasAttributes', interrupt=False)
def setCallback(self, callback):
pass

View File

@ -17,6 +17,9 @@ class command():
def getDescription(self):
return _('Reads attributes of current cursor position')
def run(self):
# is it enabled?
if not self.env['runtime']['settingsManager'].getSettingAsBool('general', 'hasAttributes'):
return
# is a vertical change?
if not (self.env['runtime']['cursorManager'].isCursorVerticalMove() or\
self.env['runtime']['cursorManager'].isCursorHorizontalMove()):

View File

@ -74,6 +74,7 @@ settingsData = {
'commandPath': '/usr/share/fenrir/commands',
'attributeFormatString': 'Background fenrirBGColor,Foreground fenrirFGColor,fenrirUnderline,fenrirBold,fenrirBlink, Font fenrirFont,Fontsize fenrirFontSize',
'autoPresentIndent': False,
'hasAttributes': True,
'shell': '',
},
'focus':{