novelWriter 2.2.1__py3-none-any.whl → 2.3__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (125) hide show
  1. {novelWriter-2.2.1.dist-info → novelWriter-2.3.dist-info}/METADATA +1 -1
  2. {novelWriter-2.2.1.dist-info → novelWriter-2.3.dist-info}/RECORD +116 -101
  3. novelWriter-2.3.dist-info/entry_points.txt +2 -0
  4. novelwriter/__init__.py +4 -4
  5. novelwriter/assets/i18n/nw_de_DE.qm +0 -0
  6. novelwriter/assets/i18n/nw_en_US.qm +0 -0
  7. novelwriter/assets/i18n/nw_es_419.qm +0 -0
  8. novelwriter/assets/i18n/nw_it_IT.qm +0 -0
  9. novelwriter/assets/i18n/nw_ja_JP.qm +0 -0
  10. novelwriter/assets/i18n/nw_nb_NO.qm +0 -0
  11. novelwriter/assets/i18n/nw_nl_NL.qm +0 -0
  12. novelwriter/assets/i18n/project_nl_NL.json +11 -0
  13. novelwriter/assets/i18n/project_pt_BR.json +11 -0
  14. novelwriter/assets/icons/typicons_dark/icons.conf +8 -0
  15. novelwriter/assets/icons/typicons_dark/mixed_document-new.svg +6 -0
  16. novelwriter/assets/icons/typicons_dark/mixed_import.svg +5 -0
  17. novelwriter/assets/icons/typicons_dark/typ_document-add.svg +4 -0
  18. novelwriter/assets/icons/typicons_dark/typ_document.svg +4 -0
  19. novelwriter/assets/icons/typicons_dark/typ_th-dot-more.svg +4 -0
  20. novelwriter/assets/icons/typicons_dark/typ_th-list.svg +9 -0
  21. novelwriter/assets/icons/typicons_light/icons.conf +8 -0
  22. novelwriter/assets/icons/typicons_light/mixed_document-new.svg +6 -0
  23. novelwriter/assets/icons/typicons_light/mixed_import.svg +5 -0
  24. novelwriter/assets/icons/typicons_light/typ_document-add.svg +4 -0
  25. novelwriter/assets/icons/typicons_light/typ_document.svg +4 -0
  26. novelwriter/assets/icons/typicons_light/typ_th-dot-more.svg +4 -0
  27. novelwriter/assets/icons/typicons_light/typ_th-list.svg +9 -0
  28. novelwriter/assets/images/novelwriter-text-dark.svg +4 -0
  29. novelwriter/assets/images/novelwriter-text-light.svg +4 -0
  30. novelwriter/assets/images/welcome-dark.jpg +0 -0
  31. novelwriter/assets/images/welcome-light.jpg +0 -0
  32. novelwriter/assets/manual.pdf +0 -0
  33. novelwriter/assets/sample.zip +0 -0
  34. novelwriter/assets/syntax/cyberpunk_night.conf +26 -0
  35. novelwriter/assets/syntax/default_dark.conf +1 -0
  36. novelwriter/assets/syntax/default_light.conf +1 -0
  37. novelwriter/assets/syntax/grey_dark.conf +1 -0
  38. novelwriter/assets/syntax/grey_light.conf +1 -0
  39. novelwriter/assets/syntax/light_owl.conf +1 -0
  40. novelwriter/assets/syntax/night_owl.conf +1 -0
  41. novelwriter/assets/syntax/solarized_dark.conf +1 -0
  42. novelwriter/assets/syntax/solarized_light.conf +1 -0
  43. novelwriter/assets/syntax/tango.conf +23 -0
  44. novelwriter/assets/syntax/tomorrow.conf +1 -0
  45. novelwriter/assets/syntax/tomorrow_night.conf +1 -0
  46. novelwriter/assets/syntax/tomorrow_night_blue.conf +1 -0
  47. novelwriter/assets/syntax/tomorrow_night_bright.conf +1 -0
  48. novelwriter/assets/syntax/tomorrow_night_eighties.conf +1 -0
  49. novelwriter/assets/text/credits_en.htm +4 -2
  50. novelwriter/assets/themes/cyberpunk_night.conf +29 -0
  51. novelwriter/assets/themes/default_dark.conf +2 -2
  52. novelwriter/assets/themes/default_light.conf +2 -2
  53. novelwriter/common.py +48 -37
  54. novelwriter/config.py +36 -41
  55. novelwriter/constants.py +38 -16
  56. novelwriter/core/buildsettings.py +7 -7
  57. novelwriter/core/coretools.py +196 -156
  58. novelwriter/core/docbuild.py +6 -3
  59. novelwriter/core/document.py +6 -6
  60. novelwriter/core/index.py +89 -56
  61. novelwriter/core/item.py +21 -3
  62. novelwriter/core/options.py +8 -7
  63. novelwriter/core/project.py +70 -44
  64. novelwriter/core/projectdata.py +1 -14
  65. novelwriter/core/projectxml.py +13 -41
  66. novelwriter/core/sessions.py +2 -1
  67. novelwriter/core/spellcheck.py +2 -1
  68. novelwriter/core/status.py +2 -1
  69. novelwriter/core/storage.py +182 -140
  70. novelwriter/core/tohtml.py +4 -2
  71. novelwriter/core/tokenizer.py +109 -82
  72. novelwriter/core/toodt.py +40 -30
  73. novelwriter/core/tree.py +3 -2
  74. novelwriter/dialogs/about.py +70 -160
  75. novelwriter/dialogs/docmerge.py +6 -5
  76. novelwriter/dialogs/docsplit.py +6 -6
  77. novelwriter/dialogs/editlabel.py +1 -1
  78. novelwriter/dialogs/preferences.py +553 -703
  79. novelwriter/dialogs/{projsettings.py → projectsettings.py} +288 -262
  80. novelwriter/dialogs/quotes.py +27 -23
  81. novelwriter/dialogs/wordlist.py +96 -40
  82. novelwriter/enum.py +20 -18
  83. novelwriter/error.py +1 -1
  84. novelwriter/extensions/circularprogress.py +11 -11
  85. novelwriter/extensions/configlayout.py +185 -134
  86. novelwriter/extensions/modified.py +81 -0
  87. novelwriter/extensions/novelselector.py +26 -12
  88. novelwriter/extensions/pagedsidebar.py +14 -16
  89. novelwriter/extensions/simpleprogress.py +5 -5
  90. novelwriter/extensions/statusled.py +8 -8
  91. novelwriter/extensions/switch.py +31 -63
  92. novelwriter/extensions/switchbox.py +1 -1
  93. novelwriter/extensions/versioninfo.py +153 -0
  94. novelwriter/gui/doceditor.py +178 -150
  95. novelwriter/gui/dochighlight.py +63 -92
  96. novelwriter/gui/docviewer.py +49 -51
  97. novelwriter/gui/docviewerpanel.py +72 -24
  98. novelwriter/gui/itemdetails.py +7 -7
  99. novelwriter/gui/mainmenu.py +14 -19
  100. novelwriter/gui/noveltree.py +9 -8
  101. novelwriter/gui/outline.py +98 -75
  102. novelwriter/gui/projtree.py +241 -106
  103. novelwriter/gui/sidebar.py +3 -4
  104. novelwriter/gui/statusbar.py +3 -4
  105. novelwriter/gui/theme.py +69 -70
  106. novelwriter/guimain.py +51 -156
  107. novelwriter/shared.py +15 -1
  108. novelwriter/tools/dictionaries.py +5 -6
  109. novelwriter/tools/manuscript.py +6 -6
  110. novelwriter/tools/manussettings.py +192 -221
  111. novelwriter/tools/noveldetails.py +525 -0
  112. novelwriter/tools/welcome.py +819 -0
  113. novelwriter/tools/writingstats.py +9 -9
  114. novelWriter-2.2.1.dist-info/entry_points.txt +0 -5
  115. novelwriter/assets/images/wizard-back.jpg +0 -0
  116. novelwriter/assets/text/gplv3_en.htm +0 -641
  117. novelwriter/assets/text/release_notes.htm +0 -60
  118. novelwriter/dialogs/projdetails.py +0 -518
  119. novelwriter/dialogs/projload.py +0 -294
  120. novelwriter/dialogs/updates.py +0 -172
  121. novelwriter/extensions/pageddialog.py +0 -130
  122. novelwriter/tools/projwizard.py +0 -478
  123. {novelWriter-2.2.1.dist-info → novelWriter-2.3.dist-info}/LICENSE.md +0 -0
  124. {novelWriter-2.2.1.dist-info → novelWriter-2.3.dist-info}/WHEEL +0 -0
  125. {novelWriter-2.2.1.dist-info → novelWriter-2.3.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,9 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg width="24" height="24" version="1.2" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
3
+ <g fill="#4271ae" stroke-width="1.0526">
4
+ <path d="m19.632 17.263h-7.3684c-1.1611 0-2.1053 0.94421-2.1053 2.1053s0.94421 2.1053 2.1053 2.1053h7.3684c1.1611 0 2.1053-0.94421 2.1053-2.1053s-0.94421-2.1053-2.1053-2.1053zm0-7.3684h-7.3684c-1.1611 0-2.1053 0.94421-2.1053 2.1053s0.94421 2.1053 2.1053 2.1053h7.3684c1.1611 0 2.1053-0.94421 2.1053-2.1053s-0.94421-2.1053-2.1053-2.1053zm0-7.3684h-7.3684c-1.1611 0-2.1053 0.94421-2.1053 2.1053 0 1.1611 0.94421 2.1053 2.1053 2.1053h7.3684c1.1611 0 2.1053-0.94421 2.1053-2.1053 0-1.1611-0.94421-2.1053-2.1053-2.1053z"/>
5
+ <circle cx="4.8947" cy="19.368" r="2.6316"/>
6
+ <circle cx="4.8947" cy="12" r="2.6316"/>
7
+ <circle cx="4.8947" cy="4.6316" r="2.6316"/>
8
+ </g>
9
+ </svg>
@@ -0,0 +1,4 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg width="460" height="60" version="1.1" viewBox="0 0 121.71 15.875" xmlns="http://www.w3.org/2000/svg">
3
+ <path d="m50.202 0v1.7585h0.67954c0.31249 0 0.53129 0.070663 0.65629 0.21136 0.14062 0.12506 0.21084 0.33602 0.21084 0.63304v10.294c0 0.31265-0.07022 0.53937-0.21084 0.68006-0.125 0.14069-0.3438 0.21084-0.65629 0.21084h-0.67954v1.7353h5.6012v-1.7353h-0.67954c-0.29687 0-0.51567-0.07015-0.65629-0.21084-0.14062-0.14069-0.21084-0.35927-0.21084-0.65629v-12.921zm36.093 0.32815v2.1575h2.6484v-2.1575zm-29.179 0.023771v1.7353h0.49248c0.45312 0 0.77317 0.070146 0.96066 0.21084 0.1875 0.12506 0.3203 0.37516 0.39842 0.75034l2.8122 12.475h2.0624l2.6954-8.6289 2.742 8.6289h2.0392l2.789-12.475c0.07812-0.37518 0.21093-0.62528 0.39843-0.75034 0.1875-0.14069 0.50807-0.21084 0.96118-0.21084h0.51573v-1.7353h-3.5863l-2.3203 10.88-2.5544-8.324h-1.9689l-2.5311 8.324-2.2965-10.88zm38.109 0.58601-2.4846 0.79737v2.5327h-1.8278v1.6883h1.8278v6.1433c0 1.235 0.3282 2.1734 0.98444 2.8143 0.65624 0.64094 1.6327 0.96118 2.9295 0.96118 0.82811 0 1.5471-0.11743 2.1565-0.35192 0.60936-0.23449 1.1716-0.57049 1.6872-1.0082v-1.7818h-2.1327v1.0082c-0.35937 0.29702-0.88296 0.44545-1.5704 0.44545-0.53124 0-0.92966-0.14843-1.1953-0.44545-0.24999-0.29702-0.37465-0.78959-0.37465-1.4774v-6.3076h3.3745v-1.6883h-3.3745zm-87.678 2.9781c-0.96873 0-1.7971 0.15605-2.4846 0.46871-0.67186 0.29702-1.2733 0.78197-1.8045 1.4542l-0.14056-1.571h-2.9998v1.7585h0.49196c0.31249 0 0.53129 0.070146 0.65629 0.21084 0.125 0.12506 0.18759 0.34415 0.18759 0.65681v6.0265c0 0.31265-0.070218 0.53885-0.21084 0.67955-0.125 0.12506-0.3438 0.18758-0.65629 0.18758h-0.58601v1.7353h5.3671v-1.7353h-0.60927c-0.29687 0-0.50804-0.06252-0.63304-0.18758-0.10937-0.14069-0.16381-0.36689-0.16381-0.67955v-4.7372c0-0.8129 0.25747-1.4458 0.77308-1.8991s1.172-0.68006 1.9689-0.68006c0.73436 0 1.2656 0.17995 1.5937 0.5395 0.32812 0.34392 0.49248 0.90664 0.49248 1.6883v7.691h4.0308v-1.7353h-0.65629c-0.31249 0-0.53892-0.06252-0.67954-0.18758-0.125-0.14069-0.18758-0.36689-0.18758-0.67955v-5.1123c0-2.595-1.2497-3.8923-3.7496-3.8923zm12.351 0c-1.9218 0-3.3669 0.53171-4.3357 1.5947-0.9531 1.0474-1.4299 2.5164-1.4299 4.408 0 1.8759 0.48441 3.3379 1.4531 4.3853s2.4062 1.571 4.3124 1.571c1.9062 0 3.3437-0.52357 4.3124-1.571 0.96873-1.0474 1.4531-2.5093 1.4531-4.3853 0-1.8916-0.48441-3.3606-1.4531-4.408-0.9531-1.063-2.3906-1.5947-4.3124-1.5947zm23.39 0c-1.8281 0-3.2421 0.51595-4.2421 1.5477-0.98435 1.0161-1.4769 2.5401-1.4769 4.5723 0 1.9072 0.53123 3.361 1.5937 4.3615 1.0781 0.98486 2.5079 1.4774 4.2891 1.4774 1.0312 0 1.9217-0.11743 2.6717-0.35192 0.76561-0.21886 1.477-0.56248 2.1332-1.0315v-1.6418h-2.1797v0.84439c-0.32812 0.20322-0.6955 0.35165-1.1017 0.44545-0.40624 0.07816-0.90643 0.11731-1.5002 0.11731-1.0468 0-1.8824-0.29686-2.5073-0.8909-0.60936-0.60967-0.91416-1.5481-0.91416-2.8143h8.6015v-1.0785c0-1.704-0.45338-3.0561-1.3596-4.0566-0.90623-1.0005-2.2419-1.5007-4.0075-1.5007zm63.772 0c-1.8281 0-3.2422 0.51595-4.2421 1.5477-0.98436 1.0161-1.4764 2.5401-1.4764 4.5723 0 1.9072 0.53122 3.361 1.5937 4.3615 1.0781 0.98486 2.5074 1.4774 4.2886 1.4774 1.0312 0 1.9222-0.11743 2.6722-0.35192 0.7656-0.21886 1.4764-0.56248 2.1327-1.0315v-1.6418h-2.1797v0.84439c-0.32811 0.20322-0.6955 0.35165-1.1017 0.44545-0.40624 0.07816-0.90591 0.11731-1.4996 0.11731-1.0468 0-1.8829-0.29686-2.5079-0.8909-0.60936-0.60967-0.91415-1.5481-0.91415-2.8143h8.6015v-1.0785c0-1.704-0.45338-3.0561-1.3596-4.0566-0.90623-1.0005-2.2419-1.5007-4.0075-1.5007zm-81.607 0.35192v1.618h0.49196c0.39062 0 0.65623 0.046764 0.79685 0.14056 0.15625 0.078163 0.27328 0.24235 0.3514 0.49248l3.2344 9.0041h2.5781l3.2112-9.0041c0.09375-0.25012 0.21078-0.41431 0.3514-0.49248 0.15625-0.093796 0.42186-0.14056 0.79685-0.14056h0.51573v-1.618h-3.2582l-2.9058 8.7933-2.9063-8.7933zm50.694 0v1.7348h0.49196c0.29687 0 0.50804 0.070663 0.63304 0.21136 0.125 0.14069 0.18758 0.35927 0.18758 0.65629v6.0503c0 0.31265-0.07022 0.53885-0.21084 0.67955-0.125 0.12506-0.3438 0.18758-0.65629 0.18758h-0.58601v1.7353h5.3671v-1.7353h-0.58601c-0.29687 0-0.50804-0.06252-0.63304-0.18758-0.125-0.14069-0.18707-0.36689-0.18707-0.67955v-4.4788c0-0.82853 0.18725-1.4385 0.56224-1.8293 0.37499-0.40645 1.008-0.60978 1.8986-0.60978h1.3121v-1.7348h-1.078c-0.67186 0-1.2575 0.093528-1.7575 0.28112-0.48436 0.18759-0.88278 0.52359-1.1953 1.0082l-0.32815-1.2893zm8.6718 0v1.7585h0.67954c0.31249 0 0.53129 0.070146 0.65629 0.21084 0.14062 0.12506 0.21084 0.33602 0.21084 0.63304v6.0265c0 0.31265-0.07022 0.53937-0.21084 0.68006-0.125 0.14069-0.3438 0.21084-0.65629 0.21084h-0.67954v1.7353h5.6012v-1.7353h-0.67954c-0.29687 0-0.51567-0.07015-0.65629-0.21084-0.14062-0.14069-0.21084-0.35927-0.21084-0.65629v-8.6527zm29.296 0v1.7348h0.49247c0.29687 0 0.50753 0.070663 0.63252 0.21136 0.125 0.14069 0.18759 0.35927 0.18759 0.65629v6.0503c0 0.31265-0.0702 0.53885-0.21085 0.67955-0.12499 0.12506-0.34379 0.18758-0.65629 0.18758h-0.58601v1.7353h5.3671v-1.7353h-0.58601c-0.29686 0-0.50751-0.06252-0.63251-0.18758-0.125-0.14069-0.18758-0.36689-0.18758-0.67955v-4.4788c0-0.82853 0.18725-1.4385 0.56223-1.8293 0.37499-0.40645 1.008-0.60978 1.8986-0.60978h1.3126v-1.7348h-1.078c-0.67185 0-1.258 0.093528-1.758 0.28112-0.48436 0.18759-0.88278 0.52359-1.1953 1.0082l-0.32814-1.2893zm-70.85 1.3364c1.9843 0 2.9766 1.1412 2.9766 3.4236h-6.1872c0-1.063 0.27324-1.8992 0.8201-2.5089s1.3437-0.91467 2.3906-0.91467zm63.772 0c1.9843 0 2.9766 1.1412 2.9766 3.4236h-6.1877c0-1.063 0.27375-1.8992 0.82062-2.5089 0.54686-0.60967 1.3437-0.91467 2.3906-0.91467zm-87.139 0.07028c1.125 0 1.961 0.35176 2.5079 1.0552 0.54686 0.68784 0.8201 1.7507 0.8201 3.189 0 1.4226-0.27324 2.4779-0.8201 3.1657-0.54686 0.68784-1.3829 1.032-2.5079 1.032-1.125 0-1.961-0.34414-2.5079-1.032-0.53124-0.68784-0.79685-1.7431-0.79685-3.1657 0-1.4382 0.26561-2.5011 0.79685-3.189 0.54686-0.70347 1.3829-1.0552 2.5079-1.0552z" fill="#fafafa" stroke-linecap="round" stroke-width=".21978"/>
4
+ </svg>
@@ -0,0 +1,4 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg width="460" height="60" version="1.1" viewBox="0 0 121.71 15.875" xmlns="http://www.w3.org/2000/svg">
3
+ <path d="m50.202 0v1.7585h0.67954c0.31249 0 0.53129 0.070663 0.65629 0.21136 0.14062 0.12506 0.21084 0.33602 0.21084 0.63304v10.294c0 0.31265-0.07022 0.53937-0.21084 0.68006-0.125 0.14069-0.3438 0.21084-0.65629 0.21084h-0.67954v1.7353h5.6012v-1.7353h-0.67954c-0.29687 0-0.51567-0.07015-0.65629-0.21084-0.14062-0.14069-0.21084-0.35927-0.21084-0.65629v-12.921zm36.093 0.32815v2.1575h2.6484v-2.1575zm-29.179 0.023771v1.7353h0.49248c0.45312 0 0.77317 0.070146 0.96066 0.21084 0.1875 0.12506 0.3203 0.37516 0.39842 0.75034l2.8122 12.475h2.0624l2.6954-8.6289 2.742 8.6289h2.0392l2.789-12.475c0.07812-0.37518 0.21093-0.62528 0.39843-0.75034 0.1875-0.14069 0.50807-0.21084 0.96118-0.21084h0.51573v-1.7353h-3.5863l-2.3203 10.88-2.5544-8.324h-1.9689l-2.5311 8.324-2.2965-10.88zm38.109 0.58601-2.4846 0.79737v2.5327h-1.8278v1.6883h1.8278v6.1433c0 1.235 0.3282 2.1734 0.98444 2.8143 0.65624 0.64094 1.6327 0.96118 2.9295 0.96118 0.82811 0 1.5471-0.11743 2.1565-0.35192 0.60936-0.23449 1.1716-0.57049 1.6872-1.0082v-1.7818h-2.1327v1.0082c-0.35937 0.29702-0.88296 0.44545-1.5704 0.44545-0.53124 0-0.92966-0.14843-1.1953-0.44545-0.24999-0.29702-0.37465-0.78959-0.37465-1.4774v-6.3076h3.3745v-1.6883h-3.3745zm-87.678 2.9781c-0.96873 0-1.7971 0.15605-2.4846 0.46871-0.67186 0.29702-1.2733 0.78197-1.8045 1.4542l-0.14056-1.571h-2.9998v1.7585h0.49196c0.31249 0 0.53129 0.070146 0.65629 0.21084 0.125 0.12506 0.18759 0.34415 0.18759 0.65681v6.0265c0 0.31265-0.070218 0.53885-0.21084 0.67955-0.125 0.12506-0.3438 0.18758-0.65629 0.18758h-0.58601v1.7353h5.3671v-1.7353h-0.60927c-0.29687 0-0.50804-0.06252-0.63304-0.18758-0.10937-0.14069-0.16381-0.36689-0.16381-0.67955v-4.7372c0-0.8129 0.25747-1.4458 0.77308-1.8991s1.172-0.68006 1.9689-0.68006c0.73436 0 1.2656 0.17995 1.5937 0.5395 0.32812 0.34392 0.49248 0.90664 0.49248 1.6883v7.691h4.0308v-1.7353h-0.65629c-0.31249 0-0.53892-0.06252-0.67954-0.18758-0.125-0.14069-0.18758-0.36689-0.18758-0.67955v-5.1123c0-2.595-1.2497-3.8923-3.7496-3.8923zm12.351 0c-1.9218 0-3.3669 0.53171-4.3357 1.5947-0.9531 1.0474-1.4299 2.5164-1.4299 4.408 0 1.8759 0.48441 3.3379 1.4531 4.3853s2.4062 1.571 4.3124 1.571c1.9062 0 3.3437-0.52357 4.3124-1.571 0.96873-1.0474 1.4531-2.5093 1.4531-4.3853 0-1.8916-0.48441-3.3606-1.4531-4.408-0.9531-1.063-2.3906-1.5947-4.3124-1.5947zm23.39 0c-1.8281 0-3.2421 0.51595-4.2421 1.5477-0.98435 1.0161-1.4769 2.5401-1.4769 4.5723 0 1.9072 0.53123 3.361 1.5937 4.3615 1.0781 0.98486 2.5079 1.4774 4.2891 1.4774 1.0312 0 1.9217-0.11743 2.6717-0.35192 0.76561-0.21886 1.477-0.56248 2.1332-1.0315v-1.6418h-2.1797v0.84439c-0.32812 0.20322-0.6955 0.35165-1.1017 0.44545-0.40624 0.07816-0.90643 0.11731-1.5002 0.11731-1.0468 0-1.8824-0.29686-2.5073-0.8909-0.60936-0.60967-0.91416-1.5481-0.91416-2.8143h8.6015v-1.0785c0-1.704-0.45338-3.0561-1.3596-4.0566-0.90623-1.0005-2.2419-1.5007-4.0075-1.5007zm63.772 0c-1.8281 0-3.2422 0.51595-4.2421 1.5477-0.98436 1.0161-1.4764 2.5401-1.4764 4.5723 0 1.9072 0.53122 3.361 1.5937 4.3615 1.0781 0.98486 2.5074 1.4774 4.2886 1.4774 1.0312 0 1.9222-0.11743 2.6722-0.35192 0.7656-0.21886 1.4764-0.56248 2.1327-1.0315v-1.6418h-2.1797v0.84439c-0.32811 0.20322-0.6955 0.35165-1.1017 0.44545-0.40624 0.07816-0.90591 0.11731-1.4996 0.11731-1.0468 0-1.8829-0.29686-2.5079-0.8909-0.60936-0.60967-0.91415-1.5481-0.91415-2.8143h8.6015v-1.0785c0-1.704-0.45338-3.0561-1.3596-4.0566-0.90623-1.0005-2.2419-1.5007-4.0075-1.5007zm-81.607 0.35192v1.618h0.49196c0.39062 0 0.65623 0.046764 0.79685 0.14056 0.15625 0.078163 0.27328 0.24235 0.3514 0.49248l3.2344 9.0041h2.5781l3.2112-9.0041c0.09375-0.25012 0.21078-0.41431 0.3514-0.49248 0.15625-0.093796 0.42186-0.14056 0.79685-0.14056h0.51573v-1.618h-3.2582l-2.9058 8.7933-2.9063-8.7933zm50.694 0v1.7348h0.49196c0.29687 0 0.50804 0.070663 0.63304 0.21136 0.125 0.14069 0.18758 0.35927 0.18758 0.65629v6.0503c0 0.31265-0.07022 0.53885-0.21084 0.67955-0.125 0.12506-0.3438 0.18758-0.65629 0.18758h-0.58601v1.7353h5.3671v-1.7353h-0.58601c-0.29687 0-0.50804-0.06252-0.63304-0.18758-0.125-0.14069-0.18707-0.36689-0.18707-0.67955v-4.4788c0-0.82853 0.18725-1.4385 0.56224-1.8293 0.37499-0.40645 1.008-0.60978 1.8986-0.60978h1.3121v-1.7348h-1.078c-0.67186 0-1.2575 0.093528-1.7575 0.28112-0.48436 0.18759-0.88278 0.52359-1.1953 1.0082l-0.32815-1.2893zm8.6718 0v1.7585h0.67954c0.31249 0 0.53129 0.070146 0.65629 0.21084 0.14062 0.12506 0.21084 0.33602 0.21084 0.63304v6.0265c0 0.31265-0.07022 0.53937-0.21084 0.68006-0.125 0.14069-0.3438 0.21084-0.65629 0.21084h-0.67954v1.7353h5.6012v-1.7353h-0.67954c-0.29687 0-0.51567-0.07015-0.65629-0.21084-0.14062-0.14069-0.21084-0.35927-0.21084-0.65629v-8.6527zm29.296 0v1.7348h0.49247c0.29687 0 0.50753 0.070663 0.63252 0.21136 0.125 0.14069 0.18759 0.35927 0.18759 0.65629v6.0503c0 0.31265-0.0702 0.53885-0.21085 0.67955-0.12499 0.12506-0.34379 0.18758-0.65629 0.18758h-0.58601v1.7353h5.3671v-1.7353h-0.58601c-0.29686 0-0.50751-0.06252-0.63251-0.18758-0.125-0.14069-0.18758-0.36689-0.18758-0.67955v-4.4788c0-0.82853 0.18725-1.4385 0.56223-1.8293 0.37499-0.40645 1.008-0.60978 1.8986-0.60978h1.3126v-1.7348h-1.078c-0.67185 0-1.258 0.093528-1.758 0.28112-0.48436 0.18759-0.88278 0.52359-1.1953 1.0082l-0.32814-1.2893zm-70.85 1.3364c1.9843 0 2.9766 1.1412 2.9766 3.4236h-6.1872c0-1.063 0.27324-1.8992 0.8201-2.5089s1.3437-0.91467 2.3906-0.91467zm63.772 0c1.9843 0 2.9766 1.1412 2.9766 3.4236h-6.1877c0-1.063 0.27375-1.8992 0.82062-2.5089 0.54686-0.60967 1.3437-0.91467 2.3906-0.91467zm-87.139 0.07028c1.125 0 1.961 0.35176 2.5079 1.0552 0.54686 0.68784 0.8201 1.7507 0.8201 3.189 0 1.4226-0.27324 2.4779-0.8201 3.1657-0.54686 0.68784-1.3829 1.032-2.5079 1.032-1.125 0-1.961-0.34414-2.5079-1.032-0.53124-0.68784-0.79685-1.7431-0.79685-3.1657 0-1.4382 0.26561-2.5011 0.79685-3.189 0.54686-0.70347 1.3829-1.0552 2.5079-1.0552z" fill-opacity=".78039" stroke-linecap="round" stroke-width=".21978"/>
4
+ </svg>
Binary file
Binary file
@@ -0,0 +1,26 @@
1
+ [Main]
2
+ name = Cyberpunk Night
3
+ author = Anders Lemvigh
4
+ url = https://github.com/alemvigh
5
+ license = CC BY-SA 4.0
6
+ licenseurl = https://creativecommons.org/licenses/by-sa/4.0/
7
+
8
+ [Syntax]
9
+ background = 0, 0, 0
10
+ text = 150, 150, 150
11
+ link = 77, 077, 255
12
+ headertext = 255, 255, 255
13
+ headertag = 50, 0, 180
14
+ emphasis = 0, 255, 255
15
+ straightquotes = 7, 27, 219
16
+ doublequotes = 0, 255, 0
17
+ singlequotes = 0, 140, 255
18
+ hidden = 77, 77, 100
19
+ shortcode = 255, 255, 0
20
+ keyword = 255, 100, 255
21
+ value = 255, 150, 10
22
+ spellcheckline = 242, 72, 23
23
+ errorline = 186, 218, 4
24
+ replacetag = 0, 0, 180
25
+ modifier = 144, 142, 176
26
+ optional = 180, 180, 180
@@ -20,6 +20,7 @@ hidden = 150, 150, 150
20
20
  shortcode = 0, 155, 200
21
21
  keyword = 200, 46, 0
22
22
  value = 184, 200, 0
23
+ optional = 0, 155, 200
23
24
  spellcheckline = 200, 46, 0
24
25
  errorline = 46, 200, 0
25
26
  replacetag = 0, 184, 46
@@ -20,6 +20,7 @@ hidden = 100, 100, 100
20
20
  shortcode = 0, 100, 0
21
21
  keyword = 200, 50, 50
22
22
  value = 50, 150, 50
23
+ optional = 0, 100, 0
23
24
  spellcheckline = 200, 0, 0
24
25
  errorline = 0, 150, 0
25
26
  replacetag = 0, 150, 0
@@ -20,6 +20,7 @@ hidden = 150, 150, 150
20
20
  shortcode = 225, 225, 225
21
21
  keyword = 225, 225, 225
22
22
  value = 200, 200, 200
23
+ optional = 225, 225, 225
23
24
  spellcheckline = 200, 46, 0
24
25
  errorline = 46, 200, 0
25
26
  replacetag = 225, 225, 225
@@ -20,6 +20,7 @@ hidden = 100, 100, 100
20
20
  shortcode = 0, 0, 0
21
21
  keyword = 0, 0, 0
22
22
  value = 20, 20, 20
23
+ optional = 0, 0, 0
23
24
  spellcheckline = 200, 0, 0
24
25
  errorline = 0, 150, 0
25
26
  replacetag = 0, 0, 0
@@ -40,6 +40,7 @@ hidden = 152, 159, 177
40
40
  shortcode = 40, 142, 215
41
41
  keyword = 222, 61, 58
42
42
  value = 150, 74, 193
43
+ optional = 40, 142, 215
43
44
  spellcheckline = 222, 61, 58
44
45
  errorline = 8, 145, 106
45
46
  replacetag = 42, 162, 152
@@ -40,6 +40,7 @@ hidden = 99, 119, 119
40
40
  shortcode = 130, 170, 255
41
41
  keyword = 247, 140, 108
42
42
  value = 199, 146, 234
43
+ optional = 130, 170, 255
43
44
  spellcheckline = 247, 140, 108
44
45
  errorline = 173, 219, 103
45
46
  replacetag = 127, 219, 202
@@ -20,6 +20,7 @@ hidden = 147, 161, 161
20
20
  shortcode = 147, 161, 161
21
21
  keyword = 133, 153, 0
22
22
  value = 203, 75, 22
23
+ optional = 147, 161, 161
23
24
  spellcheckline = 203, 75, 22
24
25
  errorline = 220, 50, 47
25
26
  replacetag = 133, 153, 0
@@ -20,6 +20,7 @@ hidden = 88, 110, 117
20
20
  shortcode = 88, 110, 117
21
21
  keyword = 133, 153, 0
22
22
  value = 203, 75, 22
23
+ optional = 88, 110, 117
23
24
  spellcheckline = 203, 75, 22
24
25
  errorline = 220, 50, 47
25
26
  replacetag = 133, 153, 0
@@ -0,0 +1,23 @@
1
+ [Main]
2
+ name = Tango
3
+ author = Veronica Berglyd Olsen (adaptation)
4
+
5
+ [Syntax]
6
+ background = 48, 48, 47
7
+ text = 238, 238, 236
8
+ link = 115, 159, 207
9
+ headertext = 115, 159, 207
10
+ headertag = 52, 101, 164
11
+ emphasis = 196, 160, 0
12
+ straightquotes = 239, 41, 41
13
+ doublequotes = 138, 226, 52
14
+ singlequotes = 252, 233, 79
15
+ hidden = 143, 143, 141
16
+ shortcode = 115, 159, 207
17
+ keyword = 239, 41, 41
18
+ value = 173, 127, 168
19
+ optional = 115, 159, 207
20
+ spellcheckline = 239, 41, 41
21
+ errorline = 138, 226, 52
22
+ replacetag = 51, 226, 226
23
+ modifier = 196, 160, 0
@@ -40,6 +40,7 @@ hidden = 142, 144, 140
40
40
  shortcode = 66, 113, 174
41
41
  keyword = 240, 40, 41
42
42
  value = 137, 89, 168
43
+ optional = 66, 113, 174
43
44
  spellcheckline = 240, 40, 41
44
45
  errorline = 113, 140, 0
45
46
  replacetag = 62, 153, 159
@@ -40,6 +40,7 @@ hidden = 150, 152, 150
40
40
  shortcode = 129, 162, 190
41
41
  keyword = 204, 102, 102
42
42
  value = 178, 148, 187
43
+ optional = 129, 162, 190
43
44
  spellcheckline = 204, 102, 102
44
45
  errorline = 181, 189, 104
45
46
  replacetag = 138, 190, 183
@@ -40,6 +40,7 @@ hidden = 114, 133, 183
40
40
  shortcode = 187, 218, 255
41
41
  keyword = 255, 157, 164
42
42
  value = 235, 187, 255
43
+ optional = 187, 218, 255
43
44
  spellcheckline = 255, 157, 164
44
45
  errorline = 209, 241, 169
45
46
  replacetag = 153, 255, 255
@@ -40,6 +40,7 @@ hidden = 150, 152, 150
40
40
  shortcode = 122, 166, 218
41
41
  keyword = 213, 78, 83
42
42
  value = 195, 151, 216
43
+ optional = 122, 166, 218
43
44
  spellcheckline = 213, 78, 83
44
45
  errorline = 185, 202, 74
45
46
  replacetag = 112, 192, 177
@@ -40,6 +40,7 @@ hidden = 153, 153, 153
40
40
  shortcode = 102, 153, 204
41
41
  keyword = 242, 119, 122
42
42
  value = 204, 153, 204
43
+ optional = 102, 153, 204
43
44
  spellcheckline = 242, 119, 122
44
45
  errorline = 153, 204, 153
45
46
  replacetag = 102, 204, 204
@@ -2,8 +2,6 @@
2
2
  <html>
3
3
  <body>
4
4
 
5
- <h2>Credits</h2>
6
-
7
5
  <h3>Main Developer</h3>
8
6
  <p>Veronica Berglyd Olsen (<a href="https://github.com/vkbo">@vkbo</a>)</p>
9
7
 
@@ -17,6 +15,10 @@
17
15
  <p>For other contributions, see the project's
18
16
  <a href="https://github.com/vkbo/novelWriter/graphs/contributors">Contributors</a> page.</p>
19
17
 
18
+ <h3>Artwork</h3>
19
+
20
+ <p>The artwork on the Welcome dialog was created by <a href="https://louisdurrant.art">Louis Durrant</a>.</p>
21
+
20
22
  <h3>Translations</h3>
21
23
 
22
24
  <p>The default language is English (UK) with English (US) as an option. These are the original
@@ -0,0 +1,29 @@
1
+ [Main]
2
+ name = Cyberpunk Night
3
+ description = A taste of the future 80s
4
+ author = Anders Lemvigh
5
+ url = https://github.com/alemvigh
6
+ license = CC BY-SA 4.0
7
+ licenseurl = https://creativecommons.org/licenses/by-sa/4.0/
8
+ icontheme = typicons_dark
9
+
10
+ [Palette]
11
+ window = 0, 0, 0
12
+ windowtext = 150, 150, 150
13
+ base = 0, 0, 0
14
+ alternatebase = 30, 20, 45
15
+ text = 150, 150, 150
16
+ tooltipbase = 40, 20, 70
17
+ tooltiptext = 255, 255, 255
18
+ button = 5, 0, 10
19
+ buttontext = 150, 150, 150
20
+ brighttext = 255, 255, 255
21
+ highlight = 50, 30, 80
22
+ highlightedtext = 255, 255, 255
23
+ link = 77, 77, 255
24
+ linkvisited = 50, 0, 80
25
+
26
+ [GUI]
27
+ statusnone = 50, 50, 50
28
+ statussaved = 77, 255, 77
29
+ statusunsaved = 255, 77, 77
@@ -21,8 +21,8 @@ buttontext = 204, 204, 204
21
21
  brighttext = 62, 62, 62
22
22
  highlight = 44, 152, 247
23
23
  highlightedtext = 255, 255, 255
24
- link = 44, 152, 247
25
- linkvisited = 44, 152, 247
24
+ link = 102, 153, 204
25
+ linkvisited = 102, 153, 204
26
26
 
27
27
  [GUI]
28
28
  helptext = 164, 164, 164
@@ -21,8 +21,8 @@ buttontext = 0, 0, 0
21
21
  brighttext = 255, 255, 255
22
22
  highlight = 48, 135, 198
23
23
  highlightedtext = 255, 255, 255
24
- link = 0, 84, 255
25
- linkvisited = 0, 84, 255
24
+ link = 66, 113, 174
25
+ linkvisited = 66, 113, 174
26
26
 
27
27
  [GUI]
28
28
  helptext = 92, 92, 92
novelwriter/common.py CHANGED
@@ -29,7 +29,7 @@ import logging
29
29
  import unicodedata
30
30
  import xml.etree.ElementTree as ET
31
31
 
32
- from typing import Any, Literal
32
+ from typing import TYPE_CHECKING, Any, Literal
33
33
  from pathlib import Path
34
34
  from datetime import datetime
35
35
  from configparser import ConfigParser
@@ -41,7 +41,10 @@ from PyQt5.QtCore import QCoreApplication, QUrl
41
41
 
42
42
  from novelwriter.enum import nwItemClass, nwItemType, nwItemLayout
43
43
  from novelwriter.error import logException
44
- from novelwriter.constants import nwConst, nwUnicode
44
+ from novelwriter.constants import nwConst, nwLabels, nwUnicode, trConst
45
+
46
+ if TYPE_CHECKING: # pragma: no cover
47
+ from typing import TypeGuard # Requires Python 3.10
45
48
 
46
49
  logger = logging.getLogger(__name__)
47
50
 
@@ -104,15 +107,6 @@ def checkBool(value: Any, default: bool) -> bool:
104
107
  return default
105
108
 
106
109
 
107
- def checkHandle(value, default, allowNone=False):
108
- """Check if a value is a handle."""
109
- if allowNone and (value is None or value == "None"):
110
- return None
111
- if isHandle(value):
112
- return str(value)
113
- return default
114
-
115
-
116
110
  def checkUuid(value: Any, default: str) -> str:
117
111
  """Try to process a value as an UUID, or return a default."""
118
112
  try:
@@ -135,7 +129,7 @@ def checkPath(value: Any, default: Path) -> Path:
135
129
  # Validator Functions
136
130
  ##
137
131
 
138
- def isHandle(value: Any) -> bool:
132
+ def isHandle(value: Any) -> TypeGuard[str]:
139
133
  """Check if a string is a valid novelWriter handle.
140
134
  Note: This is case sensitive. Must be lower case!
141
135
  """
@@ -149,7 +143,7 @@ def isHandle(value: Any) -> bool:
149
143
  return True
150
144
 
151
145
 
152
- def isTitleTag(value: Any) -> bool:
146
+ def isTitleTag(value: Any) -> TypeGuard[str]:
153
147
  """Check if a string is a valid title tag string."""
154
148
  if not isinstance(value, str):
155
149
  return False
@@ -163,19 +157,19 @@ def isTitleTag(value: Any) -> bool:
163
157
  return True
164
158
 
165
159
 
166
- def isItemClass(value: str) -> bool:
160
+ def isItemClass(value: Any) -> TypeGuard[str]:
167
161
  """Check if a string is a valid nwItemClass identifier."""
168
- return value in nwItemClass.__members__
162
+ return isinstance(value, str) and value in nwItemClass.__members__
169
163
 
170
164
 
171
- def isItemType(value: str) -> bool:
165
+ def isItemType(value: Any) -> TypeGuard[str]:
172
166
  """Check if a string is a valid nwItemType identifier."""
173
- return value in nwItemType.__members__
167
+ return isinstance(value, str) and value in nwItemType.__members__
174
168
 
175
169
 
176
- def isItemLayout(value: str) -> bool:
170
+ def isItemLayout(value: Any) -> TypeGuard[str]:
177
171
  """Check if a string is a valid nwItemLayout identifier."""
178
- return value in nwItemLayout.__members__
172
+ return isinstance(value, str) and value in nwItemLayout.__members__
179
173
 
180
174
 
181
175
  def hexToInt(value: Any, default: int = 0) -> int:
@@ -189,8 +183,7 @@ def hexToInt(value: Any, default: int = 0) -> int:
189
183
 
190
184
 
191
185
  def minmax(value: int, minVal: int, maxVal: int) -> int:
192
- """Make sure an integer is between min and max value (inclusive).
193
- """
186
+ """Check that an value is between min and max value (inclusive)."""
194
187
  return min(maxVal, max(minVal, value))
195
188
 
196
189
 
@@ -213,17 +206,17 @@ def formatInt(value: int) -> str:
213
206
  if not isinstance(value, int):
214
207
  return "ERR"
215
208
 
216
- theVal = float(value)
217
- if theVal > 1000.0:
209
+ fVal = float(value)
210
+ if fVal > 1000.0:
218
211
  for pF in ["k", "M", "G", "T", "P", "E"]:
219
- theVal /= 1000.0
220
- if theVal < 1000.0:
221
- if theVal < 10.0:
222
- return f"{theVal:4.2f}{nwUnicode.U_THSP}{pF}"
223
- elif theVal < 100.0:
224
- return f"{theVal:4.1f}{nwUnicode.U_THSP}{pF}"
212
+ fVal /= 1000.0
213
+ if fVal < 1000.0:
214
+ if fVal < 10.0:
215
+ return f"{fVal:4.2f}{nwUnicode.U_THSP}{pF}"
216
+ elif fVal < 100.0:
217
+ return f"{fVal:4.1f}{nwUnicode.U_THSP}{pF}"
225
218
  else:
226
- return f"{theVal:3.0f}{nwUnicode.U_THSP}{pF}"
219
+ return f"{fVal:3.0f}{nwUnicode.U_THSP}{pF}"
227
220
 
228
221
  return str(value)
229
222
 
@@ -250,6 +243,24 @@ def formatTime(t: int) -> str:
250
243
  return "ERROR"
251
244
 
252
245
 
246
+ def formatVersion(value: str) -> str:
247
+ """Format a version number into a more human readable form."""
248
+ return value.lower().replace("a", " Alpha ").replace("b", " Beta ").replace("rc", " RC ")
249
+
250
+
251
+ def formatFileFilter(extensions: list[str | tuple[str, str]]) -> str:
252
+ """Format a list of extensions, or extension + label pairs into a
253
+ QFileDialog extensions filter.
254
+ """
255
+ result = []
256
+ for ext in extensions:
257
+ if isinstance(ext, str):
258
+ result.append(f"{trConst(nwLabels.FILE_FILTERS.get(ext))} ({ext})")
259
+ elif isinstance(ext, tuple) and len(ext) == 2:
260
+ result.append(f"{ext[0]} ({ext[1]})")
261
+ return ";;".join(result)
262
+
263
+
253
264
  ##
254
265
  # String Functions
255
266
  ##
@@ -270,22 +281,22 @@ def transferCase(source: str, target: str) -> str:
270
281
  """Transfers the case of the source word to the target word. This
271
282
  will consider all upper or lower, and first char capitalisation.
272
283
  """
273
- theResult = target
284
+ result = target
274
285
 
275
286
  if not isinstance(source, str) or not isinstance(target, str):
276
- return theResult
287
+ return result
277
288
  if len(target) < 1 or len(source) < 1:
278
- return theResult
289
+ return result
279
290
 
280
291
  if source.istitle():
281
- theResult = target.title()
292
+ result = target.title()
282
293
 
283
294
  if source.isupper():
284
- theResult = target.upper()
295
+ result = target.upper()
285
296
  elif source.islower():
286
- theResult = target.lower()
297
+ result = target.lower()
287
298
 
288
- return theResult
299
+ return result
289
300
 
290
301
 
291
302
  def fuzzyTime(seconds: int) -> str:
novelwriter/config.py CHANGED
@@ -110,8 +110,8 @@ class Config:
110
110
 
111
111
  # Size Settings
112
112
  self._mainWinSize = [1200, 650] # Last size of the main GUI window
113
+ self._welcomeSize = [800, 550] # Last size of the welcome window
113
114
  self._prefsWinSize = [700, 615] # Last size of the Preferences dialog
114
- self._projLoadCols = [280, 60, 160] # Last columns widths of the Project Load dialog
115
115
  self._mainPanePos = [300, 800] # Last position of the main window splitter
116
116
  self._viewPanePos = [500, 150] # Last position of the document viewer splitter
117
117
  self._outlnPanePos = [500, 150] # Last position of the outline panel splitter
@@ -150,9 +150,6 @@ class Config:
150
150
  self.autoScrollPos = 30 # Start point for typewriter-like scrolling
151
151
  self.scrollPastEnd = True # Scroll past end of document, and centre cursor
152
152
 
153
- self.wordCountTimer = 5.0 # Interval for word count update in seconds
154
- self.incNotesWCount = True # The status bar word count includes notes
155
-
156
153
  self.highlightQuotes = True # Highlight text in quotes
157
154
  self.allowOpenSQuote = False # Allow open-ended single quotes
158
155
  self.allowOpenDQuote = True # Allow open-ended double quotes
@@ -160,6 +157,7 @@ class Config:
160
157
 
161
158
  self.stopWhenIdle = True # Stop the status bar clock when the user is idle
162
159
  self.userIdleTime = 300 # Time of inactivity to consider user idle
160
+ self.incNotesWCount = True # The status bar word count includes notes
163
161
 
164
162
  # User-Selected Symbol Settings
165
163
  self.fmtApostrophe = nwUnicode.U_RSQUO
@@ -250,12 +248,12 @@ class Config:
250
248
  return [int(x*self.guiScale) for x in self._mainWinSize]
251
249
 
252
250
  @property
253
- def preferencesWinSize(self) -> list[int]:
254
- return [int(x*self.guiScale) for x in self._prefsWinSize]
251
+ def welcomeWinSize(self) -> list[int]:
252
+ return [int(x*self.guiScale) for x in self._welcomeSize]
255
253
 
256
254
  @property
257
- def projLoadColWidths(self) -> list[int]:
258
- return [int(x*self.guiScale) for x in self._projLoadCols]
255
+ def preferencesWinSize(self) -> list[int]:
256
+ return [int(x*self.guiScale) for x in self._prefsWinSize]
259
257
 
260
258
  @property
261
259
  def mainPanePos(self) -> list[int]:
@@ -306,17 +304,18 @@ class Config:
306
304
  self._mainWinSize[1] = height
307
305
  return
308
306
 
307
+ def setWelcomeWinSize(self, width: int, height: int) -> None:
308
+ """Set the size of the Preferences dialog window."""
309
+ self._welcomeSize[0] = int(width/self.guiScale)
310
+ self._welcomeSize[1] = int(height/self.guiScale)
311
+ return
312
+
309
313
  def setPreferencesWinSize(self, width: int, height: int) -> None:
310
314
  """Set the size of the Preferences dialog window."""
311
315
  self._prefsWinSize[0] = int(width/self.guiScale)
312
316
  self._prefsWinSize[1] = int(height/self.guiScale)
313
317
  return
314
318
 
315
- def setProjLoadColWidths(self, widths: list[int]) -> None:
316
- """Set the column widths of the Load Project dialog."""
317
- self._projLoadCols = [int(x/self.guiScale) for x in widths]
318
- return
319
-
320
319
  def setMainPanePos(self, pos: list[int]) -> None:
321
320
  """Set the position of the main GUI splitter."""
322
321
  self._mainPanePos = [int(x/self.guiScale) for x in pos]
@@ -410,10 +409,10 @@ class Config:
410
409
  """Compile and return error messages from the initialisation of
411
410
  the Config class, and clear the error buffer.
412
411
  """
413
- errMessage = "<br>".join(self._errData)
412
+ message = "<br>".join(self._errData)
414
413
  self._hasError = False
415
414
  self._errData = []
416
- return errMessage
415
+ return message
417
416
 
418
417
  def listLanguages(self, lngSet: int) -> list[tuple[str, str]]:
419
418
  """List localisation files in the i18n folder. The default GUI
@@ -545,8 +544,8 @@ class Config:
545
544
  # Sizes
546
545
  sec = "Sizes"
547
546
  self._mainWinSize = conf.rdIntList(sec, "mainwindow", self._mainWinSize)
547
+ self._welcomeSize = conf.rdIntList(sec, "welcome", self._welcomeSize)
548
548
  self._prefsWinSize = conf.rdIntList(sec, "preferences", self._prefsWinSize)
549
- self._projLoadCols = conf.rdIntList(sec, "projloadcols", self._projLoadCols)
550
549
  self._mainPanePos = conf.rdIntList(sec, "mainpane", self._mainPanePos)
551
550
  self._viewPanePos = conf.rdIntList(sec, "viewpane", self._viewPanePos)
552
551
  self._outlnPanePos = conf.rdIntList(sec, "outlinepane", self._outlnPanePos)
@@ -590,7 +589,6 @@ class Config:
590
589
  self.showTabsNSpaces = conf.rdBool(sec, "showtabsnspaces", self.showTabsNSpaces)
591
590
  self.showLineEndings = conf.rdBool(sec, "showlineendings", self.showLineEndings)
592
591
  self.showMultiSpaces = conf.rdBool(sec, "showmultispaces", self.showMultiSpaces)
593
- self.wordCountTimer = conf.rdFlt(sec, "wordcounttimer", self.wordCountTimer)
594
592
  self.incNotesWCount = conf.rdBool(sec, "incnoteswcount", self.incNotesWCount)
595
593
  self.showFullPath = conf.rdBool(sec, "showfullpath", self.showFullPath)
596
594
  self.highlightQuotes = conf.rdBool(sec, "highlightquotes", self.highlightQuotes)
@@ -635,7 +633,7 @@ class Config:
635
633
  conf = NWConfigParser()
636
634
 
637
635
  conf["Meta"] = {
638
- "timestamp": formatTimeStamp(time()),
636
+ "timestamp": formatTimeStamp(time()),
639
637
  }
640
638
 
641
639
  conf["Main"] = {
@@ -651,12 +649,12 @@ class Config:
651
649
  }
652
650
 
653
651
  conf["Sizes"] = {
654
- "mainwindow": self._packList(self._mainWinSize),
655
- "preferences": self._packList(self._prefsWinSize),
656
- "projloadcols": self._packList(self._projLoadCols),
657
- "mainpane": self._packList(self._mainPanePos),
658
- "viewpane": self._packList(self._viewPanePos),
659
- "outlinepane": self._packList(self._outlnPanePos),
652
+ "mainwindow": self._packList(self._mainWinSize),
653
+ "welcome": self._packList(self._welcomeSize),
654
+ "preferences": self._packList(self._prefsWinSize),
655
+ "mainpane": self._packList(self._mainPanePos),
656
+ "viewpane": self._packList(self._viewPanePos),
657
+ "outlinepane": self._packList(self._outlnPanePos),
660
658
  }
661
659
 
662
660
  conf["Project"] = {
@@ -697,7 +695,6 @@ class Config:
697
695
  "showtabsnspaces": str(self.showTabsNSpaces),
698
696
  "showlineendings": str(self.showLineEndings),
699
697
  "showmultispaces": str(self.showMultiSpaces),
700
- "wordcounttimer": str(self.wordCountTimer),
701
698
  "incnoteswcount": str(self.incNotesWCount),
702
699
  "showfullpath": str(self.showFullPath),
703
700
  "highlightquotes": str(self.highlightQuotes),
@@ -774,22 +771,20 @@ class RecentProjects:
774
771
  self._data = {}
775
772
 
776
773
  cacheFile = self._conf.dataPath(nwFiles.RECENT_FILE)
777
- if not cacheFile.is_file():
778
- return True
779
-
780
- try:
781
- with open(cacheFile, mode="r", encoding="utf-8") as inFile:
782
- theData = json.load(inFile)
783
- for projPath, theEntry in theData.items():
784
- self._data[projPath] = {
785
- "title": theEntry.get("title", ""),
786
- "words": theEntry.get("words", 0),
787
- "time": theEntry.get("time", 0),
788
- }
789
- except Exception:
790
- logger.error("Could not load recent project cache")
791
- logException()
792
- return False
774
+ if cacheFile.is_file():
775
+ try:
776
+ with open(cacheFile, mode="r", encoding="utf-8") as inFile:
777
+ data = json.load(inFile)
778
+ for path, entry in data.items():
779
+ self._data[path] = {
780
+ "title": entry.get("title", ""),
781
+ "words": entry.get("words", 0),
782
+ "time": entry.get("time", 0),
783
+ }
784
+ except Exception:
785
+ logger.error("Could not load recent project cache")
786
+ logException()
787
+ return False
793
788
 
794
789
  return True
795
790