Added theme setting to config file

This commit is contained in:
Veronica K. B. Olsen
2019-05-18 20:53:46 +02:00
parent a2a6fd60bc
commit 251614e9f0
3 changed files with 9 additions and 1 deletions
+7
View File
@@ -126,6 +126,12 @@ class Config:
# Get options
## Main
cnfSec = "Main"
if confParser.has_section(cnfSec):
if confParser.has_option(cnfSec,"theme"):
self.guiTheme = confParser.get(cnfSec,"theme")
## Sizes
cnfSec = "Sizes"
if confParser.has_section(cnfSec):
@@ -204,6 +210,7 @@ class Config:
cnfSec = "Main"
confParser.add_section(cnfSec)
confParser.set(cnfSec,"timestamp", datetime.now().strftime("%Y-%m-%d %H:%M:%S"))
confParser.set(cnfSec,"theme", str(self.guiTheme))
## Sizes
cnfSec = "Sizes"
+1 -1
View File
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='utf-8'?>
<novelWriterXML appVersion="0.1.3" fileVersion="1.0" timeStamp="2019-05-18 19:40:13">
<novelWriterXML appVersion="0.1.3" fileVersion="1.0" timeStamp="2019-05-18 20:51:40">
<project>
<name>Sample Project</name>
<title>Sample Project</title>
+1
View File
@@ -1,5 +1,6 @@
[Main]
timestamp = 2019-05-18 15:06:44
theme = default
[Sizes]
geometry = 1100, 650