Clean up the config class names and methods

This commit is contained in:
Veronica Berglyd Olsen
2022-11-09 18:47:50 +01:00
parent 47b57172eb
commit 8721d53ab2
13 changed files with 81 additions and 86 deletions
+1 -1
View File
@@ -890,7 +890,7 @@ class GuiBuildNovel(QDialog):
cleanName = makeFileNameSafe(self.theProject.data.name)
fileName = "%s.%s" % (cleanName, fileExt)
savePath = self.mainConf.getLastPath() / fileName
savePath = self.mainConf.lastPath() / fileName
savePath, _ = QFileDialog.getSaveFileName(
self, self.tr("Save Document As"), str(savePath)
)
+1 -1
View File
@@ -119,7 +119,7 @@ class GuiLipsum(QDialog):
def _doInsert(self):
"""Load the text and insert it in the open document.
"""
lipsumFile = self.mainConf.getAssetPath("text") / "lipsum.txt"
lipsumFile = self.mainConf.assetPath("text") / "lipsum.txt"
lipsumText = readTextFile(lipsumFile).splitlines()
if self.randSwitch.isChecked():
+1 -1
View File
@@ -236,7 +236,7 @@ class ProjWizardFolderPage(QWizardPage):
def _doBrowse(self):
"""Select a project folder.
"""
lastPath = self.mainConf.getLastPath()
lastPath = self.mainConf.lastPath()
projDir = QFileDialog.getExistingDirectory(
self, self.tr("Select Project Folder"), str(lastPath), options=QFileDialog.ShowDirsOnly
)
+1 -1
View File
@@ -362,7 +362,7 @@ class GuiWritingStats(QDialog):
return False
# Generate the file name
savePath = self.mainConf.getLastPath() / f"sessionStats.{fileExt}"
savePath = self.mainConf.lastPath() / f"sessionStats.{fileExt}"
savePath, _ = QFileDialog.getSaveFileName(
self, self.tr("Save Data As"), str(savePath), "%s (*.%s)" % (textFmt, fileExt)
)