replaces namespace fenrir with fenrirscreenreader
This commit is contained in:
32
src/fenrirscreenreader/commands/commands/review_up.py
Normal file
32
src/fenrirscreenreader/commands/commands/review_up.py
Normal file
@@ -0,0 +1,32 @@
|
||||
#!/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributers.
|
||||
|
||||
from fenrirscreenreader.core import debug
|
||||
from fenrirscreenreader.utils import char_utils
|
||||
|
||||
class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
def shutdown(self):
|
||||
pass
|
||||
def getDescription(self):
|
||||
return _('set review cursor to the char in the line below and present it')
|
||||
|
||||
def run(self):
|
||||
cursorPos = self.env['runtime']['cursorManager'].getReviewOrTextCursor()
|
||||
self.env['screen']['newCursorReview']['x'], self.env['screen']['newCursorReview']['y'], upChar, endOfScreen = \
|
||||
char_utils.getUpChar(self.env['screen']['newCursorReview']['x'],self.env['screen']['newCursorReview']['y'], self.env['screen']['newContentText'])
|
||||
self.env['runtime']['outputManager'].presentText(upChar ,interrupt=True, ignorePunctuation=True, announceCapital=True, flush=False)
|
||||
if endOfScreen:
|
||||
if self.env['runtime']['settingsManager'].getSettingAsBool('review', 'endOfScreen'):
|
||||
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')
|
||||
def setCallback(self, callback):
|
||||
pass
|
Reference in New Issue
Block a user