Rename showGUI variable to blockGUI and added some comments in Config class

This commit is contained in:
Veronica K. B. Olsen
2020-09-22 21:37:00 +02:00
parent 7a9124ca58
commit 9a9cfe1ce5
12 changed files with 49 additions and 51 deletions
+2 -2
View File
@@ -633,7 +633,7 @@ class GuiBuildNovel(QDialog):
if not path.isdir(saveDir):
saveDir = self.mainConf.homePath
if self.mainConf.showGUI:
if self.mainConf.blockGUI:
dlgOpt = QFileDialog.Options()
dlgOpt |= QFileDialog.DontUseNativeDialog
saveTo = QFileDialog.getSaveFileName(
@@ -745,7 +745,7 @@ class GuiBuildNovel(QDialog):
errMsg = "Unknown format"
# Report to user
if self.mainConf.showGUI:
if self.mainConf.blockGUI:
if wSuccess:
self.theParent.makeAlert(
"%s file successfully written to:<br> %s" % (
+1 -1
View File
@@ -160,7 +160,7 @@ class GuiDocSplit(QDialog):
), nwAlert.ERROR)
return
if self.mainConf.showGUI:
if self.mainConf.blockGUI:
msgBox = QMessageBox()
msgRes = msgBox.question(
self, "Split Document", (
+1 -1
View File
@@ -103,7 +103,7 @@ class GuiPreferences(PagedDialog):
validEntries &= retA
needsRestart |= retB
if needsRestart and self.mainConf.showGUI:
if needsRestart and self.mainConf.blockGUI:
msgBox = QMessageBox()
msgBox.information(
self, "Preferences",
+2 -2
View File
@@ -177,7 +177,7 @@ class GuiProjectLoad(QDialog):
"""Browse for a folder path.
"""
logger.verbose("GuiProjectLoad browse button clicked")
if self.mainConf.showGUI:
if self.mainConf.blockGUI:
dlgOpt = QFileDialog.Options()
dlgOpt |= QFileDialog.DontUseNativeDialog
projFile, _ = QFileDialog.getOpenFileName(
@@ -218,7 +218,7 @@ class GuiProjectLoad(QDialog):
selList = self.listBox.selectedItems()
if selList:
doRemove = False
if self.mainConf.showGUI:
if self.mainConf.blockGUI:
msgBox = QMessageBox()
msgRes = msgBox.question(
self, "Remove Entry",
+2 -2
View File
@@ -410,7 +410,7 @@ class GuiProjectTree(QTreeWidget):
# If the file is in the trash folder already, as the
# user if they want to permanently delete the file.
doPermanent = False
if self.mainConf.showGUI and not alreadyAsked:
if self.mainConf.blockGUI and not alreadyAsked:
msgBox = QMessageBox()
msgRes = msgBox.question(
self, "Delete File", "Permanently delete file '%s'?" % nwItemS.itemName
@@ -439,7 +439,7 @@ class GuiProjectTree(QTreeWidget):
# The file is not already in the trash folder, so we
# move it there.
doTrash = False
if self.mainConf.showGUI and askForTrash:
if self.mainConf.blockGUI and askForTrash:
msgBox = QMessageBox()
msgRes = msgBox.question(
self, "Delete File", "Move file '%s' to Trash?" % nwItemS.itemName
+2 -2
View File
@@ -325,7 +325,7 @@ class GuiWritingStats(QDialog):
if not path.isdir(saveDir):
saveDir = self.mainConf.homePath
if self.mainConf.showGUI:
if self.mainConf.blockGUI:
dlgOpt = QFileDialog.Options()
dlgOpt |= QFileDialog.DontUseNativeDialog
saveTo = QFileDialog.getSaveFileName(
@@ -379,7 +379,7 @@ class GuiWritingStats(QDialog):
errMsg = str(e)
# Report to user
if self.mainConf.showGUI:
if self.mainConf.blockGUI:
if wSuccess:
self.theParent.makeAlert(
"%s file successfully written to:<br> %s" % (