Merge branch 'main' into feature/build_gui
This commit is contained in:
@@ -1,5 +1,39 @@
|
|||||||
# novelWriter Changelog
|
# novelWriter Changelog
|
||||||
|
|
||||||
|
## Version 2.0.6 [2023-02-26]
|
||||||
|
|
||||||
|
### Release Notes
|
||||||
|
|
||||||
|
This is a patch release that fixes a few minor bugs and a broken feature.
|
||||||
|
|
||||||
|
When opening a document from the Novel Tree or Outline View, the Project Tree would receive focus
|
||||||
|
even when it was hidden. This has been corrected and no focus change is made. The Project Tree now
|
||||||
|
also receives focus automatically when a new Project Item is created.
|
||||||
|
|
||||||
|
The backlinks in the Reference Panel below the Document Viewer were no longer working. They have
|
||||||
|
now been fixed. They were broken due to a change in the link format in 2.0.
|
||||||
|
|
||||||
|
### Detailed Changelog
|
||||||
|
|
||||||
|
**Bugfixes**
|
||||||
|
|
||||||
|
* The Reference Panel link would no longer recognise the new, shorter links after the 2.0 project
|
||||||
|
index change. The explicit check has now been made more lenient and will accept any link that is
|
||||||
|
at least 13 characters long (the length of a document handle). Test coverage has been added for
|
||||||
|
handling Reference Panel links. Issue #1378. PR #1379.
|
||||||
|
* The `setSelectedItem` method of the project tree class had a `setFocus()` call. It should not do
|
||||||
|
this as global focus is handled by the main GUI class, and doing this explicitly in the
|
||||||
|
`setSelectedItem` method is presumptuous. Issue #1369. PR #1379.
|
||||||
|
|
||||||
|
**Usability Fixes**
|
||||||
|
|
||||||
|
* When creating new items in the project tree via shortcuts, the project tree receives focus. Since
|
||||||
|
these actions can be accessed when the project tree does not have focus, a user would have to
|
||||||
|
switch focus to be able to open new items. The tree now automatically receives focus when a new
|
||||||
|
item is created. Issue #1376. PR #1379.
|
||||||
|
|
||||||
|
----
|
||||||
|
|
||||||
## Version 2.0.5 [2023-02-12]
|
## Version 2.0.5 [2023-02-12]
|
||||||
|
|
||||||
### Release Notes
|
### Release Notes
|
||||||
|
|||||||
@@ -89,6 +89,15 @@ Then run the update and install commands as for Ubuntu:
|
|||||||
You may need to use the Ubuntu 20.04 (focal) packages for Debian 11 or earlier. The newer Ubuntu
|
You may need to use the Ubuntu 20.04 (focal) packages for Debian 11 or earlier. The newer Ubuntu
|
||||||
packages use a different compression algorithm that may not be supported.
|
packages use a different compression algorithm that may not be supported.
|
||||||
|
|
||||||
|
.. tip::
|
||||||
|
|
||||||
|
If you get an error message like ``gpg: failed to create temporary file`` when importing the key
|
||||||
|
from the Ubuntu keyserver, try creating the folder it fails on, and import the key again:
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
sudo mkdir /root/.gnupg/
|
||||||
|
|
||||||
|
|
||||||
AppImage Releases
|
AppImage Releases
|
||||||
-----------------
|
-----------------
|
||||||
|
|||||||
@@ -4,7 +4,6 @@
|
|||||||
How Data is Stored
|
How Data is Stored
|
||||||
******************
|
******************
|
||||||
|
|
||||||
.. _File Format Spec 1.5: _static/fileformatspec15.pdf
|
|
||||||
.. _documentation: https://novelwriter.readthedocs.io
|
.. _documentation: https://novelwriter.readthedocs.io
|
||||||
|
|
||||||
This section contains details of how novelWriter stores and handles the project data.
|
This section contains details of how novelWriter stores and handles the project data.
|
||||||
@@ -48,8 +47,8 @@ various meta data entries incremented, on each save.
|
|||||||
|
|
||||||
.. only:: html
|
.. only:: html
|
||||||
|
|
||||||
A full description of the current file format is available in the `File Format Spec 1.5`_
|
A full description of the current file format is available in the
|
||||||
document, available as a PDF.
|
:download:`File Format Spec 1.5 <fileformatspec15.pdf>` document, available as a PDF.
|
||||||
|
|
||||||
|
|
||||||
Project Documents
|
Project Documents
|
||||||
|
|||||||
@@ -126,5 +126,14 @@ to ODF 1.3 extended format, and passes validation.</p>
|
|||||||
<p>An Italian translation has been added, and Russian is currently available for project builds. A
|
<p>An Italian translation has been added, and Russian is currently available for project builds. A
|
||||||
full translation into Russian is on its way.</p>
|
full translation into Russian is on its way.</p>
|
||||||
|
|
||||||
|
<h3>Patch 2.0.6 – 26 February 2023</h3>
|
||||||
|
|
||||||
|
<p>This is a patch release that fixes a few minor bugs and a broken feature.</p>
|
||||||
|
<p>When opening a document from the Novel Tree or Outline View, the Project Tree would receive
|
||||||
|
focus even when it was hidden. This has been corrected and no focus change is made. The Project
|
||||||
|
Tree now also receives focus automatically when a new Project Item is created.</p>
|
||||||
|
<p>The backlinks in the Reference Panel below the Document Viewer were no longer working. They have
|
||||||
|
now been fixed. They were broken due to a change in the link format in 2.0.</p>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -1201,17 +1201,18 @@ class GuiDocViewDetails(QScrollArea):
|
|||||||
return
|
return
|
||||||
|
|
||||||
##
|
##
|
||||||
# Internal Functions
|
# Private Slots
|
||||||
##
|
##
|
||||||
|
|
||||||
|
@pyqtSlot(str)
|
||||||
def _linkClicked(self, theLink):
|
def _linkClicked(self, theLink):
|
||||||
"""Capture the link-click and forward it to the document viewer
|
"""Capture the link-click and forward it to the document viewer
|
||||||
class for handling.
|
class for handling.
|
||||||
"""
|
"""
|
||||||
logger.debug("Clicked link: '%s'", theLink)
|
logger.debug("Clicked link: '%s'", theLink)
|
||||||
if len(theLink) == 21:
|
if len(theLink) >= 13:
|
||||||
tHandle = theLink[:13]
|
tHandle = theLink[:13]
|
||||||
tAnchor = theLink[13:]
|
tAnchor = theLink[13:] or None
|
||||||
self.mainGui.viewDocument(tHandle, tAnchor)
|
self.mainGui.viewDocument(tHandle, tAnchor)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ from PyQt5.QtWidgets import (
|
|||||||
QVBoxLayout, QWidget
|
QVBoxLayout, QWidget
|
||||||
)
|
)
|
||||||
|
|
||||||
from novelwriter.enum import nwDocMode, nwItemType, nwItemClass, nwItemLayout, nwAlert
|
from novelwriter.enum import nwDocMode, nwItemType, nwItemClass, nwItemLayout, nwAlert, nwWidget
|
||||||
from novelwriter.constants import nwHeaders, nwUnicode, trConst, nwLabels
|
from novelwriter.constants import nwHeaders, nwUnicode, trConst, nwLabels
|
||||||
from novelwriter.core.coretools import DocMerger, DocSplitter
|
from novelwriter.core.coretools import DocMerger, DocSplitter
|
||||||
from novelwriter.dialogs.docmerge import GuiDocMerge
|
from novelwriter.dialogs.docmerge import GuiDocMerge
|
||||||
@@ -630,6 +630,7 @@ class GuiProjectTree(QTreeWidget):
|
|||||||
|
|
||||||
# Add the new item to the project tree
|
# Add the new item to the project tree
|
||||||
self.revealNewTreeItem(tHandle, nHandle=nHandle, wordCount=True)
|
self.revealNewTreeItem(tHandle, nHandle=nHandle, wordCount=True)
|
||||||
|
self.mainGui.switchFocus(nwWidget.TREE)
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
@@ -1087,7 +1088,6 @@ class GuiProjectTree(QTreeWidget):
|
|||||||
if tItem is None:
|
if tItem is None:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
self.setFocus()
|
|
||||||
if tHandle in self._treeMap:
|
if tHandle in self._treeMap:
|
||||||
self.setCurrentItem(self._treeMap[tHandle])
|
self.setCurrentItem(self._treeMap[tHandle])
|
||||||
|
|
||||||
|
|||||||
@@ -162,7 +162,7 @@ class GuiMain(QMainWindow):
|
|||||||
self.splitDocs.setOpaqueResize(False)
|
self.splitDocs.setOpaqueResize(False)
|
||||||
self.splitDocs.setHandleWidth(hWd)
|
self.splitDocs.setHandleWidth(hWd)
|
||||||
|
|
||||||
# Splitter : Project Tree / Main Tabs
|
# Splitter : Project Tree / Document Area
|
||||||
self.splitMain = QSplitter(Qt.Horizontal)
|
self.splitMain = QSplitter(Qt.Horizontal)
|
||||||
self.splitMain.setContentsMargins(0, 0, 0, 0)
|
self.splitMain.setContentsMargins(0, 0, 0, 0)
|
||||||
self.splitMain.addWidget(self.treePane)
|
self.splitMain.addWidget(self.treePane)
|
||||||
@@ -185,7 +185,7 @@ class GuiMain(QMainWindow):
|
|||||||
self.idxViewDoc = self.splitView.indexOf(self.docViewer)
|
self.idxViewDoc = self.splitView.indexOf(self.docViewer)
|
||||||
self.idxViewMeta = self.splitView.indexOf(self.viewMeta)
|
self.idxViewMeta = self.splitView.indexOf(self.viewMeta)
|
||||||
|
|
||||||
# Indices of Tab Widgets
|
# Indices of Stack Widgets
|
||||||
self.idxEditorView = self.mainStack.indexOf(self.splitMain)
|
self.idxEditorView = self.mainStack.indexOf(self.splitMain)
|
||||||
self.idxOutlineView = self.mainStack.indexOf(self.outlineView)
|
self.idxOutlineView = self.mainStack.indexOf(self.outlineView)
|
||||||
self.idxProjView = self.projStack.indexOf(self.projView)
|
self.idxProjView = self.projStack.indexOf(self.projView)
|
||||||
@@ -199,6 +199,9 @@ class GuiMain(QMainWindow):
|
|||||||
self.splitView.setCollapsible(self.idxViewDoc, False)
|
self.splitView.setCollapsible(self.idxViewDoc, False)
|
||||||
self.splitView.setCollapsible(self.idxViewMeta, False)
|
self.splitView.setCollapsible(self.idxViewMeta, False)
|
||||||
|
|
||||||
|
self.splitMain.setStretchFactor(self.idxTree, 0)
|
||||||
|
self.splitMain.setStretchFactor(self.idxMain, 1)
|
||||||
|
|
||||||
# Editor / Viewer Default State
|
# Editor / Viewer Default State
|
||||||
self.splitView.setVisible(False)
|
self.splitView.setVisible(False)
|
||||||
self.docEditor.closeSearch()
|
self.docEditor.closeSearch()
|
||||||
|
|||||||
@@ -171,6 +171,19 @@ def testGuiViewer_Main(qtbot, monkeypatch, nwGUI, nwLipsum):
|
|||||||
assert nwGUI.docViewer.loadText("846352075de7d") is False
|
assert nwGUI.docViewer.loadText("846352075de7d") is False
|
||||||
assert nwGUI.docViewer.toPlainText() == "An error occurred while generating the preview."
|
assert nwGUI.docViewer.toPlainText() == "An error occurred while generating the preview."
|
||||||
|
|
||||||
|
# Check reference panel (issue #1378)
|
||||||
|
assert nwGUI.viewDocument("4c4f28287af27") is True
|
||||||
|
assert nwGUI.docViewer.toPlainText().startswith("Nobody Owens")
|
||||||
|
|
||||||
|
nwGUI.viewMeta._linkClicked("fb609cd8319dc")
|
||||||
|
assert nwGUI.docViewer.toPlainText().startswith("Chapter One")
|
||||||
|
|
||||||
|
nwGUI.viewMeta._linkClicked("88243afbe5ed8#T0001")
|
||||||
|
assert nwGUI.docViewer.toPlainText().startswith("Scene One")
|
||||||
|
|
||||||
|
nwGUI.viewMeta._linkClicked("88243afbe5ed8#ABCD")
|
||||||
|
assert nwGUI.docViewer.toPlainText().startswith("Scene One")
|
||||||
|
|
||||||
# qtbot.stop()
|
# qtbot.stop()
|
||||||
|
|
||||||
# END Test testGuiViewer_Main
|
# END Test testGuiViewer_Main
|
||||||
|
|||||||
Reference in New Issue
Block a user