novelWriter 2.4.2__py3-none-any.whl → 2.5b1__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 (109) hide show
  1. {novelWriter-2.4.2.dist-info → novelWriter-2.5b1.dist-info}/METADATA +4 -5
  2. {novelWriter-2.4.2.dist-info → novelWriter-2.5b1.dist-info}/RECORD +109 -101
  3. novelwriter/__init__.py +33 -39
  4. novelwriter/assets/i18n/project_en_GB.json +1 -0
  5. novelwriter/assets/icons/typicons_dark/icons.conf +2 -0
  6. novelwriter/assets/icons/typicons_dark/nw_font.svg +4 -0
  7. novelwriter/assets/icons/typicons_dark/nw_quote.svg +4 -0
  8. novelwriter/assets/icons/typicons_light/icons.conf +2 -0
  9. novelwriter/assets/icons/typicons_light/nw_font.svg +4 -0
  10. novelwriter/assets/icons/typicons_light/nw_quote.svg +4 -0
  11. novelwriter/assets/manual.pdf +0 -0
  12. novelwriter/assets/sample.zip +0 -0
  13. novelwriter/assets/syntax/cyberpunk_night.conf +5 -3
  14. novelwriter/assets/syntax/default_dark.conf +32 -18
  15. novelwriter/assets/syntax/default_light.conf +24 -10
  16. novelwriter/assets/syntax/dracula.conf +44 -0
  17. novelwriter/assets/syntax/grey_dark.conf +5 -4
  18. novelwriter/assets/syntax/grey_light.conf +5 -4
  19. novelwriter/assets/syntax/light_owl.conf +7 -6
  20. novelwriter/assets/syntax/night_owl.conf +7 -6
  21. novelwriter/assets/syntax/snazzy.conf +42 -0
  22. novelwriter/assets/syntax/solarized_dark.conf +4 -3
  23. novelwriter/assets/syntax/solarized_light.conf +4 -3
  24. novelwriter/assets/syntax/tango.conf +27 -11
  25. novelwriter/assets/syntax/tomorrow.conf +6 -5
  26. novelwriter/assets/syntax/tomorrow_night.conf +7 -6
  27. novelwriter/assets/syntax/tomorrow_night_blue.conf +6 -5
  28. novelwriter/assets/syntax/tomorrow_night_bright.conf +6 -5
  29. novelwriter/assets/syntax/tomorrow_night_eighties.conf +6 -5
  30. novelwriter/assets/text/credits_en.htm +4 -1
  31. novelwriter/assets/themes/cyberpunk_night.conf +2 -0
  32. novelwriter/assets/themes/default_dark.conf +1 -0
  33. novelwriter/assets/themes/default_light.conf +1 -0
  34. novelwriter/assets/themes/dracula.conf +47 -0
  35. novelwriter/assets/themes/solarized_dark.conf +1 -0
  36. novelwriter/assets/themes/solarized_light.conf +1 -0
  37. novelwriter/common.py +31 -9
  38. novelwriter/config.py +118 -84
  39. novelwriter/constants.py +40 -26
  40. novelwriter/core/buildsettings.py +63 -66
  41. novelwriter/core/coretools.py +2 -22
  42. novelwriter/core/docbuild.py +51 -40
  43. novelwriter/core/document.py +3 -5
  44. novelwriter/core/index.py +115 -45
  45. novelwriter/core/item.py +8 -19
  46. novelwriter/core/options.py +2 -4
  47. novelwriter/core/project.py +23 -57
  48. novelwriter/core/projectdata.py +1 -3
  49. novelwriter/core/projectxml.py +12 -15
  50. novelwriter/core/sessions.py +3 -5
  51. novelwriter/core/spellcheck.py +4 -9
  52. novelwriter/core/status.py +211 -164
  53. novelwriter/core/storage.py +0 -8
  54. novelwriter/core/tohtml.py +94 -100
  55. novelwriter/core/tokenizer.py +199 -112
  56. novelwriter/core/{tomd.py → tomarkdown.py} +97 -78
  57. novelwriter/core/toodt.py +212 -148
  58. novelwriter/core/toqdoc.py +403 -0
  59. novelwriter/core/tree.py +5 -7
  60. novelwriter/dialogs/about.py +3 -5
  61. novelwriter/dialogs/docmerge.py +1 -3
  62. novelwriter/dialogs/docsplit.py +1 -3
  63. novelwriter/dialogs/editlabel.py +0 -2
  64. novelwriter/dialogs/preferences.py +111 -88
  65. novelwriter/dialogs/projectsettings.py +216 -180
  66. novelwriter/dialogs/quotes.py +3 -4
  67. novelwriter/dialogs/wordlist.py +3 -9
  68. novelwriter/enum.py +31 -25
  69. novelwriter/error.py +8 -15
  70. novelwriter/extensions/circularprogress.py +5 -6
  71. novelwriter/extensions/configlayout.py +18 -18
  72. novelwriter/extensions/eventfilters.py +1 -5
  73. novelwriter/extensions/modified.py +50 -13
  74. novelwriter/extensions/novelselector.py +1 -3
  75. novelwriter/extensions/pagedsidebar.py +9 -12
  76. novelwriter/extensions/simpleprogress.py +1 -3
  77. novelwriter/extensions/statusled.py +1 -3
  78. novelwriter/extensions/switch.py +4 -6
  79. novelwriter/extensions/switchbox.py +7 -6
  80. novelwriter/extensions/versioninfo.py +3 -9
  81. novelwriter/gui/doceditor.py +132 -133
  82. novelwriter/gui/dochighlight.py +237 -183
  83. novelwriter/gui/docviewer.py +61 -97
  84. novelwriter/gui/docviewerpanel.py +3 -10
  85. novelwriter/gui/editordocument.py +1 -3
  86. novelwriter/gui/itemdetails.py +7 -11
  87. novelwriter/gui/mainmenu.py +11 -7
  88. novelwriter/gui/noveltree.py +11 -24
  89. novelwriter/gui/outline.py +11 -23
  90. novelwriter/gui/projtree.py +26 -43
  91. novelwriter/gui/search.py +1 -3
  92. novelwriter/gui/sidebar.py +2 -6
  93. novelwriter/gui/statusbar.py +6 -10
  94. novelwriter/gui/theme.py +26 -51
  95. novelwriter/guimain.py +50 -71
  96. novelwriter/shared.py +30 -15
  97. novelwriter/tools/dictionaries.py +12 -15
  98. novelwriter/tools/lipsum.py +2 -4
  99. novelwriter/tools/manusbuild.py +1 -3
  100. novelwriter/tools/manuscript.py +71 -144
  101. novelwriter/tools/manussettings.py +67 -73
  102. novelwriter/tools/noveldetails.py +6 -11
  103. novelwriter/tools/welcome.py +2 -16
  104. novelwriter/tools/writingstats.py +6 -9
  105. novelwriter/types.py +45 -3
  106. {novelWriter-2.4.2.dist-info → novelWriter-2.5b1.dist-info}/LICENSE.md +0 -0
  107. {novelWriter-2.4.2.dist-info → novelWriter-2.5b1.dist-info}/WHEEL +0 -0
  108. {novelWriter-2.4.2.dist-info → novelWriter-2.5b1.dist-info}/entry_points.txt +0 -0
  109. {novelWriter-2.4.2.dist-info → novelWriter-2.5b1.dist-info}/top_level.txt +0 -0
@@ -27,14 +27,14 @@ from __future__ import annotations
27
27
  import logging
28
28
 
29
29
  from PyQt5.QtCore import Qt, pyqtSignal, pyqtSlot
30
- from PyQt5.QtGui import QCloseEvent, QFont, QKeyEvent, QKeySequence
30
+ from PyQt5.QtGui import QCloseEvent, QKeyEvent, QKeySequence
31
31
  from PyQt5.QtWidgets import (
32
32
  QAbstractButton, QApplication, QCompleter, QDialog, QDialogButtonBox,
33
- QFileDialog, QFontDialog, QHBoxLayout, QLineEdit, QPushButton, QVBoxLayout,
34
- QWidget
33
+ QFileDialog, QHBoxLayout, QLineEdit, QPushButton, QVBoxLayout, QWidget
35
34
  )
36
35
 
37
36
  from novelwriter import CONFIG, SHARED
37
+ from novelwriter.common import describeFont
38
38
  from novelwriter.constants import nwConst, nwUnicode
39
39
  from novelwriter.dialogs.quotes import GuiQuoteSelect
40
40
  from novelwriter.extensions.configlayout import NColourLabel, NScrollableForm
@@ -133,7 +133,13 @@ class GuiPreferences(QDialog):
133
133
  """Build the settings form."""
134
134
  section = 0
135
135
  iSz = SHARED.theme.baseIconSize
136
+ boxFixed = 5*SHARED.theme.textNWidth
136
137
  minWidth = CONFIG.pxInt(200)
138
+ fontWidth = CONFIG.pxInt(162)
139
+
140
+ # Temporary Variables
141
+ self._guiFont = CONFIG.guiFont
142
+ self._textFont = CONFIG.textFont
137
143
 
138
144
  # Label
139
145
  self.sidebar.addLabel(self.tr("General"))
@@ -173,27 +179,17 @@ class GuiPreferences(QDialog):
173
179
  # Application Font Family
174
180
  self.guiFont = QLineEdit(self)
175
181
  self.guiFont.setReadOnly(True)
176
- self.guiFont.setMinimumWidth(CONFIG.pxInt(162))
177
- self.guiFont.setText(CONFIG.guiFont)
178
- self.guiFontButton = NIconToolButton(self, iSz, "more")
182
+ self.guiFont.setMinimumWidth(fontWidth)
183
+ self.guiFont.setText(describeFont(self._guiFont))
184
+ self.guiFont.setCursorPosition(0)
185
+ self.guiFontButton = NIconToolButton(self, iSz, "font")
179
186
  self.guiFontButton.clicked.connect(self._selectGuiFont)
180
187
  self.mainForm.addRow(
181
- self.tr("Application font family"), self.guiFont,
188
+ self.tr("Application font"), self.guiFont,
182
189
  self.tr("Requires restart to take effect."), stretch=(3, 2),
183
190
  button=self.guiFontButton
184
191
  )
185
192
 
186
- # Application Font Size
187
- self.guiFontSize = NSpinBox(self)
188
- self.guiFontSize.setMinimum(8)
189
- self.guiFontSize.setMaximum(60)
190
- self.guiFontSize.setSingleStep(1)
191
- self.guiFontSize.setValue(CONFIG.guiFontSize)
192
- self.mainForm.addRow(
193
- self.tr("Application font size"), self.guiFontSize,
194
- self.tr("Requires restart to take effect."), unit=self.tr("pt")
195
- )
196
-
197
193
  # Vertical Scrollbars
198
194
  self.hideVScroll = NSwitch(self)
199
195
  self.hideVScroll.setChecked(CONFIG.hideVScroll)
@@ -210,6 +206,14 @@ class GuiPreferences(QDialog):
210
206
  self.tr("Scrolling available with mouse wheel and keys only.")
211
207
  )
212
208
 
209
+ # Native Font Dialog
210
+ self.nativeFont = NSwitch(self)
211
+ self.nativeFont.setChecked(CONFIG.nativeFont)
212
+ self.mainForm.addRow(
213
+ self.tr("Use the system's font selection dialog"), self.nativeFont,
214
+ self.tr("Turn off to use the Qt font dialog, which may have more options.")
215
+ )
216
+
213
217
  # Document Style
214
218
  # ==============
215
219
 
@@ -233,27 +237,17 @@ class GuiPreferences(QDialog):
233
237
  # Document Font Family
234
238
  self.textFont = QLineEdit(self)
235
239
  self.textFont.setReadOnly(True)
236
- self.textFont.setMinimumWidth(CONFIG.pxInt(162))
237
- self.textFont.setText(CONFIG.textFont)
238
- self.textFontButton = NIconToolButton(self, iSz, "more")
240
+ self.textFont.setMinimumWidth(fontWidth)
241
+ self.textFont.setText(describeFont(CONFIG.textFont))
242
+ self.textFont.setCursorPosition(0)
243
+ self.textFontButton = NIconToolButton(self, iSz, "font")
239
244
  self.textFontButton.clicked.connect(self._selectTextFont)
240
245
  self.mainForm.addRow(
241
- self.tr("Document font family"), self.textFont,
246
+ self.tr("Document font"), self.textFont,
242
247
  self.tr("Applies to both document editor and viewer."), stretch=(3, 2),
243
248
  button=self.textFontButton
244
249
  )
245
250
 
246
- # Document Font Size
247
- self.textSize = NSpinBox(self)
248
- self.textSize.setMinimum(8)
249
- self.textSize.setMaximum(60)
250
- self.textSize.setSingleStep(1)
251
- self.textSize.setValue(CONFIG.textSize)
252
- self.mainForm.addRow(
253
- self.tr("Document font size"), self.textSize,
254
- self.tr("Applies to both document editor and viewer."), unit=self.tr("pt")
255
- )
256
-
257
251
  # Emphasise Labels
258
252
  self.emphLabels = NSwitch(self)
259
253
  self.emphLabels.setChecked(CONFIG.emphLabels)
@@ -538,26 +532,59 @@ class GuiPreferences(QDialog):
538
532
  self.sidebar.addButton(title, section)
539
533
  self.mainForm.addGroupLabel(title, section)
540
534
 
541
- self.highlightQuotes = NSwitch(self)
542
- self.highlightQuotes.setChecked(CONFIG.highlightQuotes)
543
- self.highlightQuotes.toggled.connect(self._toggleHighlightQuotes)
535
+ self.dialogStyle = NComboBox(self)
536
+ self.dialogStyle.addItem(self.tr("None"), 0)
537
+ self.dialogStyle.addItem(self.tr("Single Quotes"), 1)
538
+ self.dialogStyle.addItem(self.tr("Double Quotes"), 2)
539
+ self.dialogStyle.addItem(self.tr("Both"), 3)
540
+ self.dialogStyle.setCurrentData(CONFIG.dialogStyle, 2)
544
541
  self.mainForm.addRow(
545
- self.tr("Highlight text wrapped in quotes"), self.highlightQuotes,
546
- self.tr("Applies to the document editor only.")
542
+ self.tr("Highlight dialogue"), self.dialogStyle,
543
+ self.tr("Applies to the selected quote styles.")
547
544
  )
548
545
 
549
- self.allowOpenSQuote = NSwitch(self)
550
- self.allowOpenSQuote.setChecked(CONFIG.allowOpenSQuote)
546
+ self.allowOpenDial = NSwitch(self)
547
+ self.allowOpenDial.setChecked(CONFIG.allowOpenDial)
551
548
  self.mainForm.addRow(
552
- self.tr("Allow open-ended single quotes"), self.allowOpenSQuote,
553
- self.tr("Highlight single-quoted line with no closing quote.")
549
+ self.tr("Allow open-ended sialogue"), self.allowOpenDial,
550
+ self.tr("Highlight dialogue line with no closing quote.")
554
551
  )
555
552
 
556
- self.allowOpenDQuote = NSwitch(self)
557
- self.allowOpenDQuote.setChecked(CONFIG.allowOpenDQuote)
553
+ self.narratorBreak = QLineEdit(self)
554
+ self.narratorBreak.setMaxLength(1)
555
+ self.narratorBreak.setFixedWidth(boxFixed)
556
+ self.narratorBreak.setAlignment(QtAlignCenter)
557
+ self.narratorBreak.setText(CONFIG.narratorBreak)
558
558
  self.mainForm.addRow(
559
- self.tr("Allow open-ended double quotes"), self.allowOpenDQuote,
560
- self.tr("Highlight double-quoted line with no closing quote.")
559
+ self.tr("Dialogue narrator break symbol"), self.narratorBreak,
560
+ self.tr("Symbol to indicate injected narrator break.")
561
+ )
562
+
563
+ self.dialogLine = QLineEdit(self)
564
+ self.dialogLine.setMaxLength(1)
565
+ self.dialogLine.setFixedWidth(boxFixed)
566
+ self.dialogLine.setAlignment(QtAlignCenter)
567
+ self.dialogLine.setText(CONFIG.dialogLine)
568
+ self.mainForm.addRow(
569
+ self.tr("Dialogue line symbol"), self.dialogLine,
570
+ self.tr("Lines starting with this symbol are dialogue.")
571
+ )
572
+
573
+ self.altDialogOpen = QLineEdit(self)
574
+ self.altDialogOpen.setMaxLength(4)
575
+ self.altDialogOpen.setFixedWidth(boxFixed)
576
+ self.altDialogOpen.setAlignment(QtAlignCenter)
577
+ self.altDialogOpen.setText(CONFIG.altDialogOpen)
578
+
579
+ self.altDialogClose = QLineEdit(self)
580
+ self.altDialogClose.setMaxLength(4)
581
+ self.altDialogClose.setFixedWidth(boxFixed)
582
+ self.altDialogClose.setAlignment(QtAlignCenter)
583
+ self.altDialogClose.setText(CONFIG.altDialogClose)
584
+
585
+ self.mainForm.addRow(
586
+ self.tr("Alternative dialog symbols"), [self.altDialogOpen, self.altDialogClose],
587
+ self.tr("Custom highlighting of dialog text.")
561
588
  )
562
589
 
563
590
  self.highlightEmph = NSwitch(self)
@@ -667,16 +694,15 @@ class GuiPreferences(QDialog):
667
694
  self.mainForm.addGroupLabel(title, section)
668
695
 
669
696
  self.quoteSym = {}
670
- qWidth = CONFIG.pxInt(40)
671
697
 
672
698
  # Single Quote Style
673
699
  self.quoteSym["SO"] = QLineEdit(self)
674
700
  self.quoteSym["SO"].setMaxLength(1)
675
701
  self.quoteSym["SO"].setReadOnly(True)
676
- self.quoteSym["SO"].setFixedWidth(qWidth)
702
+ self.quoteSym["SO"].setFixedWidth(boxFixed)
677
703
  self.quoteSym["SO"].setAlignment(QtAlignCenter)
678
704
  self.quoteSym["SO"].setText(CONFIG.fmtSQuoteOpen)
679
- self.btnSingleStyleO = NIconToolButton(self, iSz, "more")
705
+ self.btnSingleStyleO = NIconToolButton(self, iSz, "quote")
680
706
  self.btnSingleStyleO.clicked.connect(lambda: self._getQuote("SO"))
681
707
  self.mainForm.addRow(
682
708
  self.tr("Single quote open style"), self.quoteSym["SO"],
@@ -687,10 +713,10 @@ class GuiPreferences(QDialog):
687
713
  self.quoteSym["SC"] = QLineEdit(self)
688
714
  self.quoteSym["SC"].setMaxLength(1)
689
715
  self.quoteSym["SC"].setReadOnly(True)
690
- self.quoteSym["SC"].setFixedWidth(qWidth)
716
+ self.quoteSym["SC"].setFixedWidth(boxFixed)
691
717
  self.quoteSym["SC"].setAlignment(QtAlignCenter)
692
718
  self.quoteSym["SC"].setText(CONFIG.fmtSQuoteClose)
693
- self.btnSingleStyleC = NIconToolButton(self, iSz, "more")
719
+ self.btnSingleStyleC = NIconToolButton(self, iSz, "quote")
694
720
  self.btnSingleStyleC.clicked.connect(lambda: self._getQuote("SC"))
695
721
  self.mainForm.addRow(
696
722
  self.tr("Single quote close style"), self.quoteSym["SC"],
@@ -702,10 +728,10 @@ class GuiPreferences(QDialog):
702
728
  self.quoteSym["DO"] = QLineEdit(self)
703
729
  self.quoteSym["DO"].setMaxLength(1)
704
730
  self.quoteSym["DO"].setReadOnly(True)
705
- self.quoteSym["DO"].setFixedWidth(qWidth)
731
+ self.quoteSym["DO"].setFixedWidth(boxFixed)
706
732
  self.quoteSym["DO"].setAlignment(QtAlignCenter)
707
733
  self.quoteSym["DO"].setText(CONFIG.fmtDQuoteOpen)
708
- self.btnDoubleStyleO = NIconToolButton(self, iSz, "more")
734
+ self.btnDoubleStyleO = NIconToolButton(self, iSz, "quote")
709
735
  self.btnDoubleStyleO.clicked.connect(lambda: self._getQuote("DO"))
710
736
  self.mainForm.addRow(
711
737
  self.tr("Double quote open style"), self.quoteSym["DO"],
@@ -716,10 +742,10 @@ class GuiPreferences(QDialog):
716
742
  self.quoteSym["DC"] = QLineEdit(self)
717
743
  self.quoteSym["DC"].setMaxLength(1)
718
744
  self.quoteSym["DC"].setReadOnly(True)
719
- self.quoteSym["DC"].setFixedWidth(qWidth)
745
+ self.quoteSym["DC"].setFixedWidth(boxFixed)
720
746
  self.quoteSym["DC"].setAlignment(QtAlignCenter)
721
747
  self.quoteSym["DC"].setText(CONFIG.fmtDQuoteClose)
722
- self.btnDoubleStyleC = NIconToolButton(self, iSz, "more")
748
+ self.btnDoubleStyleC = NIconToolButton(self, iSz, "quote")
723
749
  self.btnDoubleStyleC.clicked.connect(lambda: self._getQuote("DC"))
724
750
  self.mainForm.addRow(
725
751
  self.tr("Double quote close style"), self.quoteSym["DC"],
@@ -785,25 +811,21 @@ class GuiPreferences(QDialog):
785
811
  @pyqtSlot()
786
812
  def _selectGuiFont(self) -> None:
787
813
  """Open the QFontDialog and set a font for the font style."""
788
- current = QFont()
789
- current.setFamily(CONFIG.guiFont)
790
- current.setPointSize(CONFIG.guiFontSize)
791
- font, status = QFontDialog.getFont(current, self)
814
+ font, status = SHARED.getFont(self._guiFont, self.nativeFont.isChecked())
792
815
  if status:
793
- self.guiFont.setText(font.family())
794
- self.guiFontSize.setValue(font.pointSize())
816
+ self.guiFont.setText(describeFont(font))
817
+ self.guiFont.setCursorPosition(0)
818
+ self._guiFont = font
795
819
  return
796
820
 
797
821
  @pyqtSlot()
798
822
  def _selectTextFont(self) -> None:
799
823
  """Open the QFontDialog and set a font for the font style."""
800
- current = QFont()
801
- current.setFamily(CONFIG.textFont)
802
- current.setPointSize(CONFIG.textSize)
803
- font, status = QFontDialog.getFont(current, self)
824
+ font, status = SHARED.getFont(self._textFont, self.nativeFont.isChecked())
804
825
  if status:
805
- self.textFont.setText(font.family())
806
- self.textSize.setValue(font.pointSize())
826
+ self.textFont.setText(describeFont(font))
827
+ self.textFont.setCursorPosition(0)
828
+ self._textFont = font
807
829
  return
808
830
 
809
831
  @pyqtSlot()
@@ -823,13 +845,6 @@ class GuiPreferences(QDialog):
823
845
  self.askBeforeBackup.setEnabled(state)
824
846
  return
825
847
 
826
- @pyqtSlot(bool)
827
- def _toggleHighlightQuotes(self, state: bool) -> None:
828
- """Toggle switches controlled by the highlight quotes switch."""
829
- self.allowOpenSQuote.setEnabled(state)
830
- self.allowOpenDQuote.setEnabled(state)
831
- return
832
-
833
848
  @pyqtSlot(bool)
834
849
  def _toggleAutoReplaceMain(self, state: bool) -> None:
835
850
  """Toggle switches controlled by the auto replace switch."""
@@ -866,20 +881,17 @@ class GuiPreferences(QDialog):
866
881
  # Appearance
867
882
  guiLocale = self.guiLocale.currentData()
868
883
  guiTheme = self.guiTheme.currentData()
869
- guiFont = self.guiFont.text()
870
- guiFontSize = self.guiFontSize.value()
871
884
 
872
885
  updateTheme |= CONFIG.guiTheme != guiTheme
873
886
  needsRestart |= CONFIG.guiLocale != guiLocale
874
- needsRestart |= CONFIG.guiFont != guiFont
875
- needsRestart |= CONFIG.guiFontSize != guiFontSize
887
+ needsRestart |= CONFIG.guiFont != self._guiFont
876
888
 
877
889
  CONFIG.guiLocale = guiLocale
878
890
  CONFIG.guiTheme = guiTheme
879
- CONFIG.guiFont = guiFont
880
- CONFIG.guiFontSize = guiFontSize
881
891
  CONFIG.hideVScroll = self.hideVScroll.isChecked()
882
892
  CONFIG.hideHScroll = self.hideHScroll.isChecked()
893
+ CONFIG.nativeFont = self.nativeFont.isChecked()
894
+ CONFIG.setGuiFont(self._guiFont)
883
895
 
884
896
  # Document Style
885
897
  guiSyntax = self.guiSyntax.currentData()
@@ -892,7 +904,7 @@ class GuiPreferences(QDialog):
892
904
  CONFIG.emphLabels = emphLabels
893
905
  CONFIG.showFullPath = self.showFullPath.isChecked()
894
906
  CONFIG.incNotesWCount = self.incNotesWCount.isChecked()
895
- CONFIG.setTextFont(self.textFont.text(), self.textSize.value())
907
+ CONFIG.setTextFont(self._textFont)
896
908
 
897
909
  # Auto Save
898
910
  CONFIG.autoSaveDoc = self.autoSaveDoc.value()
@@ -927,19 +939,32 @@ class GuiPreferences(QDialog):
927
939
  CONFIG.scrollPastEnd = self.scrollPastEnd.isChecked()
928
940
 
929
941
  # Text Highlighting
930
- highlightQuotes = self.highlightQuotes.isChecked()
942
+ dialogueStyle = self.dialogStyle.currentData()
943
+ allowOpenDial = self.allowOpenDial.isChecked()
944
+ narratorBreak = self.narratorBreak.text()
945
+ dialogueLine = self.dialogLine.text()
946
+ altDialogOpen = self.altDialogOpen.text()
947
+ altDialogClose = self.altDialogClose.text()
931
948
  highlightEmph = self.highlightEmph.isChecked()
932
949
  showMultiSpaces = self.showMultiSpaces.isChecked()
933
950
 
934
- updateSyntax |= CONFIG.highlightQuotes != highlightQuotes
951
+ updateSyntax |= CONFIG.dialogStyle != dialogueStyle
952
+ updateSyntax |= CONFIG.allowOpenDial != allowOpenDial
953
+ updateSyntax |= CONFIG.narratorBreak != narratorBreak
954
+ updateSyntax |= CONFIG.dialogLine != dialogueLine
955
+ updateSyntax |= CONFIG.altDialogOpen != altDialogOpen
956
+ updateSyntax |= CONFIG.altDialogClose != altDialogClose
935
957
  updateSyntax |= CONFIG.highlightEmph != highlightEmph
936
958
  updateSyntax |= CONFIG.showMultiSpaces != showMultiSpaces
937
959
 
938
- CONFIG.highlightQuotes = highlightQuotes
960
+ CONFIG.dialogStyle = dialogueStyle
961
+ CONFIG.allowOpenDial = allowOpenDial
962
+ CONFIG.narratorBreak = narratorBreak
963
+ CONFIG.dialogLine = dialogueLine
964
+ CONFIG.altDialogOpen = altDialogOpen
965
+ CONFIG.altDialogClose = altDialogClose
939
966
  CONFIG.highlightEmph = highlightEmph
940
967
  CONFIG.showMultiSpaces = showMultiSpaces
941
- CONFIG.allowOpenSQuote = self.allowOpenSQuote.isChecked()
942
- CONFIG.allowOpenDQuote = self.allowOpenDQuote.isChecked()
943
968
 
944
969
  # Text Automation
945
970
  CONFIG.doReplace = self.doReplace.isChecked()
@@ -962,5 +987,3 @@ class GuiPreferences(QDialog):
962
987
  self.newPreferencesReady.emit(needsRestart, refreshTree, updateTheme, updateSyntax)
963
988
 
964
989
  return
965
-
966
- # END Class GuiPreferences