Allow showing comments in document view pane, with a toggle swithc in document menu
This commit is contained in:
+14
-1
@@ -112,6 +112,11 @@ class GuiMainMenu(QMenuBar):
|
||||
self.toolsSpellCheck.setChecked(False)
|
||||
return True
|
||||
|
||||
def _toggleViewComments(self):
|
||||
self.mainConf.setViewComments(self.docViewComments.isChecked())
|
||||
self.theParent.docViewer.reloadText()
|
||||
return True
|
||||
|
||||
def _showAbout(self):
|
||||
listPrefix = " • "
|
||||
aboutMsg = (
|
||||
@@ -331,10 +336,18 @@ class GuiMainMenu(QMenuBar):
|
||||
menuItem.triggered.connect(self.theParent.closeDocViewer)
|
||||
self.docuMenu.addAction(menuItem)
|
||||
|
||||
# Document > Toggle View Comments
|
||||
self.docViewComments = QAction("View Comments", self)
|
||||
self.docViewComments.setStatusTip("Show comments in view panel")
|
||||
self.docViewComments.setCheckable(True)
|
||||
self.docViewComments.setChecked(self.mainConf.viewComments)
|
||||
self.docViewComments.toggled.connect(self._toggleViewComments)
|
||||
self.docuMenu.addAction(self.docViewComments)
|
||||
|
||||
# Document > Separator
|
||||
self.docuMenu.addSeparator()
|
||||
|
||||
# Document > Close Preview
|
||||
# Document > Import From File
|
||||
menuItem = QAction("Import from File", self)
|
||||
menuItem.setStatusTip("Import document from a text or markdown file")
|
||||
menuItem.setShortcut("Ctrl+Shift+I")
|
||||
|
||||
Reference in New Issue
Block a user