Some minor tweaks, and added option for showing full path
This commit is contained in:
@@ -116,6 +116,7 @@ class Config:
|
||||
self.showTabsNSpaces = False
|
||||
self.showLineEndings = False
|
||||
self.bigDocLimit = 800
|
||||
self.showFullPath = True
|
||||
|
||||
self.fmtApostrophe = nwUnicode.U_RSQUO
|
||||
self.fmtSingleQuotes = [nwUnicode.U_LSQUO,nwUnicode.U_RSQUO]
|
||||
@@ -398,6 +399,9 @@ class Config:
|
||||
self.bigDocLimit = self._parseLine(
|
||||
cnfParse, cnfSec, "bigdoclimit", self.CNF_INT, self.bigDocLimit
|
||||
)
|
||||
self.showFullPath = self._parseLine(
|
||||
cnfParse, cnfSec, "showfullpath", self.CNF_BOOL, self.showFullPath
|
||||
)
|
||||
|
||||
## Backup
|
||||
cnfSec = "Backup"
|
||||
@@ -486,6 +490,7 @@ class Config:
|
||||
cnfParse.set(cnfSec,"showtabsnspaces", str(self.showTabsNSpaces))
|
||||
cnfParse.set(cnfSec,"showlineendings", str(self.showLineEndings))
|
||||
cnfParse.set(cnfSec,"bigdoclimit", str(self.bigDocLimit))
|
||||
cnfParse.set(cnfSec,"showfullpath", str(self.showFullPath))
|
||||
|
||||
## Backup
|
||||
cnfSec = "Backup"
|
||||
|
||||
@@ -132,6 +132,9 @@ class GuiDocEditor(QTextEdit):
|
||||
|
||||
logger.debug("DocEditor initialisation complete")
|
||||
|
||||
# Connect Functions
|
||||
self.setSelectedHandle = self.theParent.treeView.setSelectedHandle
|
||||
|
||||
return
|
||||
|
||||
def clearEditor(self):
|
||||
|
||||
@@ -85,7 +85,7 @@ class GuiDocTitleBar(QLabel):
|
||||
if tHandle is None:
|
||||
return False
|
||||
|
||||
if True:
|
||||
if self.mainConf.showFullPath:
|
||||
tTitle = []
|
||||
tTree = self.theProject.getItemPath(tHandle)
|
||||
for aHandle in reversed(tTree):
|
||||
@@ -111,7 +111,7 @@ class GuiDocTitleBar(QLabel):
|
||||
"""Capture a click on the title and ensure that the item is
|
||||
selected in the project tree.
|
||||
"""
|
||||
self.theParent.theParent.treeView.setSelectedHandle(self.theHandle)
|
||||
self.theParent.setSelectedHandle(self.theHandle)
|
||||
return
|
||||
|
||||
# END Class GuiDocTitleBar
|
||||
|
||||
@@ -71,6 +71,9 @@ class GuiDocViewer(QTextBrowser):
|
||||
|
||||
logger.debug("DocViewer initialisation complete")
|
||||
|
||||
# Connect Functions
|
||||
self.setSelectedHandle = self.theParent.treeView.setSelectedHandle
|
||||
|
||||
return
|
||||
|
||||
def clearViewer(self):
|
||||
|
||||
+3
-3
@@ -90,12 +90,12 @@ class GuiMain(QMainWindow):
|
||||
# Main GUI Elements
|
||||
self.statusBar = GuiMainStatus(self)
|
||||
self.noticeBar = GuiNoticeBar(self)
|
||||
self.treeView = GuiDocTree(self, self.theProject)
|
||||
self.docEditor = GuiDocEditor(self, self.theProject)
|
||||
self.docViewer = GuiDocViewer(self, self.theProject)
|
||||
self.viewMeta = GuiDocViewDetails(self, self.theProject)
|
||||
self.searchBar = GuiSearchBar(self)
|
||||
self.treeMeta = GuiDocDetails(self, self.theProject)
|
||||
self.treeView = GuiDocTree(self, self.theProject)
|
||||
self.projView = GuiProjectOutline(self, self.theProject)
|
||||
self.mainMenu = GuiMainMenu(self, self.theProject)
|
||||
|
||||
@@ -114,7 +114,7 @@ class GuiMain(QMainWindow):
|
||||
self.editPane = QFrame()
|
||||
self.docEdit = QVBoxLayout()
|
||||
self.docEdit.setContentsMargins(0,0,0,0)
|
||||
self.docEdit.setSpacing(0)
|
||||
self.docEdit.setSpacing(2)
|
||||
self.docEdit.addWidget(self.searchBar)
|
||||
self.docEdit.addWidget(self.noticeBar)
|
||||
self.docEdit.addWidget(self.docEditor)
|
||||
@@ -123,7 +123,7 @@ class GuiMain(QMainWindow):
|
||||
self.viewPane = QFrame()
|
||||
self.docView = QVBoxLayout()
|
||||
self.docView.setContentsMargins(0,0,0,0)
|
||||
self.docView.setSpacing(0)
|
||||
self.docView.setSpacing(2)
|
||||
self.docView.addWidget(self.docViewer)
|
||||
self.docView.addWidget(self.viewMeta)
|
||||
self.docView.setStretch(0, 1)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
[Main]
|
||||
timestamp = 2020-04-14 22:47:16
|
||||
timestamp = 2020-05-01 21:28:25
|
||||
theme = default
|
||||
syntax = default_light
|
||||
guidark = False
|
||||
@@ -38,6 +38,7 @@ spellcheck = en
|
||||
showtabsnspaces = False
|
||||
showlineendings = False
|
||||
bigdoclimit = 800
|
||||
showfullpath = True
|
||||
|
||||
[Backup]
|
||||
backuppath =
|
||||
|
||||
Reference in New Issue
Block a user