Done building the buttons etc for BuildNovel dialog

This commit is contained in:
Veronica K. B. Olsen
2020-05-10 19:31:53 +02:00
parent 5ab1402854
commit 4d9e2d03a3
6 changed files with 400 additions and 23 deletions
+13 -10
View File
@@ -200,13 +200,14 @@ class NWProject():
self.bookAuthors = []
self.autoReplace = {}
self.titleFormat = {
"title": "%title%",
"chapter": "Chapter %num%",
"chapterSub": "%title%",
"unnumbered": "%title%",
"scene": "",
"sceneSep": "* * *",
"section": "",
"title" : r"%title%",
"chapter" : r"Chapter %num%\\%title%",
"unnumbered" : r"%title%",
"scene" : r"* * *",
"section" : r"",
"withSynopsis" : False,
"withComments" : False,
"withKeywords" : False,
}
self.spellCheck = False
self.autoOutline = True
@@ -717,9 +718,11 @@ class NWProject():
def setTitleFormat(self, titleFormat):
"""Set the formatting of titles in the project.
"""
for valKey in titleFormat:
if valKey in self.titleFormat:
self.titleFormat[valKey] = titleFormat[valKey]
for valKey, valEntry in titleFormat.items():
if valKey in ("title","chapter","unnumbered","scene","section"):
self.titleFormat[valKey] = checkString(valEntry, self.titleFormat[valKey], False)
elif valKey in ("withSynopsis","withComments","withKeywords"):
self.titleFormat[valKey] = checkBool(valEntry, False, False)
return
def setProjectChanged(self, bValue):
+5
View File
@@ -165,6 +165,11 @@ class Tokenizer():
return
def getResult(self):
"""Return the result from the conversion.
"""
return self.theResult
def doAutoReplace(self):
"""Run through the user's auto-replace dictionary.
"""