diff --git a/nw/__init__.py b/nw/__init__.py index a9ca37f4..c510956b 100644 --- a/nw/__init__.py +++ b/nw/__init__.py @@ -25,7 +25,7 @@ __copyright__ = "Copyright 2016-2018, Veronica Berglyd Olsen" __credits__ = ["Veronica Berglyd Olsen"] __license__ = "GPLv3" __version__ = "0.0.1" -__date__ = "2018" +__date__ = "2019.xx.xx" __maintainer__ = "Veronica Berglyd Olsen" __email__ = "code@vkbo.net" __status__ = "Development" diff --git a/nw/gui/mainmenu.py b/nw/gui/mainmenu.py index d0a3598a..d54a1ac1 100644 --- a/nw/gui/mainmenu.py +++ b/nw/gui/mainmenu.py @@ -13,7 +13,7 @@ import logging import nw -from PyQt5.QtWidgets import qApp, QMenuBar, QAction +from PyQt5.QtWidgets import qApp, QMenuBar, QAction, QMessageBox from PyQt5.QtGui import QIcon from nw.enum import nwItemType, nwItemClass, nwDocAction @@ -80,7 +80,29 @@ class GuiMainMenu(QMenuBar): return True def _showAbout(self): - self.docTabs.createTab(None,nw.DOCTYPE_ABOUT) + msgBox = QMessageBox() + msgBox.about(self.theParent, "About %s" % nw.__package__, ( + "

About {name:s}

" + "

Version: {version:s}
Release Date: {date:s}

" + "

{name:s} is a text editor designed for writing novels. " + "It is written in Python 3 with a Qt5 GUI. The Python and Qt layers are connected with PyQt5

" + "

{name:s} is is licensed under GPL v3.0

" + "

Copyright 2018–{year:s} {author:s}

" + "

Credits

" + "

{credits:s}

" + ).format( + name = nw.__package__, + version = nw.__version__, + date = nw.__date__, + year = nw.__date__[:4], + author = nw.__author__, + credits = "
".join(nw.__credits__), + )) + return True + + def _showAboutQt(self): + msgBox = QMessageBox() + msgBox.aboutQt(self.theParent,"About Qt") return True ## @@ -397,6 +419,7 @@ class GuiMainMenu(QMenuBar): # Help > About Qt5 menuItem = QAction(QIcon.fromTheme("help-about"), "About Qt5", self) menuItem.setStatusTip("About Qt5") + menuItem.triggered.connect(self._showAboutQt) self.helpMenu.addAction(menuItem) return