Added and connected class to handle project backups

This commit is contained in:
Veronica K. B. Olsen
2019-06-16 23:31:32 +02:00
parent bda4499a55
commit 570b4a2fc4
3 changed files with 85 additions and 1 deletions
+15
View File
@@ -89,6 +89,12 @@ class Config:
self.spellLanguage = "en_GB"
# Backup
self.backupPath = None
self.backupOnClose = True
self.minBackupTime = 0
self.askBeforeBackup = True
# Path
self.recentList = [""]*10
@@ -184,6 +190,10 @@ class Config:
self.fmtDoubleQuotes = self._parseLine(cnfParse, cnfSec, "fmtdoublequote", self.CNF_LIST, self.fmtDoubleQuotes)
self.spellLanguage = self._parseLine(cnfParse, cnfSec, "spellcheck", self.CNF_STR, self.spellLanguage)
## Backup
cnfSec = "Backup"
self.backupPath = self._parseLine(cnfParse, cnfSec, "backuppath", self.CNF_STR, self.backupPath)
## Path
cnfSec = "Path"
for i in range(10):
@@ -240,6 +250,11 @@ class Config:
cnfParse.set(cnfSec,"fmtdoublequote",self._packList(self.fmtDoubleQuotes))
cnfParse.set(cnfSec,"spellcheck", str(self.spellLanguage))
## Backup
cnfSec = "Backup"
cnfParse.add_section(cnfSec)
cnfParse.set(cnfSec,"backuppath", str(self.backupPath))
## Path
cnfSec = "Path"
cnfParse.add_section(cnfSec)