diff --git a/nw/config.py b/nw/config.py index f5ae78d2..cde16913 100644 --- a/nw/config.py +++ b/nw/config.py @@ -70,11 +70,13 @@ class Config: self.doReplaceDash = True self.doReplaceDots = True self.wordCountTimer = 5.0 - + self.fmtDoubleQuotes = ["“","”"] self.fmtSingleQuotes = ["‘","’"] self.fmtApostrophe = "’" + self.spellLanguage = "en_GB" + # Check if config file exists if path.isfile(path.join(self.confPath,self.confFile)): self.loadConfig() @@ -140,6 +142,8 @@ class Config: self.doReplaceDash = confParser.getboolean(cnfSec,"repdash") if confParser.has_option(cnfSec,"repdots"): self.doReplaceDots = confParser.getboolean(cnfSec,"repdots") + if confParser.has_option(cnfSec,"spellcheck"): + self.spellLanguage = confParser.get(cnfSec,"spellcheck") ## Path cnfSec = "Path" @@ -183,6 +187,7 @@ class Config: confParser.set(cnfSec,"repdquotes", str(self.doReplaceDQuote)) confParser.set(cnfSec,"repdash", str(self.doReplaceDash)) confParser.set(cnfSec,"repdots", str(self.doReplaceDots)) + confParser.set(cnfSec,"spellcheck", str(self.spellLanguage)) ## Path cnfSec = "Path" diff --git a/nw/gui/doceditor.py b/nw/gui/doceditor.py index 568f8168..0e2c2dd1 100644 --- a/nw/gui/doceditor.py +++ b/nw/gui/doceditor.py @@ -52,7 +52,7 @@ class GuiDocEditor(QTextEdit): # Core Elements self.theDoc = self.document() - self.theDict = enchant.Dict("en_GB") + self.theDict = enchant.Dict(self.mainConf.spellLanguage) self.hLight = GuiDocHighlighter(self.theDoc, self.theDict) # Editor State diff --git a/sample/sampleNovel/data_b/c0cbd2a407f3_main.nwd b/sample/sampleNovel/data_b/c0cbd2a407f3_main.nwd new file mode 100644 index 00000000..6edf9061 --- /dev/null +++ b/sample/sampleNovel/data_b/c0cbd2a407f3_main.nwd @@ -0,0 +1,3 @@ +# This is a New File! + +Although, not so new now that it has text in it an everything … \ No newline at end of file diff --git a/sample/sampleNovel/nwProject.nwx b/sample/sampleNovel/nwProject.nwx index 9634be58..e0cc03e6 100644 --- a/sample/sampleNovel/nwProject.nwx +++ b/sample/sampleNovel/nwProject.nwx @@ -1,5 +1,5 @@ - + Sample Project Sample Project @@ -61,9 +61,9 @@ 0 False SCENE - 0 - 0 - 0 + 69 + 17 + 1 Characters @@ -127,14 +127,14 @@ True - New File + Orphaned File 1 FILE - NOVEL + NO_CLASS 0 False - SCENE - 3 - 1 + NO_LAYOUT + 0 + 0 0