Clean up the config class names and methods
This commit is contained in:
@@ -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)
|
||||
)
|
||||
|
||||
@@ -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():
|
||||
|
||||
@@ -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
|
||||
)
|
||||
|
||||
@@ -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)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user