Added merge documents dialog and related code

This commit is contained in:
Veronica K. B. Olsen
2020-01-23 15:52:27 +01:00
parent a111247a3c
commit 6cac679458
7 changed files with 134 additions and 1 deletions
+12 -1
View File
@@ -27,7 +27,7 @@ from nw.gui import (
GuiMainMenu, GuiMainStatus, GuiTheme, GuiDocTree, GuiDocEditor,
GuiDocViewer, GuiDocDetails, GuiSearchBar, GuiNoticeBar,
GuiDocViewDetails, GuiConfigEditor, GuiProjectEditor, GuiExport,
GuiItemEditor, GuiTimeLineView, GuiSessionLogView
GuiItemEditor, GuiTimeLineView, GuiSessionLogView, GuiDocMerge
)
from nw.project import NWProject, NWDoc, NWItem, NWIndex, NWBackup
from nw.tools import countWords
@@ -458,6 +458,17 @@ class GuiMain(QMainWindow):
return True
def mergeDocuments(self):
"""Merge multiple documents to one single new document.
"""
if self.mainConf.showGUI:
dlgMerge = GuiDocMerge(self, self.theProject)
if dlgMerge.exec_():
pass
return True
def passDocumentAction(self, theAction):
"""Pass on document action theAction to whatever document has
the focus. If no document has focus, the action is discarded.