Copy changes from download_dicts branch

This commit is contained in:
Veronica Berglyd Olsen
2023-11-20 17:24:49 +01:00
parent c585c87633
commit e00e64dc46
10 changed files with 176 additions and 18 deletions
+16 -1
View File
@@ -59,6 +59,7 @@ from novelwriter.dialogs.projsettings import GuiProjectSettings
from novelwriter.tools.lipsum import GuiLipsum
from novelwriter.tools.manuscript import GuiManuscript
from novelwriter.tools.projwizard import GuiProjectWizard
from novelwriter.tools.dictionaries import GuiDictionaries
from novelwriter.tools.writingstats import GuiWritingStats
from novelwriter.core.coretools import ProjectBuilder
@@ -340,7 +341,7 @@ class GuiMain(QMainWindow):
logger.debug("Ready: GUI")
if __hexversion__[-2] == "a" and logger.getEffectiveLevel() > logging.DEBUG:
if __hexversion__[-2] == "a" and not CONFIG.isDebug:
SHARED.warn(self.tr(
"You are running an untested development version of novelWriter. "
"Please be careful when working on a live project "
@@ -1065,6 +1066,20 @@ class GuiMain(QMainWindow):
return
@pyqtSlot()
def showDictionariesDialog(self) -> None:
"""Show the download dictionaries dialog."""
dlgDicts = GuiDictionaries(self)
dlgDicts.setModal(True)
dlgDicts.show()
dlgDicts.raise_()
qApp.processEvents()
if not dlgDicts.initDialog():
dlgDicts.close()
SHARED.error(self.tr("Could not initialise the dialog."))
return
def reportConfErr(self) -> bool:
"""Checks if the Config module has any errors to report, and let
the user know if this is the case. The Config module caches