mirror of
https://github.com/olivierkes/manuskript.git
synced 2024-05-15 02:12:29 +12:00
Test for the presence of enchant
This commit is contained in:
parent
d7af6e9162
commit
4d3ae1c600
|
@ -544,6 +544,10 @@ class MainWindow(QMainWindow, Ui_MainWindow):
|
|||
self.btnRedacFullscreen.clicked.connect(self.redacEditor.showFullscreen)
|
||||
|
||||
def updateMenuDict(self):
|
||||
|
||||
if not enchant:
|
||||
return
|
||||
|
||||
self.menuDict.clear()
|
||||
for i in enchant.list_dicts():
|
||||
a = QAction(str(i[0]), self)
|
||||
|
@ -557,6 +561,9 @@ class MainWindow(QMainWindow, Ui_MainWindow):
|
|||
self.menuDict.addAction(a)
|
||||
|
||||
def setDictionary(self):
|
||||
if not enchant:
|
||||
return
|
||||
|
||||
for i in self.menuDictGroup.actions():
|
||||
if i.isChecked():
|
||||
self.dictChanged.emit(i.text().replace("&", ""))
|
||||
|
|
Loading…
Reference in a new issue