This commit is contained in:
Manuel Cortéz
2017-02-19 21:03:35 -06:00
12 changed files with 100 additions and 47 deletions

View File

@ -25,6 +25,9 @@ class command():
def getDescription(self):
return 'checks the spelling of the current word'
def updateSpellLanguage(self):
if not initialized:
self.env['runtime']['outputManager'].presentText('pychant is not installed', interrupt=True)
return
self.spellChecker = enchant.Dict(self.env['runtime']['settingsManager'].getSetting('general', 'spellCheckLanguage'))
self.language = self.env['runtime']['settingsManager'].getSetting('general', 'spellCheckLanguage')

View File

@ -28,12 +28,15 @@ class command():
return 'No Description found'
def updateSpellLanguage(self):
if not initialized:
self.env['runtime']['outputManager'].presentText('pychant is not installed', interrupt=True)
return
self.spellChecker = enchant.Dict(self.env['runtime']['settingsManager'].getSetting('general', 'spellCheckLanguage'))
self.language = self.env['runtime']['settingsManager'].getSetting('general', 'spellCheckLanguage')
def run(self):
if not initialized:
return
return
if not self.env['runtime']['settingsManager'].getSettingAsBool('general', 'autoSpellCheck'):
return
if self.env['runtime']['inputManager'].noKeyPressed():
@ -42,7 +45,7 @@ class command():
try:
self.updateSpellLanguage()
except:
return
return
# just when horizontal cursor move worddetection is needed
if not self.env['runtime']['cursorManager'].isCursorHorizontalMove():

View File

@ -1,4 +1,4 @@
#!/bin/env python3
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader

View File

@ -1,4 +1,4 @@
#!/bin/env python3
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader

View File

@ -35,7 +35,6 @@ class driver():
with open(useScreen, 'w') as fd:
for c in text:
fcntl.ioctl(fd, termios.TIOCSTI, c)
time.sleep(0.005)
def getCurrApplication(self):
apps = []