diff --git a/CHANGELOG.md b/CHANGELOG.md index be4f7f07..02425777 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -95,6 +95,59 @@ _These Release Notes also include the changes from 1.2 Beta 1._ ---- +## Version 1.1.1 [2021-02-21] + +### Release Notes + +This patch makes a couple of minor improvements to the GUI. The keyboard shortcut for deleting +entries in the project tree has been changed from `Ctrl+Del` to `Ctrl+Shift+Del` to free up that +shortcut for the document editor. It is now possible to use the shortcut for deleting the word in +front of the cursor, a common and useful feature of many text editors. + +The way the negative word count filter option works on the Writing Statistics tool has been changed +to be more intuitive. Enabling this filter now appears to remove all negative entries without +altering the other entries. Previously, the removed negative counts would be included in the +following entries to make it consistent with the total word count. In addition, writing sessions +shorter than five minutes, and with no change in the word count, are no longer recorded in the +session log file. + +Other changes include improving the speed of the internal spell checker, used when the Enchant +spell check library isn't available. The internal spell checker is no longer significantly slower, +but is still lacking in functionality compared to Enchant. + +### Detailed Changelog + +**User Interface** + +* The default GUI font on Windows is now Arial. It works better with the Qt framework than the + default system font. If Arial is missing, it falls back to the bundled font Cantarell. PR #655. +* The way word changes are calculated on the Writing Statistics tool has changed when the option to + exclude negative word counts is active. Previously, the entries with negative counts were + filtered out, but the change in count was still applied to the next line, altering the value. + Now, the GUI will instead just drop the lines that are negative and keep the other lines + unchanged. This is more intutitive, but it also means that the total count now longer matches the + sum of the lines. PR #659. +* The keyboard shortcut for deleting entries in the project tree has been changed from `Ctrl+Del` + to `Ctrl+Shift+Del`. The `Ctrl+Del` shortcut is thus free to be used exclusively by the editor to + delete the word in front of the cursor. Having the same shortcut do different things depending on + which area of the GUI has focus is a bit confusing. Related to #529. PR #666. + +**Other Improvements** + +* The internal spell checker, which is used when the Enchant library isn't available, has been + given a significant speed improvement by caching the imported dictionary as a Python `set` + instead of a `list`. The `set` has a hashed key lookup algorithm that is significantly faster. + PR #668. +* Sessions shortar than 5 minutes, and with no word count changes, are no longer recorded in the + session stats log file. PR #685. + +**Installation** + +* The PyPi packages now include the `setup.py` file, which makes it possible to install icon + launchers for novelWriter on both Linux and Windows after installing with `pip`. PR #655. + +---- + ## Version 1.2 Beta 1 [2021-02-11] ### Detailed Changelog diff --git a/nw/assets/text/release_notes_1.1.htm b/nw/assets/text/release_notes_1.1.htm index 92506344..4db3412f 100644 --- a/nw/assets/text/release_notes_1.1.htm +++ b/nw/assets/text/release_notes_1.1.htm @@ -2,6 +2,26 @@
+Released on 21 February 2021
+This patch makes a couple of minor improvements to the GUI. The keyboard shortcut for deleting +entries in the project tree has been changed from "Ctrl+Del" to "Ctrl+Shift+Del" to free up that +shortcut for the document editor. It is now possible to use the shortcut for deleting the word in +front of the cursor, a common and useful feature of many text editors.
+The way the negative word count filter option works on the Writing Statistics tool has been +changed to be more intuitive. Enabling this filter now appears to remove all negative entries +without altering the other entries. Previously, the removed negative counts would be included in +the following entries to make it consistent with the total word count. In addition, writing +sessions shorter than five minutes, and with no change in the word count, are no longer recorded in +the session log file.
+Other changes include improving the speed of the internal spell checker, used when the Enchant +spell check library isn't available. The internal spell checker is no longer significantly slower, +but is still lacking in functionality compared to Enchant.
+ +See also the Releases page.
+ +Released on 7 February 2021
The main change in this release is the addition of a new tab to the project tree on the left @@ -25,8 +45,5 @@ clearer categories and hopefully better help text. Some new options have been ad syntax highlighting of multi-paragraph quotes. The highlighter can now optionally accept quotes to be left "hanging", that is, no closing quote in the same paragraph.
-The full changelog is available -here.
- diff --git a/nw/core/index.py b/nw/core/index.py index ac1fba3f..a90619eb 100644 --- a/nw/core/index.py +++ b/nw/core/index.py @@ -709,7 +709,8 @@ class NWIndex(): for refTitle in self._refIndex[tHandle]: for aTag in self._refIndex[tHandle][refTitle].get("tags", []): if len(aTag) == 3 and (sTitle is None or sTitle == refTitle): - theRefs[aTag[1]].append(aTag[2]) + if aTag[1] in theRefs: # Future-compatible. Check can be removed in 1.2. + theRefs[aTag[1]].append(aTag[2]) return theRefs diff --git a/nw/core/project.py b/nw/core/project.py index fcb675ae..abee563b 100644 --- a/nw/core/project.py +++ b/nw/core/project.py @@ -1398,6 +1398,15 @@ class NWProject(): sessionFile = os.path.join(self.projMeta, nwFiles.SESS_STATS) isFile = os.path.isfile(sessionFile) + nowTime = time() + sessDiff = self.getSessionWordCount() + sessTime = nowTime - self.projOpened + + logger.info("The session lasted %d sec and added %d words" % (int(sessTime), sessDiff)) + if sessTime < 300 and sessDiff == 0: + logger.info("Session too short, skipping log entry") + return False + try: with open(sessionFile, mode="a+", encoding="utf8") as outFile: if not isFile: @@ -1410,7 +1419,7 @@ class NWProject(): outFile.write("%-19s %-19s %8d %8d %8d\n" % ( formatTimeStamp(self.projOpened), - formatTimeStamp(time()), + formatTimeStamp(nowTime), self.novelWCount, self.notesWCount, int(idleTime), diff --git a/tests/test_core/test_core_project.py b/tests/test_core/test_core_project.py index 09f6bbb8..45699717 100644 --- a/tests/test_core/test_core_project.py +++ b/tests/test_core/test_core_project.py @@ -1073,7 +1073,6 @@ def testCoreProject_OldFormat(dummyGUI, nwOldProj): # Check that new files have been created assert os.path.isfile(os.path.join(nwOldProj, "meta", "guiOptions.json")) - assert os.path.isfile(os.path.join(nwOldProj, "meta", "sessionStats.log")) assert os.path.isfile(os.path.join(nwOldProj, "ToC.txt")) # END Test testCoreProject_OldFormat