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
+7 -3
View File
@@ -147,16 +147,20 @@ class GuiMainStatus(QStatusBar):
qApp.processEvents()
return
def setLanguage(self, theLang):
def setLanguage(self, theLang, theProvider=""):
"""Set the language code for the spell checker.
"""
if theLang is None:
self.langText.setText(self.tr("None"))
self.langText.setToolTip("")
else:
qLocal = QLocale(theLang)
spLang = qLocal.nativeLanguageName().title()
spName = qLocal.bcp47Name()
self.langText.setText("%s (%s)" % (spLang, spName))
self.langText.setText(spLang)
if theProvider:
self.langText.setToolTip("%s (%s)" % (theLang, theProvider))
else:
self.langText.setToolTip(theLang)
return