Save the state of the references panel

This commit is contained in:
Veronica K. B. Olsen
2019-11-02 19:41:41 +01:00
parent 69e3edfaee
commit 4c4c4548c4
2 changed files with 24 additions and 9 deletions
+21 -2
View File
@@ -62,6 +62,8 @@ class Config:
## General
self.guiTheme = "default"
self.guiSyntax = "default_light"
## Sizes
self.winGeometry = [1100, 650]
self.treeColWidth = [120, 30, 50]
self.mainPanePos = [300, 800]
@@ -94,12 +96,15 @@ class Config:
self.spellLanguage = "en_GB"
# Backup
## Backup
self.backupPath = ""
self.backupOnClose = False
self.askBeforeBackup = True
# Path
## State
self.showRefPanel = True
## Path
self.recentList = [""]*10
# Check Qt5 Versions
@@ -244,6 +249,10 @@ class Config:
self.backupOnClose = self._parseLine(cnfParse, cnfSec, "backuponclose", self.CNF_BOOL, self.backupOnClose)
self.askBeforeBackup = self._parseLine(cnfParse, cnfSec, "askbeforebackup", self.CNF_BOOL, self.askBeforeBackup)
## State
cnfSec = "State"
self.showRefPanel = self._parseLine(cnfParse, cnfSec, "showrefdetails", self.CNF_BOOL, self.showRefPanel)
## Path
cnfSec = "Path"
self.lastPath = self._parseLine(cnfParse, cnfSec, "lastpath", self.CNF_STR, self.lastPath)
@@ -312,6 +321,11 @@ class Config:
cnfParse.set(cnfSec,"backuponclose", str(self.backupOnClose))
cnfParse.set(cnfSec,"askbeforebackup",str(self.askBeforeBackup))
## State
cnfSec = "State"
cnfParse.add_section(cnfSec)
cnfParse.set(cnfSec,"showrefdetails",str(self.showRefPanel))
## Path
cnfSec = "Path"
cnfParse.add_section(cnfSec)
@@ -385,6 +399,11 @@ class Config:
self.confChanged = True
return True
def setShowRefPanel(self, checkState):
self.showRefPanel = checkState
self.confChanged = True
return
##
# Internal Functions
##