From 815f24fbf593e929db6c554dcc6d4961715185ad Mon Sep 17 00:00:00 2001 From: "Veronica K. B. Olsen" <1619840+vkbo@users.noreply.github.com> Date: Wed, 27 Jan 2021 19:53:53 +0100 Subject: [PATCH 1/5] Add release branch for release candidates --- .github/workflows/test_linux_3.6.yml | 4 ++-- .github/workflows/test_linux_3.7.yml | 4 ++-- .github/workflows/test_linux_3.8.yml | 4 ++-- .github/workflows/test_linux_3.9.yml | 4 ++-- .github/workflows/test_mac.yml | 4 ++-- .github/workflows/test_win.yml | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/test_linux_3.6.yml b/.github/workflows/test_linux_3.6.yml index b234c14a..4f05a299 100644 --- a/.github/workflows/test_linux_3.6.yml +++ b/.github/workflows/test_linux_3.6.yml @@ -2,9 +2,9 @@ name: Linux (3.6) on: push: - branches: [ main, dev ] + branches: [ main, dev, release ] pull_request: - branches: [ main, dev ] + branches: [ main, dev, release ] jobs: testLinux36: diff --git a/.github/workflows/test_linux_3.7.yml b/.github/workflows/test_linux_3.7.yml index f6d36405..857d11c0 100644 --- a/.github/workflows/test_linux_3.7.yml +++ b/.github/workflows/test_linux_3.7.yml @@ -2,9 +2,9 @@ name: Linux (3.7) on: push: - branches: [ main, dev ] + branches: [ main, dev, release ] pull_request: - branches: [ main, dev ] + branches: [ main, dev, release ] jobs: testLinux37: diff --git a/.github/workflows/test_linux_3.8.yml b/.github/workflows/test_linux_3.8.yml index 8c90d7ac..ff78cc93 100644 --- a/.github/workflows/test_linux_3.8.yml +++ b/.github/workflows/test_linux_3.8.yml @@ -2,9 +2,9 @@ name: Linux (3.8) on: push: - branches: [ main, dev ] + branches: [ main, dev, release ] pull_request: - branches: [ main, dev ] + branches: [ main, dev, release ] jobs: testLinux38: diff --git a/.github/workflows/test_linux_3.9.yml b/.github/workflows/test_linux_3.9.yml index 905edb6f..276bd91c 100644 --- a/.github/workflows/test_linux_3.9.yml +++ b/.github/workflows/test_linux_3.9.yml @@ -2,9 +2,9 @@ name: Linux (3.9) on: push: - branches: [ main, dev ] + branches: [ main, dev, release ] pull_request: - branches: [ main, dev ] + branches: [ main, dev, release ] jobs: testLinux39: diff --git a/.github/workflows/test_mac.yml b/.github/workflows/test_mac.yml index aa63cbf2..72cb61a5 100644 --- a/.github/workflows/test_mac.yml +++ b/.github/workflows/test_mac.yml @@ -2,9 +2,9 @@ name: macOS (3.8) on: push: - branches: [ main, dev ] + branches: [ main, dev, release ] pull_request: - branches: [ main, dev ] + branches: [ main, dev, release ] jobs: testMac38: diff --git a/.github/workflows/test_win.yml b/.github/workflows/test_win.yml index fd85b4bf..2bf3390c 100644 --- a/.github/workflows/test_win.yml +++ b/.github/workflows/test_win.yml @@ -2,9 +2,9 @@ name: Windows (3.8) on: push: - branches: [ main, dev ] + branches: [ main, dev, release ] pull_request: - branches: [ main, dev ] + branches: [ main, dev, release ] jobs: testWin38: From 045929681d972895db205639c45aa0942dad28c7 Mon Sep 17 00:00:00 2001 From: "Veronica K. B. Olsen" <1619840+vkbo@users.noreply.github.com> Date: Thu, 28 Jan 2021 21:04:22 +0100 Subject: [PATCH 2/5] Add Alt+4 focus key, and switch main tab on focus change --- nw/gui/mainmenu.py | 7 +++++++ nw/gui/projdetails.py | 2 +- nw/guimain.py | 7 ++++++- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/nw/gui/mainmenu.py b/nw/gui/mainmenu.py index d7332a93..1bdd1c32 100644 --- a/nw/gui/mainmenu.py +++ b/nw/gui/mainmenu.py @@ -468,6 +468,13 @@ class GuiMainMenu(QMenuBar): self.aFocusView.triggered.connect(lambda: self.theParent.setFocus(3)) self.viewMenu.addAction(self.aFocusView) + # View > Outline + self.aFocusOutline = QAction("Focus Outline", self) + self.aFocusOutline.setStatusTip("Move focus to outline") + self.aFocusOutline.setShortcut("Alt+4") + self.aFocusOutline.triggered.connect(lambda: self.theParent.setFocus(4)) + self.viewMenu.addAction(self.aFocusOutline) + # View > Separator self.viewMenu.addSeparator() diff --git a/nw/gui/projdetails.py b/nw/gui/projdetails.py index 0fabaae9..d37cebee 100644 --- a/nw/gui/projdetails.py +++ b/nw/gui/projdetails.py @@ -5,7 +5,7 @@ novelWriter – GUI Project Details Class holding the project details dialog File History: -Created: 2021-01-03 [1.0a0] +Created: 2021-01-03 [1.1a0] This file is a part of novelWriter Copyright 2018–2021, Veronica Berglyd Olsen diff --git a/nw/guimain.py b/nw/guimain.py index 6996f6ad..f6538bf0 100644 --- a/nw/guimain.py +++ b/nw/guimain.py @@ -1128,14 +1128,19 @@ class GuiMain(QMainWindow): return True def setFocus(self, paneNo): - """Switch focus to one of the three main GUI panes. + """Switch focus between main GUI views. """ if paneNo == 1: self.treeView.setFocus() elif paneNo == 2: + self.mainTabs.setCurrentWidget(self.splitDocs) self.docEditor.setFocus() elif paneNo == 3: + self.mainTabs.setCurrentWidget(self.splitDocs) self.docViewer.setFocus() + elif paneNo == 4: + self.mainTabs.setCurrentWidget(self.splitOutline) + self.projView.setFocus() return def closeDocEditor(self): From a23beddc6631701915de6c343caa88bfbe2e8f6c Mon Sep 17 00:00:00 2001 From: "Veronica K. B. Olsen" <1619840+vkbo@users.noreply.github.com> Date: Thu, 28 Jan 2021 21:07:58 +0100 Subject: [PATCH 3/5] Update documentation with new shortcut key --- docs/source/int_interface.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/source/int_interface.rst b/docs/source/int_interface.rst index 3427895f..cf6bc065 100644 --- a/docs/source/int_interface.rst +++ b/docs/source/int_interface.rst @@ -344,6 +344,7 @@ Most features are available as keyboard shortcuts. These are as follows: ":kbd:`Alt`:kbd:`1`", "Switch focus to the project tree." ":kbd:`Alt`:kbd:`2`", "Switch focus to document editor." ":kbd:`Alt`:kbd:`3`", "Switch focus to document viewer." + ":kbd:`Alt`:kbd:`4`", "Switch focus to outline view." ":kbd:`Alt`:kbd:`Left`", "Move backward in the view history of the document viewer." ":kbd:`Alt`:kbd:`Right`", "Move forward in the view history of the document viewer." ":kbd:`Ctrl`:kbd:`.`", "Open menu to correct word under cursor." From c81c7f5a33aef0f7699bcd8f17ffd256756a1835 Mon Sep 17 00:00:00 2001 From: "Veronica K. B. Olsen" <1619840+vkbo@users.noreply.github.com> Date: Thu, 28 Jan 2021 21:13:19 +0100 Subject: [PATCH 4/5] Fix syntax check for release branch --- .github/workflows/syntax.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/syntax.yml b/.github/workflows/syntax.yml index bf8ffec3..90a1246c 100644 --- a/.github/workflows/syntax.yml +++ b/.github/workflows/syntax.yml @@ -2,9 +2,9 @@ name: flake8 on: push: - branches: [ main, dev ] + branches: [ main, dev, release ] pull_request: - branches: [ main, dev ] + branches: [ main, dev, release ] jobs: checkSyntax: From 1b05e8ddc95732fd768f2b1ecbd0383b75cae160 Mon Sep 17 00:00:00 2001 From: "Veronica K. B. Olsen" <1619840+vkbo@users.noreply.github.com> Date: Thu, 28 Jan 2021 21:26:51 +0100 Subject: [PATCH 5/5] Save current document before building project --- nw/gui/build.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nw/gui/build.py b/nw/gui/build.py index c24edb3e..73d20e3f 100644 --- a/nw/gui/build.py +++ b/nw/gui/build.py @@ -571,8 +571,9 @@ class GuiBuildNovel(QDialog): makeHtml.setJustify(justifyText) makeHtml.setStyles(not noStyling) - # Make sure the tree order is correct + # Make sure the project and document is up to date self.theParent.treeView.flushTreeOrder() + self.theParent.saveDocument() self.buildProgress.setMaximum(len(self.theProject.projTree)) self.buildProgress.setValue(0)