Renamed the preferences class to GuiPreferences
This commit is contained in:
+2
-2
@@ -9,7 +9,7 @@ from nw.gui.theme import GuiTheme
|
|||||||
|
|
||||||
# Dialogs
|
# Dialogs
|
||||||
from nw.gui.dialogs.about import GuiAbout
|
from nw.gui.dialogs.about import GuiAbout
|
||||||
from nw.gui.dialogs.configeditor import GuiConfigEditor
|
from nw.gui.dialogs.preferences import GuiPreferences
|
||||||
from nw.gui.dialogs.docmerge import GuiDocMerge
|
from nw.gui.dialogs.docmerge import GuiDocMerge
|
||||||
from nw.gui.dialogs.docsplit import GuiDocSplit
|
from nw.gui.dialogs.docsplit import GuiDocSplit
|
||||||
from nw.gui.dialogs.itemeditor import GuiItemEditor
|
from nw.gui.dialogs.itemeditor import GuiItemEditor
|
||||||
@@ -40,7 +40,7 @@ __all__ = [
|
|||||||
"GuiMainStatus",
|
"GuiMainStatus",
|
||||||
"GuiTheme",
|
"GuiTheme",
|
||||||
"GuiAbout",
|
"GuiAbout",
|
||||||
"GuiConfigEditor",
|
"GuiPreferences",
|
||||||
"GuiDocMerge",
|
"GuiDocMerge",
|
||||||
"GuiDocSplit",
|
"GuiDocSplit",
|
||||||
"GuiItemEditor",
|
"GuiItemEditor",
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
from nw.gui.dialogs.about import GuiAbout
|
from nw.gui.dialogs.about import GuiAbout
|
||||||
from nw.gui.dialogs.configeditor import GuiConfigEditor
|
from nw.gui.dialogs.preferences import GuiPreferences
|
||||||
from nw.gui.dialogs.docmerge import GuiDocMerge
|
from nw.gui.dialogs.docmerge import GuiDocMerge
|
||||||
from nw.gui.dialogs.docsplit import GuiDocSplit
|
from nw.gui.dialogs.docsplit import GuiDocSplit
|
||||||
from nw.gui.dialogs.itemeditor import GuiItemEditor
|
from nw.gui.dialogs.itemeditor import GuiItemEditor
|
||||||
@@ -11,7 +11,7 @@ from nw.gui.dialogs.sessionlog import GuiSessionLogView
|
|||||||
|
|
||||||
__all__ = [
|
__all__ = [
|
||||||
"GuiAbout",
|
"GuiAbout",
|
||||||
"GuiConfigEditor",
|
"GuiPreferences",
|
||||||
"GuiDocMerge",
|
"GuiDocMerge",
|
||||||
"GuiDocSplit",
|
"GuiDocSplit",
|
||||||
"GuiItemEditor",
|
"GuiItemEditor",
|
||||||
|
|||||||
@@ -44,12 +44,12 @@ from nw.constants import nwAlert, nwQuotes
|
|||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
class GuiConfigEditor(PagedDialog):
|
class GuiPreferences(PagedDialog):
|
||||||
|
|
||||||
def __init__(self, theParent, theProject):
|
def __init__(self, theParent, theProject):
|
||||||
PagedDialog.__init__(self, theParent)
|
PagedDialog.__init__(self, theParent)
|
||||||
|
|
||||||
logger.debug("Initialising ConfigEditor ...")
|
logger.debug("Initialising GuiPreferences ...")
|
||||||
|
|
||||||
self.mainConf = nw.CONFIG
|
self.mainConf = nw.CONFIG
|
||||||
self.theParent = theParent
|
self.theParent = theParent
|
||||||
@@ -74,7 +74,7 @@ class GuiConfigEditor(PagedDialog):
|
|||||||
|
|
||||||
self.show()
|
self.show()
|
||||||
|
|
||||||
logger.debug("ConfigEditor initialisation complete")
|
logger.debug("GuiPreferences initialisation complete")
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|
||||||
@@ -122,7 +122,7 @@ class GuiConfigEditor(PagedDialog):
|
|||||||
self.close()
|
self.close()
|
||||||
return
|
return
|
||||||
|
|
||||||
# END Class GuiConfigEditor
|
# END Class GuiPreferences
|
||||||
|
|
||||||
class GuiConfigEditGeneralTab(QWidget):
|
class GuiConfigEditGeneralTab(QWidget):
|
||||||
|
|
||||||
@@ -228,7 +228,7 @@ class GuiConfigEditGeneralTab(QWidget):
|
|||||||
|
|
||||||
## Backup Path
|
## Backup Path
|
||||||
self.backupPath = self.mainConf.backupPath
|
self.backupPath = self.mainConf.backupPath
|
||||||
self.backupGetPath = QPushButton(self.theTheme.getIcon("folder-open"),"Select Folder")
|
self.backupGetPath = QPushButton("Browse")
|
||||||
self.backupGetPath.clicked.connect(self._backupFolder)
|
self.backupGetPath.clicked.connect(self._backupFolder)
|
||||||
self.backupPathRow = self.mainForm.addRow(
|
self.backupPathRow = self.mainForm.addRow(
|
||||||
"Backup storage location",
|
"Backup storage location",
|
||||||
+2
-2
@@ -42,7 +42,7 @@ from PyQt5.QtWidgets import (
|
|||||||
from nw.gui import (
|
from nw.gui import (
|
||||||
GuiMainMenu, GuiMainStatus, GuiTheme, GuiDocTree, GuiDocEditor,
|
GuiMainMenu, GuiMainStatus, GuiTheme, GuiDocTree, GuiDocEditor,
|
||||||
GuiDocViewer, GuiDocDetails, GuiSearchBar, GuiNoticeBar, GuiDocViewDetails,
|
GuiDocViewer, GuiDocDetails, GuiSearchBar, GuiNoticeBar, GuiDocViewDetails,
|
||||||
GuiConfigEditor, GuiProjectSettings, GuiItemEditor, GuiProjectOutline,
|
GuiPreferences, GuiProjectSettings, GuiItemEditor, GuiProjectOutline,
|
||||||
GuiSessionLogView, GuiDocMerge, GuiDocSplit, GuiProjectLoad, GuiBuildNovel
|
GuiSessionLogView, GuiDocMerge, GuiDocSplit, GuiProjectLoad, GuiBuildNovel
|
||||||
)
|
)
|
||||||
from nw.core import NWProject, NWDoc, NWIndex
|
from nw.core import NWProject, NWDoc, NWIndex
|
||||||
@@ -741,7 +741,7 @@ class GuiMain(QMainWindow):
|
|||||||
def editConfigDialog(self):
|
def editConfigDialog(self):
|
||||||
"""Open the preferences dialog.
|
"""Open the preferences dialog.
|
||||||
"""
|
"""
|
||||||
dlgConf = GuiConfigEditor(self, self.theProject)
|
dlgConf = GuiPreferences(self, self.theProject)
|
||||||
if dlgConf.exec_() == QDialog.Accepted:
|
if dlgConf.exec_() == QDialog.Accepted:
|
||||||
logger.debug("Applying new preferences")
|
logger.debug("Applying new preferences")
|
||||||
self.initMain()
|
self.initMain()
|
||||||
|
|||||||
Reference in New Issue
Block a user