Also remove the debuggui feature, as the functionality os handled otherwise if still needed
This commit is contained in:
@@ -80,7 +80,6 @@ def main(sysArgs=None):
|
|||||||
"help",
|
"help",
|
||||||
"debug",
|
"debug",
|
||||||
"verbose",
|
"verbose",
|
||||||
"debuggui",
|
|
||||||
"quiet",
|
"quiet",
|
||||||
"time",
|
"time",
|
||||||
"logfile=",
|
"logfile=",
|
||||||
@@ -100,7 +99,6 @@ def main(sysArgs=None):
|
|||||||
" -v, --version Print program version and exit.\n"
|
" -v, --version Print program version and exit.\n"
|
||||||
" -d, --debug Print debug output.\n"
|
" -d, --debug Print debug output.\n"
|
||||||
" --verbose Increase verbosity of debug output.\n"
|
" --verbose Increase verbosity of debug output.\n"
|
||||||
" -D, --debuggui Shows additional debug GUI elements. Includes -d.\n"
|
|
||||||
" -q, --quiet Disable output to command line. Does not affect log file.\n"
|
" -q, --quiet Disable output to command line. Does not affect log file.\n"
|
||||||
" -t, --time Shows time stamp in logging output.\n"
|
" -t, --time Shows time stamp in logging output.\n"
|
||||||
" -l, --logfile= Specify log file.\n"
|
" -l, --logfile= Specify log file.\n"
|
||||||
@@ -124,7 +122,6 @@ def main(sysArgs=None):
|
|||||||
showTime = False
|
showTime = False
|
||||||
confPath = None
|
confPath = None
|
||||||
testMode = False
|
testMode = False
|
||||||
debugGUI = False
|
|
||||||
spellTool = None
|
spellTool = None
|
||||||
qtStyle = "Fusion"
|
qtStyle = "Fusion"
|
||||||
|
|
||||||
@@ -162,14 +159,9 @@ def main(sysArgs=None):
|
|||||||
testMode = True
|
testMode = True
|
||||||
elif inOpt in ("--spell"):
|
elif inOpt in ("--spell"):
|
||||||
spellTool = inArg
|
spellTool = inArg
|
||||||
elif inOpt in ("-D","--debuggui"):
|
|
||||||
debugLevel = logging.DEBUG
|
|
||||||
debugStr = "{name:>30}:{lineno:<4d} {levelname:8} {message:}"
|
|
||||||
debugGUI = True
|
|
||||||
|
|
||||||
# Set Config Options
|
# Set Config Options
|
||||||
CONFIG.showGUI = not testMode
|
CONFIG.showGUI = not testMode
|
||||||
CONFIG.debugGUI = debugGUI
|
|
||||||
CONFIG.debugInfo = debugLevel < logging.INFO
|
CONFIG.debugInfo = debugLevel < logging.INFO
|
||||||
CONFIG.spellTool = spellTool
|
CONFIG.spellTool = spellTool
|
||||||
|
|
||||||
|
|||||||
@@ -40,7 +40,6 @@ class Config:
|
|||||||
self.appName = nw.__package__
|
self.appName = nw.__package__
|
||||||
self.appHandle = nw.__package__.lower()
|
self.appHandle = nw.__package__.lower()
|
||||||
self.showGUI = True
|
self.showGUI = True
|
||||||
self.debugGUI = False
|
|
||||||
self.debugInfo = False
|
self.debugInfo = False
|
||||||
self.spellTool = None
|
self.spellTool = None
|
||||||
|
|
||||||
|
|||||||
@@ -32,7 +32,6 @@ class GuiDocDetails(QFrame):
|
|||||||
|
|
||||||
logger.debug("Initialising DocDetails ...")
|
logger.debug("Initialising DocDetails ...")
|
||||||
self.mainConf = nw.CONFIG
|
self.mainConf = nw.CONFIG
|
||||||
self.debugGUI = self.mainConf.debugGUI
|
|
||||||
self.theParent = theParent
|
self.theParent = theParent
|
||||||
self.theProject = theProject
|
self.theProject = theProject
|
||||||
|
|
||||||
|
|||||||
@@ -35,7 +35,6 @@ class GuiDocTree(QTreeWidget):
|
|||||||
|
|
||||||
logger.debug("Initialising DocTree ...")
|
logger.debug("Initialising DocTree ...")
|
||||||
self.mainConf = nw.CONFIG
|
self.mainConf = nw.CONFIG
|
||||||
self.debugGUI = self.mainConf.debugGUI
|
|
||||||
self.theParent = theParent
|
self.theParent = theParent
|
||||||
self.theTheme = theParent.theTheme
|
self.theTheme = theParent.theTheme
|
||||||
self.theProject = theProject
|
self.theProject = theProject
|
||||||
@@ -52,8 +51,7 @@ class GuiDocTree(QTreeWidget):
|
|||||||
self.setIndentation(13)
|
self.setIndentation(13)
|
||||||
self.setColumnCount(4)
|
self.setColumnCount(4)
|
||||||
self.setHeaderLabels(["Label","Words","Flags","Handle"])
|
self.setHeaderLabels(["Label","Words","Flags","Handle"])
|
||||||
if not self.debugGUI:
|
self.hideColumn(self.C_HANDLE)
|
||||||
self.hideColumn(self.C_HANDLE)
|
|
||||||
|
|
||||||
treeHead = self.headerItem()
|
treeHead = self.headerItem()
|
||||||
treeHead.setTextAlignment(self.C_COUNT,Qt.AlignRight)
|
treeHead.setTextAlignment(self.C_COUNT,Qt.AlignRight)
|
||||||
|
|||||||
@@ -31,7 +31,6 @@ class GuiDocViewDetails(QWidget):
|
|||||||
|
|
||||||
logger.debug("Initialising DocViewDetails ...")
|
logger.debug("Initialising DocViewDetails ...")
|
||||||
self.mainConf = nw.CONFIG
|
self.mainConf = nw.CONFIG
|
||||||
self.debugGUI = self.mainConf.debugGUI
|
|
||||||
self.theParent = theParent
|
self.theParent = theParent
|
||||||
self.theProject = theProject
|
self.theProject = theProject
|
||||||
self.currHandle = None
|
self.currHandle = None
|
||||||
|
|||||||
@@ -60,9 +60,6 @@ class GuiMainStatus(QStatusBar):
|
|||||||
self.docChanged.setFixedWidth(16)
|
self.docChanged.setFixedWidth(16)
|
||||||
self.docChanged.setToolTip("Document Changes Saved")
|
self.docChanged.setToolTip("Document Changes Saved")
|
||||||
|
|
||||||
self.boxDocHandle = QLabel()
|
|
||||||
self.boxDocHandle.setFrameStyle(QFrame.Panel | QFrame.Sunken);
|
|
||||||
|
|
||||||
# Add Them
|
# Add Them
|
||||||
self.addPermanentWidget(self.docChanged)
|
self.addPermanentWidget(self.docChanged)
|
||||||
self.addPermanentWidget(self.boxCounts)
|
self.addPermanentWidget(self.boxCounts)
|
||||||
@@ -70,8 +67,6 @@ class GuiMainStatus(QStatusBar):
|
|||||||
self.addPermanentWidget(self.projChanged)
|
self.addPermanentWidget(self.projChanged)
|
||||||
self.addPermanentWidget(self.boxStats)
|
self.addPermanentWidget(self.boxStats)
|
||||||
self.addPermanentWidget(self.boxTime)
|
self.addPermanentWidget(self.boxTime)
|
||||||
if self.mainConf.debugGUI:
|
|
||||||
self.addPermanentWidget(self.boxDocHandle)
|
|
||||||
|
|
||||||
self.setSizeGripEnabled(True)
|
self.setSizeGripEnabled(True)
|
||||||
|
|
||||||
@@ -90,7 +85,6 @@ class GuiMainStatus(QStatusBar):
|
|||||||
self.setRefTime(None)
|
self.setRefTime(None)
|
||||||
self.setStats(0,0)
|
self.setStats(0,0)
|
||||||
self.setCounts(0,0,0)
|
self.setCounts(0,0,0)
|
||||||
self.setDocHandle(None)
|
|
||||||
self.setProjectStatus(None)
|
self.setProjectStatus(None)
|
||||||
self.setDocumentStatus(None)
|
self.setDocumentStatus(None)
|
||||||
self._updateTime()
|
self._updateTime()
|
||||||
@@ -134,13 +128,6 @@ class GuiMainStatus(QStatusBar):
|
|||||||
self.boxCounts.setText("<b>Document:</b> {:d} : {:d} : {:d}".format(cC,wC,pC))
|
self.boxCounts.setText("<b>Document:</b> {:d} : {:d} : {:d}".format(cC,wC,pC))
|
||||||
return
|
return
|
||||||
|
|
||||||
def setDocHandle(self, theHandle):
|
|
||||||
if theHandle is None:
|
|
||||||
self.boxDocHandle.setText("0000000000000")
|
|
||||||
else:
|
|
||||||
self.boxDocHandle.setText("%13s" % theHandle)
|
|
||||||
return
|
|
||||||
|
|
||||||
##
|
##
|
||||||
# Internal Functions
|
# Internal Functions
|
||||||
##
|
##
|
||||||
|
|||||||
@@ -82,7 +82,6 @@ class NWDoc():
|
|||||||
|
|
||||||
if showStatus:
|
if showStatus:
|
||||||
self.theParent.statusBar.setStatus("Opened Document: %s" % self.theItem.itemName)
|
self.theParent.statusBar.setStatus("Opened Document: %s" % self.theItem.itemName)
|
||||||
self.theParent.statusBar.setDocHandle(tHandle)
|
|
||||||
|
|
||||||
return theDoc
|
return theDoc
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user