Added an import file to document feature

This commit is contained in:
Veronica K. B. Olsen
2019-10-23 21:05:33 +02:00
parent 0f67e9b971
commit 558af9f329
5 changed files with 69 additions and 3 deletions
+8
View File
@@ -47,6 +47,7 @@ class Config:
self.confPath = None
self.confFile = None
self.homePath = None
self.lastPath = None
self.appPath = None
self.appRoot = None
self.appIcon = None
@@ -129,6 +130,7 @@ class Config:
self.confFile = self.appHandle+".conf"
self.homePath = path.expanduser("~")
self.lastPath = self.homePath
self.appPath = path.dirname(__file__)
self.appRoot = path.join(self.appPath,path.pardir)
self.helpPath = path.join(self.appRoot,"help","en_GB")
@@ -212,6 +214,7 @@ class Config:
## Path
cnfSec = "Path"
self.lastPath = self._parseLine(cnfParse, cnfSec, "lastpath", self.CNF_STR, self.lastPath)
for i in range(10):
self.recentList[i] = self._parseLine(cnfParse, cnfSec, "recent%d" % i,self.CNF_STR, self.recentList[i])
@@ -278,6 +281,7 @@ class Config:
## Path
cnfSec = "Path"
cnfParse.add_section(cnfSec)
cnfParse.set(cnfSec,"lastpath", str(self.lastPath))
for i in range(10):
cnfParse.set(cnfSec,"recent%d" % i, str(self.recentList[i]))
@@ -312,6 +316,10 @@ class Config:
self.confFile = path.basename(newPath)
return True
def setLastPath(self, lastPath):
self.lastPath = path.dirname(lastPath)
return True
def setWinSize(self, newWidth, newHeight):
if abs(self.winGeometry[0] - newWidth) > 5:
self.winGeometry[0] = newWidth