add to char review
This commit is contained in:
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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()):
|
||||
|
@ -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':{
|
||||
|
Reference in New Issue
Block a user