Rename ambiguous theParent variable to mainGui

This commit is contained in:
Veronica Berglyd Olsen
2022-06-11 15:33:32 +02:00
parent b8d557646a
commit 0181bebd70
28 changed files with 407 additions and 408 deletions
+14 -14
View File
@@ -43,15 +43,15 @@ logger = logging.getLogger(__name__)
class GuiProjectDetails(PagedDialog):
def __init__(self, theParent):
PagedDialog.__init__(self, theParent)
def __init__(self, mainGui):
PagedDialog.__init__(self, mainGui)
logger.debug("Initialising GuiProjectDetails ...")
self.setObjectName("GuiProjectDetails")
self.mainConf = novelwriter.CONFIG
self.theParent = theParent
self.theProject = theParent.theProject
self.mainGui = mainGui
self.theProject = mainGui.theProject
self.setWindowTitle(self.tr("Project Details"))
@@ -66,8 +66,8 @@ class GuiProjectDetails(PagedDialog):
self.mainConf.pxInt(pOptions.getInt("GuiProjectDetails", "winHeight", wH))
)
self.tabMain = GuiProjectDetailsMain(self.theParent, self.theProject)
self.tabContents = GuiProjectDetailsContents(self.theParent, self.theProject)
self.tabMain = GuiProjectDetailsMain(self.mainGui, self.theProject)
self.tabContents = GuiProjectDetailsContents(self.mainGui, self.theProject)
self.addTab(self.tabMain, self.tr("Overview"))
self.addTab(self.tabContents, self.tr("Contents"))
@@ -139,13 +139,13 @@ class GuiProjectDetails(PagedDialog):
class GuiProjectDetailsMain(QWidget):
def __init__(self, theParent, theProject):
QWidget.__init__(self, theParent)
def __init__(self, mainGui, theProject):
QWidget.__init__(self, mainGui)
self.mainConf = novelwriter.CONFIG
self.theParent = theParent
self.theProject = theProject
self.theTheme = theParent.theTheme
self.mainGui = mainGui
self.theTheme = mainGui.theTheme
fPx = self.theTheme.fontPixelSize
fPt = self.theTheme.fontPointSize
@@ -271,13 +271,13 @@ class GuiProjectDetailsContents(QWidget):
C_PAGE = 3
C_PROG = 4
def __init__(self, theParent, theProject):
QWidget.__init__(self, theParent)
def __init__(self, mainGui, theProject):
QWidget.__init__(self, mainGui)
self.mainConf = novelwriter.CONFIG
self.theParent = theParent
self.theProject = theProject
self.theTheme = theParent.theTheme
self.mainGui = mainGui
self.theTheme = mainGui.theTheme
# Internal
self._theToC = []