Added issues tracker menu entry, and made a few minor changes

This commit is contained in:
Veronica K. B. Olsen
2020-06-19 19:51:23 +02:00
parent fdf7915747
commit ee23f937f2
4 changed files with 36 additions and 13 deletions
+1
View File
@@ -47,6 +47,7 @@ __maintainer__ = "Veronica Berglyd Olsen"
__email__ = "code@vkbo.net" __email__ = "code@vkbo.net"
__status__ = "Pre-Release" __status__ = "Pre-Release"
__url__ = "https://github.com/vkbo/novelWriter" __url__ = "https://github.com/vkbo/novelWriter"
__issuesurl__ = "https://github.com/vkbo/novelWriter/issues"
__domain__ = "novelwriter.io" __domain__ = "novelwriter.io"
__docurl__ = "https://novelwriter.readthedocs.io" __docurl__ = "https://novelwriter.readthedocs.io"
__credits__ = [ __credits__ = [
+28 -6
View File
@@ -28,7 +28,7 @@
import logging import logging
import nw import nw
from PyQt5.QtCore import Qt, QUrl from PyQt5.QtCore import QUrl
from PyQt5.QtGui import QDesktopServices from PyQt5.QtGui import QDesktopServices
from PyQt5.QtWidgets import QMenuBar, QAction, QMessageBox from PyQt5.QtWidgets import QMenuBar, QAction, QMessageBox
@@ -99,6 +99,8 @@ class GuiMainMenu(QMenuBar):
## ##
def _menuExit(self): def _menuExit(self):
"""Exit novelWriter.
"""
self.theParent.closeMain() self.theParent.closeMain()
return return
@@ -125,19 +127,33 @@ class GuiMainMenu(QMenuBar):
return True return True
def _showAboutQt(self): def _showAboutQt(self):
"""Show Qt's own About dialog.
"""
msgBox = QMessageBox() msgBox = QMessageBox()
msgBox.aboutQt(self.theParent,"About Qt") msgBox.aboutQt(self.theParent,"About Qt")
return True return True
def _openHelp(self): def _openHelp(self):
"""Open the documentation URL in the system's default browser.
"""
QDesktopServices.openUrl(QUrl(nw.__docurl__)) QDesktopServices.openUrl(QUrl(nw.__docurl__))
return True return True
def _openIssue(self):
"""Open the issue tracker URL in the system's default browser.
"""
QDesktopServices.openUrl(QUrl(nw.__issuesurl__))
return True
def _showDocumentLocation(self): def _showDocumentLocation(self):
"""Open the dialog showing the location of the editor document.
"""
self.theParent.docEditor.revealLocation() self.theParent.docEditor.revealLocation()
return True return True
def _doBackup(self): def _doBackup(self):
"""Call the backup function for the project.
"""
self.theProject.zipIt(True) self.theProject.zipIt(True)
return True return True
@@ -230,14 +246,14 @@ class GuiMainMenu(QMenuBar):
self.projMenu.addSeparator() self.projMenu.addSeparator()
# Project > Edit # Project > Edit
self.aEditItem = QAction("&Edit Project Item", self) self.aEditItem = QAction("Edit Project Item", self)
self.aEditItem.setStatusTip("Change item settings") self.aEditItem.setStatusTip("Change item settings")
self.aEditItem.setShortcuts(["Ctrl+E", "F2"]) self.aEditItem.setShortcuts(["Ctrl+E", "F2"])
self.aEditItem.triggered.connect(self.theParent.editItem) self.aEditItem.triggered.connect(self.theParent.editItem)
self.projMenu.addAction(self.aEditItem) self.projMenu.addAction(self.aEditItem)
# Project > Delete # Project > Delete
self.aDeleteItem = QAction("&Delete Project Item", self) self.aDeleteItem = QAction("Delete Project Item", self)
self.aDeleteItem.setStatusTip("Delete selected item") self.aDeleteItem.setStatusTip("Delete selected item")
self.aDeleteItem.setShortcut("Ctrl+Del") self.aDeleteItem.setShortcut("Ctrl+Del")
self.aDeleteItem.triggered.connect(lambda : self.theParent.treeView.deleteItem(None)) self.aDeleteItem.triggered.connect(lambda : self.theParent.treeView.deleteItem(None))
@@ -267,21 +283,21 @@ class GuiMainMenu(QMenuBar):
self.docuMenu = self.addMenu("&Document") self.docuMenu = self.addMenu("&Document")
# Document > New # Document > New
self.aNewDoc = QAction("&New Document", self) self.aNewDoc = QAction("New Document", self)
self.aNewDoc.setStatusTip("Create new document") self.aNewDoc.setStatusTip("Create new document")
self.aNewDoc.setShortcut("Ctrl+N") self.aNewDoc.setShortcut("Ctrl+N")
self.aNewDoc.triggered.connect(lambda : self._newTreeItem(nwItemType.FILE, None)) self.aNewDoc.triggered.connect(lambda : self._newTreeItem(nwItemType.FILE, None))
self.docuMenu.addAction(self.aNewDoc) self.docuMenu.addAction(self.aNewDoc)
# Document > Open # Document > Open
self.aOpenDoc = QAction("&Open Document", self) self.aOpenDoc = QAction("Open Document", self)
self.aOpenDoc.setStatusTip("Open selected document") self.aOpenDoc.setStatusTip("Open selected document")
self.aOpenDoc.setShortcut("Ctrl+O") self.aOpenDoc.setShortcut("Ctrl+O")
self.aOpenDoc.triggered.connect(self.theParent.openSelectedItem) self.aOpenDoc.triggered.connect(self.theParent.openSelectedItem)
self.docuMenu.addAction(self.aOpenDoc) self.docuMenu.addAction(self.aOpenDoc)
# Document > Save # Document > Save
self.aSaveDoc = QAction("&Save Document", self) self.aSaveDoc = QAction("Save Document", self)
self.aSaveDoc.setStatusTip("Save current document") self.aSaveDoc.setStatusTip("Save current document")
self.aSaveDoc.setShortcut("Ctrl+S") self.aSaveDoc.setShortcut("Ctrl+S")
self.aSaveDoc.triggered.connect(self.theParent.saveDocument) self.aSaveDoc.triggered.connect(self.theParent.saveDocument)
@@ -764,6 +780,12 @@ class GuiMainMenu(QMenuBar):
self.aHelp.triggered.connect(self._openHelp) self.aHelp.triggered.connect(self._openHelp)
self.helpMenu.addAction(self.aHelp) self.helpMenu.addAction(self.aHelp)
# Document > Report Issue
self.aIssue = QAction("Report an Issue", self)
self.aIssue.setStatusTip("View online documentation")
self.aIssue.triggered.connect(self._openIssue)
self.helpMenu.addAction(self.aIssue)
return return
# END Class GuiMainMenu # END Class GuiMainMenu
+1 -1
View File
@@ -13,7 +13,7 @@ In addition, the editor supports automatic formatting of “quotes”, both doub
If you have the need for it, you can also add text that can be automatically replaced by other text when you generate a preview or export the project. Now, lets auto-replace this A with <A>, and this C with <C>. While <E> is just <E>. Press Ctrl+R to see what this looks like in the view pane. If you have the need for it, you can also add text that can be automatically replaced by other text when you generate a preview or export the project. Now, lets auto-replace this A with <A>, and this C with <C>. While <E> is just <E>. Press Ctrl+R to see what this looks like in the view pane.
The editor also supports non breaking spaces, and the spell checker accepts long dashes—like this—as valid word separators. Regular dashes are also supported and can be automatically inserted when typing two hyphens. The editor also supports non breaking spaces, and the spell checker accepts long dashes—like this—as valid word separators. Regular dashes are also supported and can be automatically inserted when typing two hyphens.
Thin spaces and thin non-breaking spaces are also supported from the Insert menu, and can be used to separate numbers from their units, like: 25kg. Thin spaces and thin non-breaking spaces are also supported from the Insert menu, and can be used to separate numbers from their units, like: 25kg.
+6 -6
View File
@@ -1,13 +1,13 @@
<?xml version='1.0' encoding='utf-8'?> <?xml version='1.0' encoding='utf-8'?>
<novelWriterXML appVersion="0.9.0rc1" hexVersion="0x000900c1" fileVersion="1.1" timeStamp="2020-06-19 10:49:27"> <novelWriterXML appVersion="0.9.0rc1" hexVersion="0x000900c1" fileVersion="1.1" timeStamp="2020-06-19 19:50:54">
<project> <project>
<name>Sample Project</name> <name>Sample Project</name>
<title>Sample Project</title> <title>Sample Project</title>
<author>Jane Smith</author> <author>Jane Smith</author>
<author>Jay Doh</author> <author>Jay Doh</author>
<saveCount>404</saveCount> <saveCount>407</saveCount>
<autoCount>70</autoCount> <autoCount>71</autoCount>
<editTime>14966</editTime> <editTime>15118</editTime>
</project> </project>
<settings> <settings>
<doBackup>False</doBackup> <doBackup>False</doBackup>
@@ -114,10 +114,10 @@
<status>1st Draft</status> <status>1st Draft</status>
<exported>True</exported> <exported>True</exported>
<layout>SCENE</layout> <layout>SCENE</layout>
<charCount>1484</charCount> <charCount>1483</charCount>
<wordCount>263</wordCount> <wordCount>263</wordCount>
<paraCount>8</paraCount> <paraCount>8</paraCount>
<cursorPos>1087</cursorPos> <cursorPos>1086</cursorPos>
</item> </item>
<item handle="bc0cbd2a407f3" order="2" parent="e7ded148d6e4a"> <item handle="bc0cbd2a407f3" order="2" parent="e7ded148d6e4a">
<name>Another Scene</name> <name>Another Scene</name>