Add spell check languages to Tools menu
This commit is contained in:
@@ -26,7 +26,7 @@ from __future__ import annotations
|
||||
import logging
|
||||
|
||||
from PyQt5.QtGui import QFont
|
||||
from PyQt5.QtCore import Qt, QLocale
|
||||
from PyQt5.QtCore import Qt
|
||||
from PyQt5.QtWidgets import (
|
||||
QDialog, QWidget, QComboBox, QSpinBox, QPushButton, QDialogButtonBox,
|
||||
QLineEdit, QFileDialog, QFontDialog, QDoubleSpinBox
|
||||
@@ -658,12 +658,9 @@ class GuiPreferencesEditor(QWidget):
|
||||
self.spellLanguage = QComboBox(self)
|
||||
self.spellLanguage.setMaximumWidth(mW)
|
||||
|
||||
langAvail = SHARED.spelling.listDictionaries()
|
||||
if CONFIG.hasEnchant and langAvail:
|
||||
for spTag, spProv in langAvail:
|
||||
qLocal = QLocale(spTag)
|
||||
spLang = qLocal.nativeLanguageName().title()
|
||||
self.spellLanguage.addItem("%s [%s]" % (spLang, spProv), spTag)
|
||||
if CONFIG.hasEnchant:
|
||||
for tag, language in SHARED.spelling.listDictionaries():
|
||||
self.spellLanguage.addItem(language, tag)
|
||||
else:
|
||||
self.spellLanguage.addItem(self.tr("None"), "")
|
||||
self.spellLanguage.setEnabled(False)
|
||||
|
||||
Reference in New Issue
Block a user