Connected the preferences dialog to the menu and main gui
This commit is contained in:
+6
-4
@@ -492,10 +492,12 @@ class GuiMainMenu(QMenuBar):
|
||||
menuItem.triggered.connect(self.theParent.rebuildIndex)
|
||||
self.toolsMenu.addAction(menuItem)
|
||||
|
||||
# # Tools > Settings
|
||||
# menuItem = QAction(QIcon.fromTheme("preferences-system"), "Preferences", self)
|
||||
# menuItem.setStatusTip("Preferences")
|
||||
# self.toolsMenu.addAction(menuItem)
|
||||
# Tools > Settings
|
||||
menuItem = QAction(QIcon.fromTheme("preferences-system"), "Preferences", self)
|
||||
menuItem.setStatusTip("Preferences")
|
||||
menuItem.setShortcut("Ctrl+,")
|
||||
menuItem.triggered.connect(self.theParent.editConfigDialog)
|
||||
self.toolsMenu.addAction(menuItem)
|
||||
|
||||
return
|
||||
|
||||
|
||||
@@ -27,6 +27,7 @@ from nw.gui.doceditor import GuiDocEditor
|
||||
from nw.gui.docviewer import GuiDocViewer
|
||||
from nw.gui.docdetails import GuiDocDetails
|
||||
from nw.gui.mainmenu import GuiMainMenu
|
||||
from nw.gui.configeditor import GuiConfigEditor
|
||||
from nw.gui.projecteditor import GuiProjectEditor
|
||||
from nw.gui.itemeditor import GuiItemEditor
|
||||
from nw.gui.statusbar import GuiMainStatus
|
||||
@@ -454,6 +455,11 @@ class GuiMain(QMainWindow):
|
||||
return projPath
|
||||
return None
|
||||
|
||||
def editConfigDialog(self):
|
||||
dlgProj = GuiConfigEditor(self, self.theProject)
|
||||
dlgProj.exec_()
|
||||
return True
|
||||
|
||||
def editProjectDialog(self):
|
||||
if self.hasProject:
|
||||
dlgProj = GuiProjectEditor(self, self.theProject)
|
||||
|
||||
Reference in New Issue
Block a user