Added buttons to rebuild index and timeline view

This commit is contained in:
Veronica K. B. Olsen
2019-06-01 17:19:03 +02:00
parent 915d9807f7
commit bcd3cf5bcd
2 changed files with 39 additions and 13 deletions
+18 -7
View File
@@ -22,9 +22,6 @@ logger = logging.getLogger(__name__)
class Config:
WIN_WIDTH = 0
WIN_HEIGHT = 1
CNF_STR = 0
CNF_INT = 1
CNF_BOOL = 2
@@ -58,6 +55,9 @@ class Config:
self.mainPanePos = [300, 800]
self.docPanePos = [400, 400]
## Dialogs
self.dlgTimeLine = [600, 400]
## Project
self.autoSaveProj = 60
self.autoSaveDoc = 30
@@ -143,6 +143,7 @@ class Config:
self.treeColWidth = self._parseLine(cnfParse, cnfSec, "treecols", self.CNF_LIST, self.treeColWidth)
self.mainPanePos = self._parseLine(cnfParse, cnfSec, "mainpane", self.CNF_LIST, self.mainPanePos)
self.docPanePos = self._parseLine(cnfParse, cnfSec, "docpane", self.CNF_LIST, self.docPanePos)
self.dlgTimeLine = self._parseLine(cnfParse, cnfSec, "timeline", self.CNF_LIST, self.dlgTimeLine)
## Project
cnfSec = "Project"
@@ -192,6 +193,7 @@ class Config:
cnfParse.set(cnfSec,"treecols", self._packList(self.treeColWidth))
cnfParse.set(cnfSec,"mainpane", self._packList(self.mainPanePos))
cnfParse.set(cnfSec,"docpane", self._packList(self.docPanePos))
cnfParse.set(cnfSec,"timeline", self._packList(self.dlgTimeLine))
## Project
cnfSec = "Project"
@@ -254,11 +256,20 @@ class Config:
return True
def setWinSize(self, newWidth, newHeight):
if abs(self.winGeometry[self.WIN_WIDTH] - newWidth) >= 10:
self.winGeometry[self.WIN_WIDTH] = newWidth
if abs(self.winGeometry[0] - newHeight) > 5:
self.winGeometry[0] = newWidth
self.confChanged = True
if abs(self.winGeometry[self.WIN_HEIGHT] - newHeight) >= 10:
self.winGeometry[self.WIN_HEIGHT] = newHeight
if abs(self.winGeometry[1] - newHeight) > 5:
self.winGeometry[1] = newHeight
self.confChanged = True
return True
def setTLineSize(self, newWidth, newHeight):
if abs(self.dlgTimeLine[0] - newHeight) > 5:
self.dlgTimeLine[0] = newWidth
self.confChanged = True
if abs(self.dlgTimeLine[1] - newHeight) > 5:
self.dlgTimeLine[1] = newHeight
self.confChanged = True
return True