Remove some unnecessary branches and unused functions
This commit is contained in:
@@ -102,10 +102,9 @@ class GuiDocHighlighter(QSyntaxHighlighter):
|
||||
self.colTrail = QColor(*self.theTheme.colEmph)
|
||||
self.colTrail.setAlpha(64)
|
||||
|
||||
self.colEmph = None
|
||||
if self.mainConf.highlightEmph:
|
||||
self.colEmph = QColor(*self.theTheme.colEmph)
|
||||
else:
|
||||
self.colEmph = None
|
||||
|
||||
self.hStyles = {
|
||||
"header1" : self._makeFormat(self.colHead, "bold", 1.8),
|
||||
|
||||
@@ -806,14 +806,6 @@ class GuiConfigEditEditingTab(QWidget):
|
||||
# Internal Functions
|
||||
##
|
||||
|
||||
def _disableComboItem(self, theList, theValue):
|
||||
"""Disable a list item in the combo box.
|
||||
"""
|
||||
theModel = theList.model()
|
||||
anItem = theModel.item(1)
|
||||
anItem.setFlags(anItem.flags() ^ Qt.ItemIsEnabled)
|
||||
return theModel
|
||||
|
||||
def _doUpdateSpellTool(self, currIdx):
|
||||
"""Update the list of dictionaries based on spell tool selected.
|
||||
"""
|
||||
|
||||
+3
-3
@@ -155,14 +155,14 @@ class GuiProjectLoad(QDialog):
|
||||
logger.verbose("GuiProjectLoad open button clicked")
|
||||
self._saveSettings()
|
||||
|
||||
self.openPath = None
|
||||
self.openState = self.NONE_STATE
|
||||
|
||||
selItems = self.listBox.selectedItems()
|
||||
if selItems:
|
||||
self.openPath = selItems[0].data(self.C_NAME, Qt.UserRole)
|
||||
self.openState = self.OPEN_STATE
|
||||
self.accept()
|
||||
else:
|
||||
self.openPath = None
|
||||
self.openState = self.NONE_STATE
|
||||
|
||||
return
|
||||
|
||||
|
||||
+6
-6
@@ -130,6 +130,7 @@ class GuiMainStatus(QStatusBar):
|
||||
"""Reset all widgets on the status bar to default values.
|
||||
"""
|
||||
self.setRefTime(None)
|
||||
self.setLanguage(None)
|
||||
self.setStats(0, 0)
|
||||
self.setProjectStatus(None)
|
||||
self.setDocumentStatus(None)
|
||||
@@ -234,15 +235,14 @@ class StatusLED(QAbstractButton):
|
||||
def setState(self, theState):
|
||||
"""Set the colour state.
|
||||
"""
|
||||
if theState is None:
|
||||
self._theCol = self.colNone
|
||||
elif theState:
|
||||
self._theCol = self.colNone
|
||||
if theState is True:
|
||||
self._theCol = self.colTrue
|
||||
elif not theState:
|
||||
elif theState is False:
|
||||
self._theCol = self.colFalse
|
||||
else:
|
||||
self._theCol = self.colNone
|
||||
|
||||
self.update()
|
||||
|
||||
return
|
||||
|
||||
##
|
||||
|
||||
Reference in New Issue
Block a user