Restore some of the old spell check information in the status bar

This commit is contained in:
Veronica K. B. Olsen
2021-02-15 22:29:05 +01:00
parent ed356ba85d
commit 2e4148a9eb
6 changed files with 54 additions and 9 deletions
+1 -1
View File
@@ -62,7 +62,7 @@ class NWIndex():
# TimeStamps
self._timeNovel = 0
self._timeNotes = 0
self._timeNotes = 0
self._timeIndex = 0
return
+27
View File
@@ -82,6 +82,11 @@ class NWSpellCheck():
"""
return []
def describeDict(self):
"""Dummy function.
"""
return "", ""
##
# Internal Functions
##
@@ -182,8 +187,24 @@ class NWSpellEnchant(NWSpellCheck):
retList.append((spTag, spProvider.name))
except Exception:
logger.error("Failed to list languages for enchant spell checking")
return retList
def describeDict(self):
"""Return the tag and provider of the currently loaded
dictionary.
"""
try:
spTag = self.theDict.tag
spName = self.theDict.provider.name
except Exception:
logger.error("Failed to extract information about the dictionary")
nw.logException()
spTag = ""
spName = ""
return spTag, spName
# END Class NWSpellEnchant
class NWSpellEnchantDummy:
@@ -303,4 +324,10 @@ class NWSpellSimple(NWSpellCheck):
return retList
def describeDict(self):
"""Return the tag and provider of the currently loaded
dictionary.
"""
return self.theLang, ""
# END Class NWSpellSimple