novelWriter 2.6b2__py3-none-any.whl → 2.6rc1__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 (95) hide show
  1. {novelWriter-2.6b2.dist-info → novelWriter-2.6rc1.dist-info}/METADATA +2 -2
  2. {novelWriter-2.6b2.dist-info → novelWriter-2.6rc1.dist-info}/RECORD +95 -95
  3. {novelWriter-2.6b2.dist-info → novelWriter-2.6rc1.dist-info}/WHEEL +1 -1
  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_fr_FR.qm +0 -0
  9. novelwriter/assets/i18n/nw_it_IT.qm +0 -0
  10. novelwriter/assets/i18n/nw_ja_JP.qm +0 -0
  11. novelwriter/assets/i18n/nw_nb_NO.qm +0 -0
  12. novelwriter/assets/i18n/nw_nl_NL.qm +0 -0
  13. novelwriter/assets/i18n/nw_pl_PL.qm +0 -0
  14. novelwriter/assets/i18n/nw_pt_BR.qm +0 -0
  15. novelwriter/assets/i18n/nw_ru_RU.qm +0 -0
  16. novelwriter/assets/i18n/nw_zh_CN.qm +0 -0
  17. novelwriter/assets/manual.pdf +0 -0
  18. novelwriter/assets/sample.zip +0 -0
  19. novelwriter/common.py +1 -1
  20. novelwriter/config.py +4 -1
  21. novelwriter/constants.py +36 -36
  22. novelwriter/core/buildsettings.py +1 -1
  23. novelwriter/core/coretools.py +1 -1
  24. novelwriter/core/docbuild.py +1 -1
  25. novelwriter/core/document.py +1 -1
  26. novelwriter/core/index.py +1 -1
  27. novelwriter/core/item.py +1 -1
  28. novelwriter/core/itemmodel.py +1 -1
  29. novelwriter/core/options.py +1 -1
  30. novelwriter/core/project.py +1 -1
  31. novelwriter/core/projectdata.py +8 -2
  32. novelwriter/core/projectxml.py +1 -1
  33. novelwriter/core/sessions.py +1 -1
  34. novelwriter/core/spellcheck.py +1 -1
  35. novelwriter/core/status.py +17 -3
  36. novelwriter/core/storage.py +1 -1
  37. novelwriter/core/tree.py +1 -1
  38. novelwriter/dialogs/about.py +1 -1
  39. novelwriter/dialogs/docmerge.py +1 -1
  40. novelwriter/dialogs/docsplit.py +1 -1
  41. novelwriter/dialogs/editlabel.py +1 -1
  42. novelwriter/dialogs/preferences.py +2 -2
  43. novelwriter/dialogs/projectsettings.py +146 -96
  44. novelwriter/dialogs/quotes.py +1 -1
  45. novelwriter/dialogs/wordlist.py +11 -10
  46. novelwriter/enum.py +1 -1
  47. novelwriter/error.py +2 -2
  48. novelwriter/extensions/configlayout.py +1 -1
  49. novelwriter/extensions/eventfilters.py +1 -1
  50. novelwriter/extensions/modified.py +17 -5
  51. novelwriter/extensions/novelselector.py +1 -1
  52. novelwriter/extensions/pagedsidebar.py +4 -4
  53. novelwriter/extensions/progressbars.py +4 -4
  54. novelwriter/extensions/statusled.py +3 -3
  55. novelwriter/extensions/switch.py +3 -3
  56. novelwriter/extensions/switchbox.py +1 -1
  57. novelwriter/extensions/versioninfo.py +1 -1
  58. novelwriter/formats/shared.py +1 -1
  59. novelwriter/formats/todocx.py +1 -1
  60. novelwriter/formats/tohtml.py +1 -1
  61. novelwriter/formats/tokenizer.py +5 -5
  62. novelwriter/formats/tomarkdown.py +1 -1
  63. novelwriter/formats/toodt.py +1 -1
  64. novelwriter/formats/toqdoc.py +1 -1
  65. novelwriter/formats/toraw.py +1 -1
  66. novelwriter/gui/doceditor.py +4 -2
  67. novelwriter/gui/dochighlight.py +1 -1
  68. novelwriter/gui/docviewer.py +1 -1
  69. novelwriter/gui/docviewerpanel.py +1 -1
  70. novelwriter/gui/editordocument.py +1 -1
  71. novelwriter/gui/itemdetails.py +3 -3
  72. novelwriter/gui/mainmenu.py +1 -1
  73. novelwriter/gui/noveltree.py +1 -1
  74. novelwriter/gui/outline.py +8 -9
  75. novelwriter/gui/projtree.py +5 -7
  76. novelwriter/gui/search.py +2 -9
  77. novelwriter/gui/sidebar.py +1 -1
  78. novelwriter/gui/statusbar.py +20 -3
  79. novelwriter/gui/theme.py +1 -1
  80. novelwriter/guimain.py +1 -5
  81. novelwriter/shared.py +1 -1
  82. novelwriter/text/counting.py +1 -1
  83. novelwriter/text/patterns.py +1 -1
  84. novelwriter/tools/dictionaries.py +1 -1
  85. novelwriter/tools/lipsum.py +1 -1
  86. novelwriter/tools/manusbuild.py +1 -1
  87. novelwriter/tools/manuscript.py +7 -7
  88. novelwriter/tools/manussettings.py +1 -1
  89. novelwriter/tools/noveldetails.py +1 -1
  90. novelwriter/tools/welcome.py +1 -1
  91. novelwriter/tools/writingstats.py +1 -1
  92. novelwriter/types.py +2 -2
  93. {novelWriter-2.6b2.dist-info → novelWriter-2.6rc1.dist-info}/LICENSE.md +0 -0
  94. {novelWriter-2.6b2.dist-info → novelWriter-2.6rc1.dist-info}/entry_points.txt +0 -0
  95. {novelWriter-2.6b2.dist-info → novelWriter-2.6rc1.dist-info}/top_level.txt +0 -0
@@ -7,7 +7,7 @@ Created: 2023-08-31 [2.1rc1] WheelEventFilter
7
7
  Created: 2023-11-28 [2.2] StatusTipFilter
8
8
 
9
9
  This file is a part of novelWriter
10
- Copyright 2018–2024, Veronica Berglyd Olsen
10
+ Copyright (C) 2023 Veronica Berglyd Olsen and novelWriter contributors
11
11
 
12
12
  This program is free software: you can redistribute it and/or modify
13
13
  it under the terms of the GNU General Public License as published by
@@ -10,7 +10,7 @@ Created: 2024-05-01 [2.5b1] NToolDialog
10
10
  Created: 2024-05-01 [2.5b1] NNonBlockingDialog
11
11
 
12
12
  This file is a part of novelWriter
13
- Copyright 2018–2024, Veronica Berglyd Olsen
13
+ Copyright (C) 2024 Veronica Berglyd Olsen and novelWriter contributors
14
14
 
15
15
  This program is free software: you can redistribute it and/or modify
16
16
  it under the terms of the GNU General Public License as published by
@@ -30,14 +30,15 @@ from __future__ import annotations
30
30
  from enum import Enum
31
31
  from typing import TYPE_CHECKING
32
32
 
33
- from PyQt5.QtCore import QSize, Qt, pyqtSlot
34
- from PyQt5.QtGui import QWheelEvent
33
+ from PyQt5.QtCore import QSize, Qt, pyqtSignal, pyqtSlot
34
+ from PyQt5.QtGui import QMouseEvent, QWheelEvent
35
35
  from PyQt5.QtWidgets import (
36
- QApplication, QComboBox, QDialog, QDoubleSpinBox, QSpinBox, QToolButton,
37
- QWidget
36
+ QApplication, QComboBox, QDialog, QDoubleSpinBox, QLabel, QSpinBox,
37
+ QToolButton, QWidget
38
38
  )
39
39
 
40
40
  from novelwriter import CONFIG, SHARED
41
+ from novelwriter.types import QtMouseLeft
41
42
 
42
43
  if TYPE_CHECKING: # pragma: no cover
43
44
  from novelwriter.guimain import GuiMain
@@ -196,3 +197,14 @@ class NIconToggleButton(QToolButton):
196
197
  iconSize = self.iconSize()
197
198
  self.setIcon(SHARED.theme.getToggleIcon(iconKey, (iconSize.width(), iconSize.height())))
198
199
  return
200
+
201
+
202
+ class NClickableLabel(QLabel):
203
+
204
+ mouseClicked = pyqtSignal()
205
+
206
+ def mousePressEvent(self, event: QMouseEvent) -> None:
207
+ """Capture a left mouse click and emit its signal."""
208
+ if event.button() == QtMouseLeft:
209
+ self.mouseClicked.emit()
210
+ return super().mousePressEvent(event)
@@ -6,7 +6,7 @@ File History:
6
6
  Created: 2022-11-17 [2.0] NovelSelector
7
7
 
8
8
  This file is a part of novelWriter
9
- Copyright 2018–2024, Veronica Berglyd Olsen
9
+ Copyright (C) 2022 Veronica Berglyd Olsen and novelWriter contributors
10
10
 
11
11
  This program is free software: you can redistribute it and/or modify
12
12
  it under the terms of the GNU General Public License as published by
@@ -8,7 +8,7 @@ Created: 2023-02-21 [2.1b1] NPagedToolButton
8
8
  Created: 2023-02-21 [2.1b1] NPagedToolLabel
9
9
 
10
10
  This file is a part of novelWriter
11
- Copyright 2018–2024, Veronica Berglyd Olsen
11
+ Copyright (C) 2023 Veronica Berglyd Olsen and novelWriter contributors
12
12
 
13
13
  This program is free software: you can redistribute it and/or modify
14
14
  it under the terms of the GNU General Public License as published by
@@ -33,7 +33,7 @@ from PyQt5.QtWidgets import (
33
33
  )
34
34
 
35
35
  from novelwriter.types import (
36
- QtAlignLeft, QtMouseOver, QtNoBrush, QtNoPen, QtPaintAnitAlias,
36
+ QtAlignLeft, QtMouseOver, QtNoBrush, QtNoPen, QtPaintAntiAlias,
37
37
  QtSizeExpanding, QtSizeFixed
38
38
  )
39
39
 
@@ -146,7 +146,7 @@ class _PagedToolButton(QToolButton):
146
146
  opt.initFrom(self)
147
147
 
148
148
  paint = QPainter(self)
149
- paint.setRenderHint(QtPaintAnitAlias, True)
149
+ paint.setRenderHint(QtPaintAntiAlias, True)
150
150
  paint.setPen(QtNoPen)
151
151
  paint.setBrush(QtNoBrush)
152
152
 
@@ -213,7 +213,7 @@ class _NPagedToolLabel(QLabel):
213
213
  label that matches the button style.
214
214
  """
215
215
  paint = QPainter(self)
216
- paint.setRenderHint(QtPaintAnitAlias, True)
216
+ paint.setRenderHint(QtPaintAntiAlias, True)
217
217
  paint.setPen(QtNoPen)
218
218
 
219
219
  width = self.width()
@@ -7,7 +7,7 @@ Created: 2023-06-07 [2.1b1] NProgressCircle
7
7
  Created: 2023-06-09 [2.1b1] NProgressSimple
8
8
 
9
9
  This file is a part of novelWriter
10
- Copyright 2018–2024, Veronica Berglyd Olsen
10
+ Copyright (C) 2023 Veronica Berglyd Olsen and novelWriter contributors
11
11
 
12
12
  This program is free software: you can redistribute it and/or modify
13
13
  it under the terms of the GNU General Public License as published by
@@ -31,7 +31,7 @@ from PyQt5.QtGui import QBrush, QColor, QPainter, QPaintEvent, QPen
31
31
  from PyQt5.QtWidgets import QProgressBar, QWidget
32
32
 
33
33
  from novelwriter.types import (
34
- QtAlignCenter, QtPaintAnitAlias, QtRoundCap, QtSizeFixed, QtSolidLine,
34
+ QtAlignCenter, QtPaintAntiAlias, QtRoundCap, QtSizeFixed, QtSolidLine,
35
35
  QtTransparent
36
36
  )
37
37
 
@@ -91,7 +91,7 @@ class NProgressCircle(QProgressBar):
91
91
  progress = 100.0*self.value()/self.maximum()
92
92
  angle = ceil(16*3.6*progress)
93
93
  painter = QPainter(self)
94
- painter.setRenderHint(QtPaintAnitAlias, True)
94
+ painter.setRenderHint(QtPaintAntiAlias, True)
95
95
  painter.setPen(self._dPen)
96
96
  painter.setBrush(self._dBrush)
97
97
  painter.drawEllipse(self._dRect)
@@ -119,7 +119,7 @@ class NProgressSimple(QProgressBar):
119
119
  if (value := self.value()) > 0:
120
120
  progress = ceil(self.width()*float(value)/self.maximum())
121
121
  painter = QPainter(self)
122
- painter.setRenderHint(QtPaintAnitAlias, True)
122
+ painter.setRenderHint(QtPaintAntiAlias, True)
123
123
  painter.setPen(self.palette().highlight().color())
124
124
  painter.setBrush(self.palette().highlight())
125
125
  painter.drawRect(0, 0, progress, self.height())
@@ -6,7 +6,7 @@ File History:
6
6
  Created: 2020-05-17 [0.5.1]
7
7
 
8
8
  This file is a part of novelWriter
9
- Copyright 2018–2024, Veronica Berglyd Olsen
9
+ Copyright (C) 2020 Veronica Berglyd Olsen and novelWriter contributors
10
10
 
11
11
  This program is free software: you can redistribute it and/or modify
12
12
  it under the terms of the GNU General Public License as published by
@@ -30,7 +30,7 @@ from PyQt5.QtWidgets import QAbstractButton, QWidget
30
30
 
31
31
  from novelwriter import CONFIG
32
32
  from novelwriter.enum import nwTrinary
33
- from novelwriter.types import QtBlack, QtPaintAnitAlias
33
+ from novelwriter.types import QtBlack, QtPaintAntiAlias
34
34
 
35
35
  logger = logging.getLogger(__name__)
36
36
 
@@ -81,7 +81,7 @@ class StatusLED(QAbstractButton):
81
81
  def paintEvent(self, event: QPaintEvent) -> None:
82
82
  """Draw the LED."""
83
83
  painter = QPainter(self)
84
- painter.setRenderHint(QtPaintAnitAlias, True)
84
+ painter.setRenderHint(QtPaintAntiAlias, True)
85
85
  painter.setPen(self.palette().windowText().color())
86
86
  painter.setBrush(self._color)
87
87
  painter.setOpacity(1.0)
@@ -6,7 +6,7 @@ File History:
6
6
  Created: 2020-05-03 [0.4.5]
7
7
 
8
8
  This file is a part of novelWriter
9
- Copyright 2018–2024, Veronica Berglyd Olsen
9
+ Copyright (C) 2020 Veronica Berglyd Olsen and novelWriter contributors
10
10
 
11
11
  This program is free software: you can redistribute it and/or modify
12
12
  it under the terms of the GNU General Public License as published by
@@ -28,7 +28,7 @@ from PyQt5.QtGui import QMouseEvent, QPainter, QPaintEvent, QResizeEvent
28
28
  from PyQt5.QtWidgets import QAbstractButton, QWidget
29
29
 
30
30
  from novelwriter import CONFIG, SHARED
31
- from novelwriter.types import QtMouseLeft, QtNoPen, QtPaintAnitAlias, QtSizeFixed
31
+ from novelwriter.types import QtMouseLeft, QtNoPen, QtPaintAntiAlias, QtSizeFixed
32
32
 
33
33
 
34
34
  class NSwitch(QAbstractButton):
@@ -90,7 +90,7 @@ class NSwitch(QAbstractButton):
90
90
  def paintEvent(self, event: QPaintEvent) -> None:
91
91
  """Drawing the switch itself."""
92
92
  painter = QPainter(self)
93
- painter.setRenderHint(QtPaintAnitAlias, True)
93
+ painter.setRenderHint(QtPaintAntiAlias, True)
94
94
  painter.setPen(QtNoPen)
95
95
 
96
96
  palette = self.palette()
@@ -6,7 +6,7 @@ File History:
6
6
  Created: 2023-04-16 [2.1b1]
7
7
 
8
8
  This file is a part of novelWriter
9
- Copyright 2018–2024, Veronica Berglyd Olsen
9
+ Copyright (C) 2023 Veronica Berglyd Olsen and novelWriter contributors
10
10
 
11
11
  This program is free software: you can redistribute it and/or modify
12
12
  it under the terms of the GNU General Public License as published by
@@ -6,7 +6,7 @@ File History:
6
6
  Created: 2024-02-14 [2.3b1] VersionInfoWidget
7
7
 
8
8
  This file is a part of novelWriter
9
- Copyright 2018–2024, Veronica Berglyd Olsen
9
+ Copyright (C) 2024 Veronica Berglyd Olsen and novelWriter contributors
10
10
 
11
11
  This program is free software: you can redistribute it and/or modify
12
12
  it under the terms of the GNU General Public License as published by
@@ -6,7 +6,7 @@ File History:
6
6
  Created: 2024-10-21 [2.6b1]
7
7
 
8
8
  This file is a part of novelWriter
9
- Copyright 2018–2024, Veronica Berglyd Olsen
9
+ Copyright (C) 2024 Veronica Berglyd Olsen and novelWriter contributors
10
10
 
11
11
  This program is free software: you can redistribute it and/or modify
12
12
  it under the terms of the GNU General Public License as published by
@@ -7,7 +7,7 @@ Created: 2024-10-18 [2.6b1] ToDocX
7
7
  Created: 2024-10-18 [2.6b1] DocXParagraph
8
8
 
9
9
  This file is a part of novelWriter
10
- Copyright 2018–2024, Veronica Berglyd Olsen
10
+ Copyright (C) 2024 Veronica Berglyd Olsen and novelWriter contributors
11
11
 
12
12
  This program is free software: you can redistribute it and/or modify
13
13
  it under the terms of the GNU General Public License as published by
@@ -6,7 +6,7 @@ File History:
6
6
  Created: 2019-05-07 [0.0.1] ToHtml
7
7
 
8
8
  This file is a part of novelWriter
9
- Copyright 2018–2024, Veronica Berglyd Olsen
9
+ Copyright (C) 2019 Veronica Berglyd Olsen and novelWriter contributors
10
10
 
11
11
  This program is free software: you can redistribute it and/or modify
12
12
  it under the terms of the GNU General Public License as published by
@@ -7,7 +7,7 @@ Created: 2019-05-05 [0.0.1] Tokenizer
7
7
  Created: 2023-05-23 [2.1b1] HeadingFormatter
8
8
 
9
9
  This file is a part of novelWriter
10
- Copyright 2018–2024, Veronica Berglyd Olsen
10
+ Copyright (C) 2019 Veronica Berglyd Olsen and novelWriter contributors
11
11
 
12
12
  This program is free software: you can redistribute it and/or modify
13
13
  it under the terms of the GNU General Public License as published by
@@ -946,11 +946,11 @@ class Tokenizer(ABC):
946
946
  titleCount = self._counts.get(nwStats.TITLES, 0)
947
947
  paragraphCount = self._counts.get(nwStats.PARAGRAPHS, 0)
948
948
 
949
- allWords = self._counts.get(nwStats.WORDS_ALL, 0)
949
+ allWords = self._counts.get(nwStats.WORDS, 0)
950
950
  textWords = self._counts.get(nwStats.WORDS_TEXT, 0)
951
951
  titleWords = self._counts.get(nwStats.WORDS_TITLE, 0)
952
952
 
953
- allChars = self._counts.get(nwStats.CHARS_ALL, 0)
953
+ allChars = self._counts.get(nwStats.CHARS, 0)
954
954
  textChars = self._counts.get(nwStats.CHARS_TEXT, 0)
955
955
  titleChars = self._counts.get(nwStats.CHARS_TITLE, 0)
956
956
 
@@ -1004,11 +1004,11 @@ class Tokenizer(ABC):
1004
1004
  self._counts[nwStats.TITLES] = titleCount
1005
1005
  self._counts[nwStats.PARAGRAPHS] = paragraphCount
1006
1006
 
1007
- self._counts[nwStats.WORDS_ALL] = allWords
1007
+ self._counts[nwStats.WORDS] = allWords
1008
1008
  self._counts[nwStats.WORDS_TEXT] = textWords
1009
1009
  self._counts[nwStats.WORDS_TITLE] = titleWords
1010
1010
 
1011
- self._counts[nwStats.CHARS_ALL] = allChars
1011
+ self._counts[nwStats.CHARS] = allChars
1012
1012
  self._counts[nwStats.CHARS_TEXT] = textChars
1013
1013
  self._counts[nwStats.CHARS_TITLE] = titleChars
1014
1014
 
@@ -6,7 +6,7 @@ File History:
6
6
  Created: 2021-02-06 [1.2b1] ToMarkdown
7
7
 
8
8
  This file is a part of novelWriter
9
- Copyright 2018–2024, Veronica Berglyd Olsen
9
+ Copyright (C) 2021 Veronica Berglyd Olsen and novelWriter contributors
10
10
 
11
11
  This program is free software: you can redistribute it and/or modify
12
12
  it under the terms of the GNU General Public License as published by
@@ -9,7 +9,7 @@ Created: 2021-01-27 [1.2b1] ODTTextStyle
9
9
  Created: 2021-08-14 [1.5b1] XMLParagraph
10
10
 
11
11
  This file is a part of novelWriter
12
- Copyright 2018–2024, Veronica Berglyd Olsen
12
+ Copyright (C) 2021 Veronica Berglyd Olsen and novelWriter contributors
13
13
 
14
14
  This program is free software: you can redistribute it and/or modify
15
15
  it under the terms of the GNU General Public License as published by
@@ -6,7 +6,7 @@ File History:
6
6
  Created: 2024-05-21 [2.5b1] ToQTextDocument
7
7
 
8
8
  This file is a part of novelWriter
9
- Copyright 2018–2024, Veronica Berglyd Olsen
9
+ Copyright (C) 2024 Veronica Berglyd Olsen and novelWriter contributors
10
10
 
11
11
  This program is free software: you can redistribute it and/or modify
12
12
  it under the terms of the GNU General Public License as published by
@@ -6,7 +6,7 @@ File History:
6
6
  Created: 2024-10-15 [2.6b1] ToRaw
7
7
 
8
8
  This file is a part of novelWriter
9
- Copyright 2018–2024, Veronica Berglyd Olsen
9
+ Copyright (C) 2024 Veronica Berglyd Olsen and novelWriter contributors
10
10
 
11
11
  This program is free software: you can redistribute it and/or modify
12
12
  it under the terms of the GNU General Public License as published by
@@ -14,7 +14,7 @@ Created: 2023-11-06 [2.2b1] MetaCompleter
14
14
  Created: 2023-11-07 [2.2b1] GuiDocToolBar
15
15
 
16
16
  This file is a part of novelWriter
17
- Copyright 2018–2024, Veronica Berglyd Olsen
17
+ Copyright (C) 2018 Veronica Berglyd Olsen and novelWriter contributors
18
18
 
19
19
  This program is free software: you can redistribute it and/or modify
20
20
  it under the terms of the GNU General Public License as published by
@@ -1253,7 +1253,9 @@ class GuiDocEditor(QPlainTextEdit):
1253
1253
  self._nwItem.setParaCount(pCount)
1254
1254
  if needsRefresh:
1255
1255
  self._nwItem.notifyToRefresh()
1256
- self.docFooter.updateWordCount(wCount, False)
1256
+ if not self.textCursor().hasSelection():
1257
+ # Selection counter should take precedence (#2155)
1258
+ self.docFooter.updateWordCount(wCount, False)
1257
1259
  return
1258
1260
 
1259
1261
  @pyqtSlot()
@@ -7,7 +7,7 @@ Created: 2019-04-06 [0.0.1] GuiDocHighlighter
7
7
  Created: 2023-09-10 [2.2b1] TextBlockData
8
8
 
9
9
  This file is a part of novelWriter
10
- Copyright 2018–2024, Veronica Berglyd Olsen
10
+ Copyright (C) 2019 Veronica Berglyd Olsen and novelWriter contributors
11
11
 
12
12
  This program is free software: you can redistribute it and/or modify
13
13
  it under the terms of the GNU General Public License as published by
@@ -9,7 +9,7 @@ Created: 2020-06-09 [0.8] GuiDocViewFooter
9
9
  Created: 2020-09-08 [1.0b1] GuiDocViewHistory
10
10
 
11
11
  This file is a part of novelWriter
12
- Copyright 2018–2024, Veronica Berglyd Olsen
12
+ Copyright (C) 2019 Veronica Berglyd Olsen and novelWriter contributors
13
13
 
14
14
  This program is free software: you can redistribute it and/or modify
15
15
  it under the terms of the GNU General Public License as published by
@@ -6,7 +6,7 @@ File History:
6
6
  Created: 2023-11-14 [2.2rc1] GuiDocViewerPanel
7
7
 
8
8
  This file is a part of novelWriter
9
- Copyright 2018–2024, Veronica Berglyd Olsen
9
+ Copyright (C) 2023 Veronica Berglyd Olsen and novelWriter contributors
10
10
 
11
11
  This program is free software: you can redistribute it and/or modify
12
12
  it under the terms of the GNU General Public License as published by
@@ -6,7 +6,7 @@ File History:
6
6
  Created: 2023-09-07 [2.2b1] GuiTextDocument
7
7
 
8
8
  This file is a part of novelWriter
9
- Copyright 2018–2024, Veronica Berglyd Olsen
9
+ Copyright (C) 2023 Veronica Berglyd Olsen and novelWriter contributors
10
10
 
11
11
  This program is free software: you can redistribute it and/or modify
12
12
  it under the terms of the GNU General Public License as published by
@@ -6,7 +6,7 @@ File History:
6
6
  Created: 2019-04-24 [0.0.1] GuiItemDetails
7
7
 
8
8
  This file is a part of novelWriter
9
- Copyright 2018–2024, Veronica Berglyd Olsen
9
+ Copyright (C) 2019 Veronica Berglyd Olsen and novelWriter contributors
10
10
 
11
11
  This program is free software: you can redistribute it and/or modify
12
12
  it under the terms of the GNU General Public License as published by
@@ -65,8 +65,8 @@ class GuiItemDetails(QWidget):
65
65
  fntValue = self.font()
66
66
  fntValue.setPointSizeF(0.9*fPt)
67
67
 
68
- trStats1 = trConst(nwLabels.STATS_NAME[nwStats.CHARS_ALL])
69
- trStats2 = trConst(nwLabels.STATS_NAME[nwStats.WORDS_ALL])
68
+ trStats1 = trConst(nwLabels.STATS_NAME[nwStats.CHARS])
69
+ trStats2 = trConst(nwLabels.STATS_NAME[nwStats.WORDS])
70
70
  trStats3 = trConst(nwLabels.STATS_NAME[nwStats.PARAGRAPHS])
71
71
 
72
72
  # Label
@@ -6,7 +6,7 @@ File History:
6
6
  Created: 2019-04-27 [0.0.1] GuiMainMenu
7
7
 
8
8
  This file is a part of novelWriter
9
- Copyright 2018–2024, Veronica Berglyd Olsen
9
+ Copyright (C) 2018 Veronica Berglyd Olsen and novelWriter contributors
10
10
 
11
11
  This program is free software: you can redistribute it and/or modify
12
12
  it under the terms of the GNU General Public License as published by
@@ -8,7 +8,7 @@ Created: 2022-06-12 [2.0rc1] GuiNovelView
8
8
  Created: 2022-06-12 [2.0rc1] GuiNovelToolBar
9
9
 
10
10
  This file is a part of novelWriter
11
- Copyright 2018–2024, Veronica Berglyd Olsen
11
+ Copyright (C) 2020 Veronica Berglyd Olsen and novelWriter contributors
12
12
 
13
13
  This program is free software: you can redistribute it and/or modify
14
14
  it under the terms of the GNU General Public License as published by
@@ -10,7 +10,7 @@ Created: 2019-11-16 [0.4.1] GuiOutlineHeaderMenu
10
10
  Created: 2020-06-02 [0.7] GuiOutlineDetails
11
11
 
12
12
  This file is a part of novelWriter
13
- Copyright 2018–2024, Veronica Berglyd Olsen
13
+ Copyright (C) 2019 Veronica Berglyd Olsen and novelWriter contributors
14
14
 
15
15
  This program is free software: you can redistribute it and/or modify
16
16
  it under the terms of the GNU General Public License as published by
@@ -41,7 +41,7 @@ from PyQt5.QtWidgets import (
41
41
  )
42
42
 
43
43
  from novelwriter import CONFIG, SHARED
44
- from novelwriter.common import checkInt, formatFileFilter, makeFileNameSafe
44
+ from novelwriter.common import checkInt, formatFileFilter
45
45
  from novelwriter.constants import nwKeyWords, nwLabels, nwStats, nwStyles, trConst
46
46
  from novelwriter.enum import nwChange, nwDocMode, nwItemClass, nwItemLayout, nwItemType, nwOutline
47
47
  from novelwriter.error import logException
@@ -541,11 +541,10 @@ class GuiOutlineTree(QTreeWidget):
541
541
  @pyqtSlot()
542
542
  def exportOutline(self) -> None:
543
543
  """Export the outline as a CSV file."""
544
- path = CONFIG.lastPath("outline") / f"{makeFileNameSafe(SHARED.project.data.name)}.csv"
545
- path, _ = QFileDialog.getSaveFileName(
546
- self, self.tr("Save Outline As"), str(path), formatFileFilter(["*.csv", "*"])
547
- )
548
- if path:
544
+ name = CONFIG.lastPath("outline") / f"{SHARED.project.data.fileSafeName}.csv"
545
+ if path := QFileDialog.getSaveFileName(
546
+ self, self.tr("Save Outline As"), str(name), formatFileFilter(["*.csv", "*"])
547
+ )[0]:
549
548
  CONFIG.setLastPath("outline", path)
550
549
  logger.info("Writing CSV file: %s", path)
551
550
  cols = [col for col in self._treeOrder if not self._colHidden[col]]
@@ -816,8 +815,8 @@ class GuiOutlineDetails(QScrollArea):
816
815
 
817
816
  bFont = SHARED.theme.guiFontB
818
817
 
819
- trStats1 = trConst(nwLabels.STATS_NAME[nwStats.CHARS_ALL])
820
- trStats2 = trConst(nwLabels.STATS_NAME[nwStats.WORDS_ALL])
818
+ trStats1 = trConst(nwLabels.STATS_NAME[nwStats.CHARS])
819
+ trStats2 = trConst(nwLabels.STATS_NAME[nwStats.WORDS])
821
820
  trStats3 = trConst(nwLabels.STATS_NAME[nwStats.PARAGRAPHS])
822
821
 
823
822
  # Details Area
@@ -11,7 +11,7 @@ Rewritten: 2024-11-17 [2.6b2] GuiProjectTree
11
11
  Rewritten: 2024-11-20 [2.6b2] _TreeContextMenu
12
12
 
13
13
  This file is a part of novelWriter
14
- Copyright 2018–2024, Veronica Berglyd Olsen
14
+ Copyright (C) 2018 Veronica Berglyd Olsen and novelWriter contributors
15
15
 
16
16
  This program is free software: you can redistribute it and/or modify
17
17
  it under the terms of the GNU General Public License as published by
@@ -1366,9 +1366,8 @@ class _TreeContextMenu(QMenu):
1366
1366
 
1367
1367
  def _changeItemStatus(self, key: str) -> None:
1368
1368
  """Set a new status value of an item."""
1369
- if self._item.isFileType():
1370
- self._item.setStatus(key)
1371
- self._item.notifyToRefresh()
1369
+ self._item.setStatus(key)
1370
+ self._item.notifyToRefresh()
1372
1371
  return
1373
1372
 
1374
1373
  def _iterSetItemStatus(self, key: str) -> None:
@@ -1383,9 +1382,8 @@ class _TreeContextMenu(QMenu):
1383
1382
 
1384
1383
  def _changeItemImport(self, key: str) -> None:
1385
1384
  """Set a new importance value of an item."""
1386
- if self._item.isFileType():
1387
- self._item.setImport(key)
1388
- self._item.notifyToRefresh()
1385
+ self._item.setImport(key)
1386
+ self._item.notifyToRefresh()
1389
1387
  return
1390
1388
 
1391
1389
  def _iterSetItemImport(self, key: str) -> None:
novelwriter/gui/search.py CHANGED
@@ -6,7 +6,7 @@ File History:
6
6
  Created: 2024-03-21 [2.4b1] GuiProjectSearch
7
7
 
8
8
  This file is a part of novelWriter
9
- Copyright 2018–2024, Veronica Berglyd Olsen
9
+ Copyright (C) 2024 Veronica Berglyd Olsen and novelWriter contributors
10
10
 
11
11
  This program is free software: you can redistribute it and/or modify
12
12
  it under the terms of the GNU General Public License as published by
@@ -133,12 +133,8 @@ class GuiProjectSearch(QWidget):
133
133
  self.headerBox.setContentsMargins(0, 0, 0, 0)
134
134
  self.headerBox.setSpacing(0)
135
135
 
136
- self.headerWidget = QWidget(self)
137
- self.headerWidget.setLayout(self.headerBox)
138
- self.headerWidget.setContentsMargins(0, 0, 0, 0)
139
-
140
136
  self.outerBox = QVBoxLayout()
141
- self.outerBox.addWidget(self.headerWidget, 0)
137
+ self.outerBox.addLayout(self.headerBox, 0)
142
138
  self.outerBox.addWidget(self.searchText, 0)
143
139
  self.outerBox.addWidget(self.searchResult, 1)
144
140
  self.outerBox.setContentsMargins(0, 0, 0, 0)
@@ -164,9 +160,6 @@ class GuiProjectSearch(QWidget):
164
160
  colBase = cssCol(qPalette.base().color())
165
161
  colFocus = cssCol(qPalette.highlight().color())
166
162
 
167
- self.headerWidget.setStyleSheet(f"QWidget {{background: {colBase};}}")
168
- self.headerWidget.setAutoFillBackground(True)
169
-
170
163
  self.setStyleSheet(
171
164
  "QToolBar {padding: 0; background: none;} "
172
165
  f"QLineEdit {{border: {bPx}px solid {colBase}; padding: {mPx}px;}} "
@@ -6,7 +6,7 @@ File History:
6
6
  Created: 2022-05-10 [2.0rc1] GuiSideBar
7
7
 
8
8
  This file is a part of novelWriter
9
- Copyright 2018–2024, Veronica Berglyd Olsen
9
+ Copyright (C) 2022 Veronica Berglyd Olsen and novelWriter contributors
10
10
 
11
11
  This program is free software: you can redistribute it and/or modify
12
12
  it under the terms of the GNU General Public License as published by
@@ -6,7 +6,7 @@ File History:
6
6
  Created: 2019-04-20 [0.0.1] GuiMainStatus
7
7
 
8
8
  This file is a part of novelWriter
9
- Copyright 2018–2024, Veronica Berglyd Olsen
9
+ Copyright (C) 2019 Veronica Berglyd Olsen and novelWriter contributors
10
10
 
11
11
  This program is free software: you can redistribute it and/or modify
12
12
  it under the terms of the GNU General Public License as published by
@@ -35,6 +35,7 @@ from novelwriter import CONFIG, SHARED
35
35
  from novelwriter.common import formatTime
36
36
  from novelwriter.constants import nwConst
37
37
  from novelwriter.enum import nwTrinary
38
+ from novelwriter.extensions.modified import NClickableLabel
38
39
  from novelwriter.extensions.statusled import StatusLED
39
40
 
40
41
  logger = logging.getLogger(__name__)
@@ -92,12 +93,16 @@ class GuiMainStatus(QStatusBar):
92
93
 
93
94
  # The Session Clock
94
95
  # Set the minimum width so the label doesn't rescale every second
95
- self.timeIcon = QLabel(self)
96
- self.timeText = QLabel("", self)
96
+ self.timeIcon = NClickableLabel(self)
97
+ self.timeIcon.mouseClicked.connect(self._onClickTimerLabel)
98
+
99
+ self.timeText = NClickableLabel("", self)
97
100
  self.timeText.setToolTip(self.tr("Session Time"))
98
101
  self.timeText.setMinimumWidth(SHARED.theme.getTextWidth("00:00:00:"))
99
102
  self.timeIcon.setContentsMargins(0, 0, 0, 0)
100
103
  self.timeText.setContentsMargins(0, 0, 0, 0)
104
+ self.timeText.setVisible(CONFIG.showSessionTime)
105
+ self.timeText.mouseClicked.connect(self._onClickTimerLabel)
101
106
  self.addPermanentWidget(self.timeIcon)
102
107
  self.addPermanentWidget(self.timeText)
103
108
 
@@ -224,6 +229,18 @@ class GuiMainStatus(QStatusBar):
224
229
  self.setDocumentStatus(nwTrinary.NEGATIVE if status else nwTrinary.POSITIVE)
225
230
  return
226
231
 
232
+ ##
233
+ # Private Slots
234
+ ##
235
+
236
+ @pyqtSlot()
237
+ def _onClickTimerLabel(self) -> None:
238
+ """Process mouse click on timer label."""
239
+ state = not CONFIG.showSessionTime
240
+ self.timeText.setVisible(state)
241
+ CONFIG.showSessionTime = state
242
+ return
243
+
227
244
  ##
228
245
  # Debug
229
246
  ##
novelwriter/gui/theme.py CHANGED
@@ -7,7 +7,7 @@ Created: 2019-05-18 [0.1.3] GuiTheme
7
7
  Created: 2019-11-08 [0.4] GuiIcons
8
8
 
9
9
  This file is a part of novelWriter
10
- Copyright 2018–2024, Veronica Berglyd Olsen
10
+ Copyright (C) 2019 Veronica Berglyd Olsen and novelWriter contributors
11
11
 
12
12
  This program is free software: you can redistribute it and/or modify
13
13
  it under the terms of the GNU General Public License as published by
novelwriter/guimain.py CHANGED
@@ -6,7 +6,7 @@ File History:
6
6
  Created: 2018-09-22 [0.0.1] GuiMain
7
7
 
8
8
  This file is a part of novelWriter
9
- Copyright 2018–2024, Veronica Berglyd Olsen
9
+ Copyright (C) 2018 Veronica Berglyd Olsen and novelWriter contributors
10
10
 
11
11
  This program is free software: you can redistribute it and/or modify
12
12
  it under the terms of the GNU General Public License as published by
@@ -957,12 +957,8 @@ class GuiMain(QMainWindow):
957
957
  docEditor = True
958
958
  elif self.docViewer.isAncestorOf(new):
959
959
  docViewer = True
960
-
961
960
  self.docEditor.changeFocusState(docEditor)
962
961
  self.docViewer.changeFocusState(docViewer)
963
-
964
- logger.debug("Main focus switched to: %s", type(new).__name__)
965
-
966
962
  return
967
963
 
968
964
  @pyqtSlot(bool)
novelwriter/shared.py CHANGED
@@ -7,7 +7,7 @@ Created: 2023-08-10 [2.1rc1] SharedData
7
7
  Created: 2023-08-14 [2.1rc1] _GuiAlert
8
8
 
9
9
  This file is a part of novelWriter
10
- Copyright 2018–2024, Veronica Berglyd Olsen
10
+ Copyright (C) 2023 Veronica Berglyd Olsen and novelWriter contributors
11
11
 
12
12
  This program is free software: you can redistribute it and/or modify
13
13
  it under the terms of the GNU General Public License as published by
@@ -8,7 +8,7 @@ Rewritten: 2024-02-27 [2.4b1] preProcessText, standardCounter
8
8
  Created: 2024-02-27 [2.4b1] bodyTextCounter
9
9
 
10
10
  This file is a part of novelWriter
11
- Copyright 2018–2024, Veronica Berglyd Olsen
11
+ Copyright (C) 2024 Veronica Berglyd Olsen and novelWriter contributors
12
12
 
13
13
  This program is free software: you can redistribute it and/or modify
14
14
  it under the terms of the GNU General Public License as published by