add intial soundicon for attribute

This commit is contained in:
chrys
2018-05-28 23:29:29 +02:00
parent ac48ecc89b
commit 21bdcdb56e
4 changed files with 70 additions and 6 deletions

View File

@ -0,0 +1,31 @@
#!/bin/python
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
from fenrirscreenreader.utils import screen_utils
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('Reads attributes of current cursor position')
def run(self):
# is a vertical change?
if not (self.env['runtime']['cursorManager'].isCursorVerticalMove() or\
self.env['runtime']['cursorManager'].isCursorHorizontalMove()):
return
cursorPos = self.env['screen']['newCursor']
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