Added more system checks and help now opens the documentation website

This commit is contained in:
Veronica K. B. Olsen
2019-10-24 21:13:11 +02:00
parent 3ae87b6cf4
commit 4a98f58a20
7 changed files with 42 additions and 649 deletions
+7 -2
View File
@@ -13,7 +13,8 @@
import logging
import nw
from PyQt5.QtGui import QIcon
from PyQt5.QtCore import QUrl
from PyQt5.QtGui import QIcon, QDesktopServices
from PyQt5.QtWidgets import QMenuBar, QAction, QMessageBox
from nw.enum import nwItemType, nwItemClass, nwDocAction
@@ -145,6 +146,10 @@ class GuiMainMenu(QMenuBar):
msgBox.aboutQt(self.theParent,"About Qt")
return True
def _openHelp(self):
QDesktopServices.openUrl(QUrl(nw.__docurl__))
return True
##
# Menu Builders
##
@@ -604,7 +609,7 @@ class GuiMainMenu(QMenuBar):
menuItem = QAction("Documentation", self)
menuItem.setStatusTip("View documentation")
menuItem.setShortcut("F1")
menuItem.triggered.connect(lambda : self.theParent.viewDocument("Help"))
menuItem.triggered.connect(self._openHelp)
self.helpMenu.addAction(menuItem)
return