Added theme setting to config file
This commit is contained in:
@@ -126,6 +126,12 @@ class Config:
|
|||||||
|
|
||||||
# Get options
|
# Get options
|
||||||
|
|
||||||
|
## Main
|
||||||
|
cnfSec = "Main"
|
||||||
|
if confParser.has_section(cnfSec):
|
||||||
|
if confParser.has_option(cnfSec,"theme"):
|
||||||
|
self.guiTheme = confParser.get(cnfSec,"theme")
|
||||||
|
|
||||||
## Sizes
|
## Sizes
|
||||||
cnfSec = "Sizes"
|
cnfSec = "Sizes"
|
||||||
if confParser.has_section(cnfSec):
|
if confParser.has_section(cnfSec):
|
||||||
@@ -204,6 +210,7 @@ class Config:
|
|||||||
cnfSec = "Main"
|
cnfSec = "Main"
|
||||||
confParser.add_section(cnfSec)
|
confParser.add_section(cnfSec)
|
||||||
confParser.set(cnfSec,"timestamp", datetime.now().strftime("%Y-%m-%d %H:%M:%S"))
|
confParser.set(cnfSec,"timestamp", datetime.now().strftime("%Y-%m-%d %H:%M:%S"))
|
||||||
|
confParser.set(cnfSec,"theme", str(self.guiTheme))
|
||||||
|
|
||||||
## Sizes
|
## Sizes
|
||||||
cnfSec = "Sizes"
|
cnfSec = "Sizes"
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?xml version='1.0' encoding='utf-8'?>
|
<?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>
|
<project>
|
||||||
<name>Sample Project</name>
|
<name>Sample Project</name>
|
||||||
<title>Sample Project</title>
|
<title>Sample Project</title>
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
[Main]
|
[Main]
|
||||||
timestamp = 2019-05-18 15:06:44
|
timestamp = 2019-05-18 15:06:44
|
||||||
|
theme = default
|
||||||
|
|
||||||
[Sizes]
|
[Sizes]
|
||||||
geometry = 1100, 650
|
geometry = 1100, 650
|
||||||
|
|||||||
Reference in New Issue
Block a user