novelWriter 2.7.4__py3-none-any.whl → 2.8b1__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.
- novelwriter/__init__.py +8 -7
 - novelwriter/assets/icons/font_awesome.icons +22 -4
 - novelwriter/assets/icons/material_filled_normal.icons +20 -2
 - novelwriter/assets/icons/material_filled_thin.icons +20 -2
 - novelwriter/assets/icons/material_rounded_normal.icons +20 -2
 - novelwriter/assets/icons/material_rounded_thin.icons +20 -2
 - novelwriter/assets/icons/material_sharp_normal.icons +20 -2
 - novelwriter/assets/icons/material_sharp_thin.icons +20 -2
 - novelwriter/assets/icons/remix_filled.icons +20 -2
 - novelwriter/assets/icons/remix_outline.icons +20 -2
 - novelwriter/assets/images/welcome.webp +0 -0
 - novelwriter/assets/manual.pdf +0 -0
 - novelwriter/assets/manual_fr.pdf +0 -0
 - novelwriter/assets/sample.zip +0 -0
 - novelwriter/assets/text/credits_en.htm +61 -11
 - novelwriter/assets/themes/aura.conf +97 -0
 - novelwriter/assets/themes/aura_bright.conf +95 -0
 - novelwriter/assets/themes/aura_soft.conf +97 -0
 - novelwriter/assets/themes/b2t_garden_dark.conf +97 -0
 - novelwriter/assets/themes/b2t_garden_light.conf +97 -0
 - novelwriter/assets/themes/b2t_suburb_dark.conf +97 -0
 - novelwriter/assets/themes/b2t_suburb_light.conf +97 -0
 - novelwriter/assets/themes/b4t_classic_o_dark.conf +97 -0
 - novelwriter/assets/themes/b4t_classic_o_light.conf +97 -0
 - novelwriter/assets/themes/b4t_modern_c_dark.conf +97 -0
 - novelwriter/assets/themes/b4t_modern_c_light.conf +97 -0
 - novelwriter/assets/themes/blue_streak_dark.conf +97 -0
 - novelwriter/assets/themes/blue_streak_light.conf +97 -0
 - novelwriter/assets/themes/castle_day.conf +95 -0
 - novelwriter/assets/themes/castle_night.conf +95 -0
 - novelwriter/assets/themes/catppuccin_latte.conf +97 -0
 - novelwriter/assets/themes/catppuccin_mocha.conf +97 -0
 - novelwriter/assets/themes/chalky_soil.conf +95 -0
 - novelwriter/assets/themes/chernozem.conf +95 -0
 - novelwriter/assets/themes/cyberpunk_night.conf +88 -40
 - novelwriter/assets/themes/default_dark.conf +89 -41
 - novelwriter/assets/themes/default_light.conf +89 -41
 - novelwriter/assets/themes/dracula.conf +91 -42
 - novelwriter/assets/themes/espresso.conf +97 -0
 - novelwriter/assets/themes/everforest_dark.conf +97 -0
 - novelwriter/assets/themes/everforest_light.conf +97 -0
 - novelwriter/assets/themes/floral_daydream.conf +95 -0
 - novelwriter/assets/themes/floral_midnight.conf +95 -0
 - novelwriter/assets/themes/full_moon.conf +95 -0
 - novelwriter/assets/themes/grey_dark.conf +97 -0
 - novelwriter/assets/themes/grey_light.conf +97 -0
 - novelwriter/assets/themes/horizon_dark.conf +97 -0
 - novelwriter/assets/themes/horizon_light.conf +97 -0
 - novelwriter/assets/themes/jewel_case_dark.conf +95 -0
 - novelwriter/assets/themes/jewel_case_light.conf +95 -0
 - novelwriter/assets/themes/lcars.conf +97 -0
 - novelwriter/assets/themes/light_owl.conf +117 -0
 - novelwriter/assets/themes/new_moon.conf +97 -0
 - novelwriter/assets/themes/night_owl.conf +117 -0
 - novelwriter/assets/themes/noctis.conf +129 -0
 - novelwriter/assets/themes/noctis_lux.conf +129 -0
 - novelwriter/assets/themes/nord.conf +97 -0
 - novelwriter/assets/themes/nordlicht.conf +95 -0
 - novelwriter/assets/themes/otium_dark.conf +95 -0
 - novelwriter/assets/themes/otium_light.conf +95 -0
 - novelwriter/assets/themes/paragon.conf +96 -0
 - novelwriter/assets/themes/primer_light.conf +97 -0
 - novelwriter/assets/themes/primer_night.conf +97 -0
 - novelwriter/assets/themes/rose_pine.conf +97 -0
 - novelwriter/assets/themes/rose_pine_dawn.conf +97 -0
 - novelwriter/assets/themes/ruby_day.conf +95 -0
 - novelwriter/assets/themes/ruby_night.conf +95 -0
 - novelwriter/assets/themes/selenium_dark.conf +95 -0
 - novelwriter/assets/themes/selenium_light.conf +95 -0
 - novelwriter/assets/themes/sepia_dark.conf +95 -0
 - novelwriter/assets/themes/sepia_light.conf +95 -0
 - novelwriter/assets/themes/snazzy.conf +102 -40
 - novelwriter/assets/themes/solarized_dark.conf +108 -40
 - novelwriter/assets/themes/solarized_light.conf +108 -40
 - novelwriter/assets/themes/sultana_light.conf +95 -0
 - novelwriter/assets/themes/sultana_night.conf +95 -0
 - novelwriter/assets/themes/tango_dark.conf +111 -0
 - novelwriter/assets/themes/tango_light.conf +111 -0
 - novelwriter/assets/themes/tomorrow.conf +117 -0
 - novelwriter/assets/themes/tomorrow_night.conf +117 -0
 - novelwriter/assets/themes/tomorrow_night_blue.conf +117 -0
 - novelwriter/assets/themes/tomorrow_night_bright.conf +117 -0
 - novelwriter/assets/themes/tomorrow_night_eighties.conf +117 -0
 - novelwriter/assets/themes/vivid_black_green.conf +97 -0
 - novelwriter/assets/themes/vivid_black_red.conf +97 -0
 - novelwriter/assets/themes/vivid_white_green.conf +97 -0
 - novelwriter/assets/themes/vivid_white_red.conf +97 -0
 - novelwriter/assets/themes/warpgate.conf +96 -0
 - novelwriter/assets/themes/waterlily_dark.conf +95 -0
 - novelwriter/assets/themes/waterlily_light.conf +95 -0
 - novelwriter/common.py +47 -17
 - novelwriter/config.py +57 -62
 - novelwriter/constants.py +32 -6
 - novelwriter/core/buildsettings.py +3 -23
 - novelwriter/core/coretools.py +21 -25
 - novelwriter/core/docbuild.py +4 -9
 - novelwriter/core/document.py +2 -6
 - novelwriter/core/index.py +33 -53
 - novelwriter/core/indexdata.py +17 -22
 - novelwriter/core/item.py +11 -35
 - novelwriter/core/itemmodel.py +5 -21
 - novelwriter/core/novelmodel.py +3 -7
 - novelwriter/core/options.py +3 -4
 - novelwriter/core/project.py +31 -21
 - novelwriter/core/projectdata.py +2 -21
 - novelwriter/core/projectxml.py +13 -21
 - novelwriter/core/sessions.py +2 -4
 - novelwriter/core/spellcheck.py +12 -13
 - novelwriter/core/status.py +27 -20
 - novelwriter/core/storage.py +5 -10
 - novelwriter/core/tree.py +6 -15
 - novelwriter/dialogs/about.py +9 -10
 - novelwriter/dialogs/docmerge.py +17 -14
 - novelwriter/dialogs/docsplit.py +18 -14
 - novelwriter/dialogs/editlabel.py +15 -9
 - novelwriter/dialogs/preferences.py +69 -68
 - novelwriter/dialogs/projectsettings.py +88 -67
 - novelwriter/dialogs/quotes.py +15 -10
 - novelwriter/dialogs/wordlist.py +18 -21
 - novelwriter/enum.py +75 -30
 - novelwriter/error.py +6 -11
 - novelwriter/extensions/configlayout.py +8 -34
 - novelwriter/extensions/eventfilters.py +3 -3
 - novelwriter/extensions/modified.py +87 -32
 - novelwriter/extensions/novelselector.py +13 -12
 - novelwriter/extensions/pagedsidebar.py +10 -18
 - novelwriter/extensions/progressbars.py +5 -11
 - novelwriter/extensions/statusled.py +3 -6
 - novelwriter/extensions/switch.py +8 -11
 - novelwriter/extensions/switchbox.py +2 -11
 - novelwriter/extensions/versioninfo.py +6 -7
 - novelwriter/formats/shared.py +10 -2
 - novelwriter/formats/todocx.py +15 -37
 - novelwriter/formats/tohtml.py +52 -61
 - novelwriter/formats/tokenizer.py +33 -64
 - novelwriter/formats/tomarkdown.py +4 -11
 - novelwriter/formats/toodt.py +12 -71
 - novelwriter/formats/toqdoc.py +11 -21
 - novelwriter/formats/toraw.py +2 -6
 - novelwriter/gui/doceditor.py +207 -245
 - novelwriter/gui/dochighlight.py +142 -101
 - novelwriter/gui/docviewer.py +53 -84
 - novelwriter/gui/docviewerpanel.py +18 -41
 - novelwriter/gui/editordocument.py +12 -17
 - novelwriter/gui/itemdetails.py +5 -14
 - novelwriter/gui/mainmenu.py +24 -32
 - novelwriter/gui/noveltree.py +13 -51
 - novelwriter/gui/outline.py +20 -61
 - novelwriter/gui/projtree.py +40 -96
 - novelwriter/gui/search.py +9 -24
 - novelwriter/gui/sidebar.py +54 -22
 - novelwriter/gui/statusbar.py +7 -22
 - novelwriter/gui/theme.py +482 -368
 - novelwriter/guimain.py +87 -101
 - novelwriter/shared.py +79 -48
 - novelwriter/splash.py +9 -5
 - novelwriter/text/comments.py +1 -1
 - novelwriter/text/counting.py +9 -5
 - novelwriter/text/patterns.py +20 -15
 - novelwriter/tools/dictionaries.py +18 -16
 - novelwriter/tools/lipsum.py +15 -17
 - novelwriter/tools/manusbuild.py +25 -45
 - novelwriter/tools/manuscript.py +94 -95
 - novelwriter/tools/manussettings.py +149 -104
 - novelwriter/tools/noveldetails.py +10 -24
 - novelwriter/tools/welcome.py +24 -72
 - novelwriter/tools/writingstats.py +17 -26
 - novelwriter/types.py +25 -13
 - {novelwriter-2.7.4.dist-info → novelwriter-2.8b1.dist-info}/METADATA +7 -7
 - novelwriter-2.8b1.dist-info/RECORD +212 -0
 - novelwriter/assets/images/welcome-dark.jpg +0 -0
 - novelwriter/assets/images/welcome-light.jpg +0 -0
 - novelwriter/assets/syntax/cyberpunk_night.conf +0 -28
 - novelwriter/assets/syntax/default_dark.conf +0 -42
 - novelwriter/assets/syntax/default_light.conf +0 -42
 - novelwriter/assets/syntax/dracula.conf +0 -44
 - novelwriter/assets/syntax/grey_dark.conf +0 -29
 - novelwriter/assets/syntax/grey_light.conf +0 -29
 - novelwriter/assets/syntax/light_owl.conf +0 -49
 - novelwriter/assets/syntax/night_owl.conf +0 -49
 - novelwriter/assets/syntax/snazzy.conf +0 -42
 - novelwriter/assets/syntax/solarized_dark.conf +0 -29
 - novelwriter/assets/syntax/solarized_light.conf +0 -29
 - novelwriter/assets/syntax/tango.conf +0 -39
 - novelwriter/assets/syntax/tomorrow.conf +0 -49
 - novelwriter/assets/syntax/tomorrow_night.conf +0 -49
 - novelwriter/assets/syntax/tomorrow_night_blue.conf +0 -49
 - novelwriter/assets/syntax/tomorrow_night_bright.conf +0 -49
 - novelwriter/assets/syntax/tomorrow_night_eighties.conf +0 -49
 - novelwriter/assets/themes/default.conf +0 -3
 - novelwriter-2.7.4.dist-info/RECORD +0 -163
 - {novelwriter-2.7.4.dist-info → novelwriter-2.8b1.dist-info}/WHEEL +0 -0
 - {novelwriter-2.7.4.dist-info → novelwriter-2.8b1.dist-info}/entry_points.txt +0 -0
 - {novelwriter-2.7.4.dist-info → novelwriter-2.8b1.dist-info}/licenses/LICENSE.md +0 -0
 - {novelwriter-2.7.4.dist-info → novelwriter-2.8b1.dist-info}/licenses/setup/LICENSE-Apache-2.0.txt +0 -0
 - {novelwriter-2.7.4.dist-info → novelwriter-2.8b1.dist-info}/top_level.txt +0 -0
 
| 
         @@ -21,7 +21,7 @@ General Public License for more details. 
     | 
|
| 
       21 
21 
     | 
    
         | 
| 
       22 
22 
     | 
    
         
             
            You should have received a copy of the GNU General Public License
         
     | 
| 
       23 
23 
     | 
    
         
             
            along with this program. If not, see <https://www.gnu.org/licenses/>.
         
     | 
| 
       24 
     | 
    
         
            -
            """
         
     | 
| 
      
 24 
     | 
    
         
            +
            """  # noqa
         
     | 
| 
       25 
25 
     | 
    
         
             
            from __future__ import annotations
         
     | 
| 
       26 
26 
     | 
    
         | 
| 
       27 
27 
     | 
    
         
             
            import logging
         
     | 
| 
         @@ -35,21 +35,23 @@ from PyQt6.QtWidgets import ( 
     | 
|
| 
       35 
35 
     | 
    
         | 
| 
       36 
36 
     | 
    
         
             
            from novelwriter import CONFIG, SHARED
         
     | 
| 
       37 
37 
     | 
    
         
             
            from novelwriter.common import compact, describeFont, processDialogSymbols, uniqueCompact
         
     | 
| 
       38 
     | 
    
         
            -
            from novelwriter.config import  
     | 
| 
      
 38 
     | 
    
         
            +
            from novelwriter.config import DEF_GUI_DARK, DEF_GUI_LIGHT, DEF_ICONS, DEF_TREECOL
         
     | 
| 
       39 
39 
     | 
    
         
             
            from novelwriter.constants import nwLabels, nwQuotes, nwUnicode, trConst
         
     | 
| 
       40 
40 
     | 
    
         
             
            from novelwriter.dialogs.quotes import GuiQuoteSelect
         
     | 
| 
      
 41 
     | 
    
         
            +
            from novelwriter.enum import nwStandardButton
         
     | 
| 
       41 
42 
     | 
    
         
             
            from novelwriter.extensions.configlayout import NColorLabel, NScrollableForm
         
     | 
| 
       42 
43 
     | 
    
         
             
            from novelwriter.extensions.modified import (
         
     | 
| 
       43 
44 
     | 
    
         
             
                NComboBox, NDialog, NDoubleSpinBox, NIconToolButton, NSpinBox
         
     | 
| 
       44 
45 
     | 
    
         
             
            )
         
     | 
| 
       45 
46 
     | 
    
         
             
            from novelwriter.extensions.pagedsidebar import NPagedSideBar
         
     | 
| 
       46 
47 
     | 
    
         
             
            from novelwriter.extensions.switch import NSwitch
         
     | 
| 
       47 
     | 
    
         
            -
            from novelwriter.types import QtAlignCenter,  
     | 
| 
      
 48 
     | 
    
         
            +
            from novelwriter.types import QtAlignCenter, QtRoleAccept, QtRoleReject
         
     | 
| 
       48 
49 
     | 
    
         | 
| 
       49 
50 
     | 
    
         
             
            logger = logging.getLogger(__name__)
         
     | 
| 
       50 
51 
     | 
    
         | 
| 
       51 
52 
     | 
    
         | 
| 
       52 
53 
     | 
    
         
             
            class GuiPreferences(NDialog):
         
     | 
| 
      
 54 
     | 
    
         
            +
                """GUI: Preferences Dialog."""
         
     | 
| 
       53 
55 
     | 
    
         | 
| 
       54 
56 
     | 
    
         
             
                newPreferencesReady = pyqtSignal(bool, bool, bool, bool)
         
     | 
| 
       55 
57 
     | 
    
         | 
| 
         @@ -69,7 +71,7 @@ class GuiPreferences(NDialog): 
     | 
|
| 
       69 
71 
     | 
    
         
             
                    )
         
     | 
| 
       70 
72 
     | 
    
         | 
| 
       71 
73 
     | 
    
         
             
                    # Search Box
         
     | 
| 
       72 
     | 
    
         
            -
                    self.searchAction = QAction(SHARED.theme.getIcon("search"), "")
         
     | 
| 
      
 74 
     | 
    
         
            +
                    self.searchAction = QAction(SHARED.theme.getIcon("search", "apply"), "")
         
     | 
| 
       73 
75 
     | 
    
         
             
                    self.searchAction.triggered.connect(self._gotoSearch)
         
     | 
| 
       74 
76 
     | 
    
         | 
| 
       75 
77 
     | 
    
         
             
                    self.searchText = QLineEdit(self)
         
     | 
| 
         @@ -88,9 +90,15 @@ class GuiPreferences(NDialog): 
     | 
|
| 
       88 
90 
     | 
    
         
             
                    self.mainForm.setHelpTextStyle(SHARED.theme.helpText)
         
     | 
| 
       89 
91 
     | 
    
         | 
| 
       90 
92 
     | 
    
         
             
                    # Buttons
         
     | 
| 
       91 
     | 
    
         
            -
                    self. 
     | 
| 
       92 
     | 
    
         
            -
                    self. 
     | 
| 
       93 
     | 
    
         
            -
             
     | 
| 
      
 93 
     | 
    
         
            +
                    self.btnSave = SHARED.theme.getStandardButton(nwStandardButton.SAVE, self)
         
     | 
| 
      
 94 
     | 
    
         
            +
                    self.btnSave.clicked.connect(self._doSave)
         
     | 
| 
      
 95 
     | 
    
         
            +
             
     | 
| 
      
 96 
     | 
    
         
            +
                    self.btnCancel = SHARED.theme.getStandardButton(nwStandardButton.CANCEL, self)
         
     | 
| 
      
 97 
     | 
    
         
            +
                    self.btnCancel.clicked.connect(self.reject)
         
     | 
| 
      
 98 
     | 
    
         
            +
             
     | 
| 
      
 99 
     | 
    
         
            +
                    self.btnBox = QDialogButtonBox(self)
         
     | 
| 
      
 100 
     | 
    
         
            +
                    self.btnBox.addButton(self.btnSave, QtRoleAccept)
         
     | 
| 
      
 101 
     | 
    
         
            +
                    self.btnBox.addButton(self.btnCancel, QtRoleReject)
         
     | 
| 
       94 
102 
     | 
    
         | 
| 
       95 
103 
     | 
    
         
             
                    # Assemble
         
     | 
| 
       96 
104 
     | 
    
         
             
                    self.searchBox = QHBoxLayout()
         
     | 
| 
         @@ -106,7 +114,7 @@ class GuiPreferences(NDialog): 
     | 
|
| 
       106 
114 
     | 
    
         
             
                    self.outerBox = QVBoxLayout()
         
     | 
| 
       107 
115 
     | 
    
         
             
                    self.outerBox.addLayout(self.searchBox)
         
     | 
| 
       108 
116 
     | 
    
         
             
                    self.outerBox.addLayout(self.mainBox)
         
     | 
| 
       109 
     | 
    
         
            -
                    self.outerBox.addWidget(self. 
     | 
| 
      
 117 
     | 
    
         
            +
                    self.outerBox.addWidget(self.btnBox)
         
     | 
| 
       110 
118 
     | 
    
         
             
                    self.outerBox.setSpacing(8)
         
     | 
| 
       111 
119 
     | 
    
         | 
| 
       112 
120 
     | 
    
         
             
                    self.setLayout(self.outerBox)
         
     | 
| 
         @@ -125,11 +133,8 @@ class GuiPreferences(NDialog): 
     | 
|
| 
       125 
133 
     | 
    
         | 
| 
       126 
134 
     | 
    
         
             
                    logger.debug("Ready: GuiPreferences")
         
     | 
| 
       127 
135 
     | 
    
         | 
| 
       128 
     | 
    
         
            -
                    return
         
     | 
| 
       129 
     | 
    
         
            -
             
     | 
| 
       130 
136 
     | 
    
         
             
                def __del__(self) -> None:  # pragma: no cover
         
     | 
| 
       131 
137 
     | 
    
         
             
                    logger.debug("Delete: GuiPreferences")
         
     | 
| 
       132 
     | 
    
         
            -
                    return
         
     | 
| 
       133 
138 
     | 
    
         | 
| 
       134 
139 
     | 
    
         
             
                def buildForm(self) -> None:
         
     | 
| 
       135 
140 
     | 
    
         
             
                    """Build the settings form."""
         
     | 
| 
         @@ -165,22 +170,34 @@ class GuiPreferences(NDialog): 
     | 
|
| 
       165 
170 
     | 
    
         
             
                    )
         
     | 
| 
       166 
171 
     | 
    
         | 
| 
       167 
172 
     | 
    
         
             
                    # Colour Theme
         
     | 
| 
       168 
     | 
    
         
            -
                    self. 
     | 
| 
       169 
     | 
    
         
            -
                    self. 
     | 
| 
       170 
     | 
    
         
            -
                     
     | 
| 
       171 
     | 
    
         
            -
             
     | 
| 
       172 
     | 
    
         
            -
                     
     | 
| 
      
 173 
     | 
    
         
            +
                    self.lightTheme = NComboBox(self)
         
     | 
| 
      
 174 
     | 
    
         
            +
                    self.lightTheme.setMinimumWidth(200)
         
     | 
| 
      
 175 
     | 
    
         
            +
                    self.darkTheme = NComboBox(self)
         
     | 
| 
      
 176 
     | 
    
         
            +
                    self.darkTheme.setMinimumWidth(200)
         
     | 
| 
      
 177 
     | 
    
         
            +
                    for key, theme in SHARED.theme.colourThemes.items():
         
     | 
| 
      
 178 
     | 
    
         
            +
                        if theme.dark:
         
     | 
| 
      
 179 
     | 
    
         
            +
                            self.darkTheme.addItem(theme.name, key)
         
     | 
| 
      
 180 
     | 
    
         
            +
                        else:
         
     | 
| 
      
 181 
     | 
    
         
            +
                            self.lightTheme.addItem(theme.name, key)
         
     | 
| 
      
 182 
     | 
    
         
            +
             
     | 
| 
      
 183 
     | 
    
         
            +
                    self.lightTheme.setCurrentData(CONFIG.lightTheme, DEF_GUI_LIGHT)
         
     | 
| 
      
 184 
     | 
    
         
            +
                    self.darkTheme.setCurrentData(CONFIG.darkTheme, DEF_GUI_DARK)
         
     | 
| 
       173 
185 
     | 
    
         | 
| 
       174 
186 
     | 
    
         
             
                    self.mainForm.addRow(
         
     | 
| 
       175 
     | 
    
         
            -
                        self.tr(" 
     | 
| 
       176 
     | 
    
         
            -
                        self.tr(" 
     | 
| 
      
 187 
     | 
    
         
            +
                        self.tr("Light colour theme"), self.lightTheme,
         
     | 
| 
      
 188 
     | 
    
         
            +
                        self.tr("You can change theme mode from the sidebar."), stretch=(3, 2)
         
     | 
| 
      
 189 
     | 
    
         
            +
                    )
         
     | 
| 
      
 190 
     | 
    
         
            +
                    self.mainForm.addRow(
         
     | 
| 
      
 191 
     | 
    
         
            +
                        self.tr("Dark colour theme"), self.darkTheme,
         
     | 
| 
      
 192 
     | 
    
         
            +
                        self.tr("You can change theme mode from the sidebar."), stretch=(3, 2)
         
     | 
| 
       177 
193 
     | 
    
         
             
                    )
         
     | 
| 
       178 
194 
     | 
    
         | 
| 
       179 
195 
     | 
    
         
             
                    # Icon Theme
         
     | 
| 
       180 
196 
     | 
    
         
             
                    self.iconTheme = NComboBox(self)
         
     | 
| 
       181 
197 
     | 
    
         
             
                    self.iconTheme.setMinimumWidth(200)
         
     | 
| 
       182 
     | 
    
         
            -
                    for  
     | 
| 
       183 
     | 
    
         
            -
                        self.iconTheme.addItem(name,  
     | 
| 
      
 198 
     | 
    
         
            +
                    for key, theme in SHARED.theme.iconCache.iconThemes.items():
         
     | 
| 
      
 199 
     | 
    
         
            +
                        self.iconTheme.addItem(theme.name, key)
         
     | 
| 
      
 200 
     | 
    
         
            +
             
     | 
| 
       184 
201 
     | 
    
         
             
                    self.iconTheme.setCurrentData(CONFIG.iconTheme, DEF_ICONS)
         
     | 
| 
       185 
202 
     | 
    
         | 
| 
       186 
203 
     | 
    
         
             
                    self.mainForm.addRow(
         
     | 
| 
         @@ -194,7 +211,7 @@ class GuiPreferences(NDialog): 
     | 
|
| 
       194 
211 
     | 
    
         
             
                    self.guiFont.setMinimumWidth(162)
         
     | 
| 
       195 
212 
     | 
    
         
             
                    self.guiFont.setText(describeFont(self._guiFont))
         
     | 
| 
       196 
213 
     | 
    
         
             
                    self.guiFont.setCursorPosition(0)
         
     | 
| 
       197 
     | 
    
         
            -
                    self.guiFontButton = NIconToolButton(self, iSz, "font")
         
     | 
| 
      
 214 
     | 
    
         
            +
                    self.guiFontButton = NIconToolButton(self, iSz, "font", "tool")
         
     | 
| 
       198 
215 
     | 
    
         
             
                    self.guiFontButton.clicked.connect(self._selectGuiFont)
         
     | 
| 
       199 
216 
     | 
    
         
             
                    self.mainForm.addRow(
         
     | 
| 
       200 
217 
     | 
    
         
             
                        self.tr("Application font"), self.guiFont,
         
     | 
| 
         @@ -242,25 +259,13 @@ class GuiPreferences(NDialog): 
     | 
|
| 
       242 
259 
     | 
    
         
             
                    self.sidebar.addButton(title, section)
         
     | 
| 
       243 
260 
     | 
    
         
             
                    self.mainForm.addGroupLabel(title, section)
         
     | 
| 
       244 
261 
     | 
    
         | 
| 
       245 
     | 
    
         
            -
                    # Document Colour Theme
         
     | 
| 
       246 
     | 
    
         
            -
                    self.guiSyntax = NComboBox(self)
         
     | 
| 
       247 
     | 
    
         
            -
                    self.guiSyntax.setMinimumWidth(200)
         
     | 
| 
       248 
     | 
    
         
            -
                    for syntax, name in SHARED.theme.listSyntax():
         
     | 
| 
       249 
     | 
    
         
            -
                        self.guiSyntax.addItem(name, syntax)
         
     | 
| 
       250 
     | 
    
         
            -
                    self.guiSyntax.setCurrentData(CONFIG.guiSyntax, DEF_SYNTAX)
         
     | 
| 
       251 
     | 
    
         
            -
             
     | 
| 
       252 
     | 
    
         
            -
                    self.mainForm.addRow(
         
     | 
| 
       253 
     | 
    
         
            -
                        self.tr("Document colour theme"), self.guiSyntax,
         
     | 
| 
       254 
     | 
    
         
            -
                        self.tr("Colour theme for the editor and viewer."), stretch=(3, 2)
         
     | 
| 
       255 
     | 
    
         
            -
                    )
         
     | 
| 
       256 
     | 
    
         
            -
             
     | 
| 
       257 
262 
     | 
    
         
             
                    # Document Font Family
         
     | 
| 
       258 
263 
     | 
    
         
             
                    self.textFont = QLineEdit(self)
         
     | 
| 
       259 
264 
     | 
    
         
             
                    self.textFont.setReadOnly(True)
         
     | 
| 
       260 
265 
     | 
    
         
             
                    self.textFont.setMinimumWidth(162)
         
     | 
| 
       261 
266 
     | 
    
         
             
                    self.textFont.setText(describeFont(CONFIG.textFont))
         
     | 
| 
       262 
267 
     | 
    
         
             
                    self.textFont.setCursorPosition(0)
         
     | 
| 
       263 
     | 
    
         
            -
                    self.textFontButton = NIconToolButton(self, iSz, "font")
         
     | 
| 
      
 268 
     | 
    
         
            +
                    self.textFontButton = NIconToolButton(self, iSz, "font", "tool")
         
     | 
| 
       264 
269 
     | 
    
         
             
                    self.textFontButton.clicked.connect(self._selectTextFont)
         
     | 
| 
       265 
270 
     | 
    
         
             
                    self.mainForm.addRow(
         
     | 
| 
       266 
271 
     | 
    
         
             
                        self.tr("Document font"), self.textFont,
         
     | 
| 
         @@ -294,6 +299,7 @@ class GuiPreferences(NDialog): 
     | 
|
| 
       294 
299 
     | 
    
         
             
                    # Tree Icon Colours
         
     | 
| 
       295 
300 
     | 
    
         
             
                    self.iconColTree = NComboBox(self)
         
     | 
| 
       296 
301 
     | 
    
         
             
                    self.iconColTree.setMinimumWidth(200)
         
     | 
| 
      
 302 
     | 
    
         
            +
                    self.iconColTree.addItem(self.tr("Theme Colours"), DEF_TREECOL)
         
     | 
| 
       297 
303 
     | 
    
         
             
                    for key, label in nwLabels.THEME_COLORS.items():
         
     | 
| 
       298 
304 
     | 
    
         
             
                        self.iconColTree.addItem(trConst(label), key)
         
     | 
| 
       299 
305 
     | 
    
         
             
                    self.iconColTree.setCurrentData(CONFIG.iconColTree, DEF_TREECOL)
         
     | 
| 
         @@ -367,7 +373,9 @@ class GuiPreferences(NDialog): 
     | 
|
| 
       367 
373 
     | 
    
         | 
| 
       368 
374 
     | 
    
         
             
                    # Backup Path
         
     | 
| 
       369 
375 
     | 
    
         
             
                    self.backupPath = CONFIG.backupPath()
         
     | 
| 
       370 
     | 
    
         
            -
                    self.backupGetPath = QPushButton( 
     | 
| 
      
 376 
     | 
    
         
            +
                    self.backupGetPath = QPushButton(
         
     | 
| 
      
 377 
     | 
    
         
            +
                        SHARED.theme.getIcon("browse", "systemio"), self.tr("Browse"), self
         
     | 
| 
      
 378 
     | 
    
         
            +
                    )
         
     | 
| 
       371 
379 
     | 
    
         
             
                    self.backupGetPath.setIconSize(iSz)
         
     | 
| 
       372 
380 
     | 
    
         
             
                    self.backupGetPath.clicked.connect(self._backupFolder)
         
     | 
| 
       373 
381 
     | 
    
         
             
                    self.mainForm.addRow(
         
     | 
| 
         @@ -543,6 +551,13 @@ class GuiPreferences(NDialog): 
     | 
|
| 
       543 
551 
     | 
    
         
             
                        unit=self.tr("px")
         
     | 
| 
       544 
552 
     | 
    
         
             
                    )
         
     | 
| 
       545 
553 
     | 
    
         | 
| 
      
 554 
     | 
    
         
            +
                    # Highlight Current Line
         
     | 
| 
      
 555 
     | 
    
         
            +
                    self.lineHighlight = NSwitch(self)
         
     | 
| 
      
 556 
     | 
    
         
            +
                    self.lineHighlight.setChecked(CONFIG.lineHighlight)
         
     | 
| 
      
 557 
     | 
    
         
            +
                    self.mainForm.addRow(
         
     | 
| 
      
 558 
     | 
    
         
            +
                        self.tr("Highlight current line"), self.lineHighlight
         
     | 
| 
      
 559 
     | 
    
         
            +
                    )
         
     | 
| 
      
 560 
     | 
    
         
            +
             
     | 
| 
       546 
561 
     | 
    
         
             
                    # Show Tabs and Spaces
         
     | 
| 
       547 
562 
     | 
    
         
             
                    self.showTabsNSpaces = NSwitch(self)
         
     | 
| 
       548 
563 
     | 
    
         
             
                    self.showTabsNSpaces.setChecked(CONFIG.showTabsNSpaces)
         
     | 
| 
         @@ -652,7 +667,7 @@ class GuiPreferences(NDialog): 
     | 
|
| 
       652 
667 
     | 
    
         
             
                    self.dialogLine.setAlignment(QtAlignCenter)
         
     | 
| 
       653 
668 
     | 
    
         
             
                    self.dialogLine.setText(" ".join(CONFIG.dialogLine))
         
     | 
| 
       654 
669 
     | 
    
         | 
| 
       655 
     | 
    
         
            -
                    self.dialogLineButton = NIconToolButton(self, iSz, "add", " 
     | 
| 
      
 670 
     | 
    
         
            +
                    self.dialogLineButton = NIconToolButton(self, iSz, "add", "add")
         
     | 
| 
       656 
671 
     | 
    
         
             
                    self.dialogLineButton.setMenu(self.mnLineSymbols)
         
     | 
| 
       657 
672 
     | 
    
         | 
| 
       658 
673 
     | 
    
         
             
                    self.mainForm.addRow(
         
     | 
| 
         @@ -693,7 +708,7 @@ class GuiPreferences(NDialog): 
     | 
|
| 
       693 
708 
     | 
    
         
             
                    self.showMultiSpaces = NSwitch(self)
         
     | 
| 
       694 
709 
     | 
    
         
             
                    self.showMultiSpaces.setChecked(CONFIG.showMultiSpaces)
         
     | 
| 
       695 
710 
     | 
    
         
             
                    self.mainForm.addRow(
         
     | 
| 
       696 
     | 
    
         
            -
                        self.tr("Highlight multiple  
     | 
| 
      
 711 
     | 
    
         
            +
                        self.tr("Highlight multiple spaces between words"), self.showMultiSpaces,
         
     | 
| 
       697 
712 
     | 
    
         
             
                        self.tr("Applies to the document editor only.")
         
     | 
| 
       698 
713 
     | 
    
         
             
                    )
         
     | 
| 
       699 
714 
     | 
    
         | 
| 
         @@ -794,7 +809,7 @@ class GuiPreferences(NDialog): 
     | 
|
| 
       794 
809 
     | 
    
         
             
                    self.fmtSQuoteOpen.setFixedWidth(boxFixed)
         
     | 
| 
       795 
810 
     | 
    
         
             
                    self.fmtSQuoteOpen.setAlignment(QtAlignCenter)
         
     | 
| 
       796 
811 
     | 
    
         
             
                    self.fmtSQuoteOpen.setText(CONFIG.fmtSQuoteOpen)
         
     | 
| 
       797 
     | 
    
         
            -
                    self.btnSQuoteOpen = NIconToolButton(self, iSz, "quote")
         
     | 
| 
      
 812 
     | 
    
         
            +
                    self.btnSQuoteOpen = NIconToolButton(self, iSz, "quote", "tool")
         
     | 
| 
       798 
813 
     | 
    
         
             
                    self.btnSQuoteOpen.clicked.connect(self._changeSingleQuoteOpen)
         
     | 
| 
       799 
814 
     | 
    
         
             
                    self.mainForm.addRow(
         
     | 
| 
       800 
815 
     | 
    
         
             
                        self.tr("Single quote open style"), self.fmtSQuoteOpen,
         
     | 
| 
         @@ -808,7 +823,7 @@ class GuiPreferences(NDialog): 
     | 
|
| 
       808 
823 
     | 
    
         
             
                    self.fmtSQuoteClose.setFixedWidth(boxFixed)
         
     | 
| 
       809 
824 
     | 
    
         
             
                    self.fmtSQuoteClose.setAlignment(QtAlignCenter)
         
     | 
| 
       810 
825 
     | 
    
         
             
                    self.fmtSQuoteClose.setText(CONFIG.fmtSQuoteClose)
         
     | 
| 
       811 
     | 
    
         
            -
                    self.btnSQuoteClose = NIconToolButton(self, iSz, "quote")
         
     | 
| 
      
 826 
     | 
    
         
            +
                    self.btnSQuoteClose = NIconToolButton(self, iSz, "quote", "tool")
         
     | 
| 
       812 
827 
     | 
    
         
             
                    self.btnSQuoteClose.clicked.connect(self._changeSingleQuoteClose)
         
     | 
| 
       813 
828 
     | 
    
         
             
                    self.mainForm.addRow(
         
     | 
| 
       814 
829 
     | 
    
         
             
                        self.tr("Single quote close style"), self.fmtSQuoteClose,
         
     | 
| 
         @@ -823,7 +838,7 @@ class GuiPreferences(NDialog): 
     | 
|
| 
       823 
838 
     | 
    
         
             
                    self.fmtDQuoteOpen.setFixedWidth(boxFixed)
         
     | 
| 
       824 
839 
     | 
    
         
             
                    self.fmtDQuoteOpen.setAlignment(QtAlignCenter)
         
     | 
| 
       825 
840 
     | 
    
         
             
                    self.fmtDQuoteOpen.setText(CONFIG.fmtDQuoteOpen)
         
     | 
| 
       826 
     | 
    
         
            -
                    self.btnDQuoteOpen = NIconToolButton(self, iSz, "quote")
         
     | 
| 
      
 841 
     | 
    
         
            +
                    self.btnDQuoteOpen = NIconToolButton(self, iSz, "quote", "tool")
         
     | 
| 
       827 
842 
     | 
    
         
             
                    self.btnDQuoteOpen.clicked.connect(self._changeDoubleQuoteOpen)
         
     | 
| 
       828 
843 
     | 
    
         
             
                    self.mainForm.addRow(
         
     | 
| 
       829 
844 
     | 
    
         
             
                        self.tr("Double quote open style"), self.fmtDQuoteOpen,
         
     | 
| 
         @@ -837,7 +852,7 @@ class GuiPreferences(NDialog): 
     | 
|
| 
       837 
852 
     | 
    
         
             
                    self.fmtDQuoteClose.setFixedWidth(boxFixed)
         
     | 
| 
       838 
853 
     | 
    
         
             
                    self.fmtDQuoteClose.setAlignment(QtAlignCenter)
         
     | 
| 
       839 
854 
     | 
    
         
             
                    self.fmtDQuoteClose.setText(CONFIG.fmtDQuoteClose)
         
     | 
| 
       840 
     | 
    
         
            -
                    self.btnDQuoteClose = NIconToolButton(self, iSz, "quote")
         
     | 
| 
      
 855 
     | 
    
         
            +
                    self.btnDQuoteClose = NIconToolButton(self, iSz, "quote", "tool")
         
     | 
| 
       841 
856 
     | 
    
         
             
                    self.btnDQuoteClose.clicked.connect(self._changeDoubleQuoteClose)
         
     | 
| 
       842 
857 
     | 
    
         
             
                    self.mainForm.addRow(
         
     | 
| 
       843 
858 
     | 
    
         
             
                        self.tr("Double quote close style"), self.fmtDQuoteClose,
         
     | 
| 
         @@ -848,8 +863,6 @@ class GuiPreferences(NDialog): 
     | 
|
| 
       848 
863 
     | 
    
         
             
                    self.mainForm.finalise()
         
     | 
| 
       849 
864 
     | 
    
         
             
                    self.sidebar.setSelected(1)
         
     | 
| 
       850 
865 
     | 
    
         | 
| 
       851 
     | 
    
         
            -
                    return
         
     | 
| 
       852 
     | 
    
         
            -
             
     | 
| 
       853 
866 
     | 
    
         
             
                ##
         
     | 
| 
       854 
867 
     | 
    
         
             
                #  Events
         
     | 
| 
       855 
868 
     | 
    
         
             
                ##
         
     | 
| 
         @@ -860,7 +873,6 @@ class GuiPreferences(NDialog): 
     | 
|
| 
       860 
873 
     | 
    
         
             
                    self._saveWindowSize()
         
     | 
| 
       861 
874 
     | 
    
         
             
                    event.accept()
         
     | 
| 
       862 
875 
     | 
    
         
             
                    self.softDelete()
         
     | 
| 
       863 
     | 
    
         
            -
                    return
         
     | 
| 
       864 
876 
     | 
    
         | 
| 
       865 
877 
     | 
    
         
             
                def keyPressEvent(self, event: QKeyEvent) -> None:
         
     | 
| 
       866 
878 
     | 
    
         
             
                    """Overload keyPressEvent and only accept escape. The main
         
     | 
| 
         @@ -870,7 +882,6 @@ class GuiPreferences(NDialog): 
     | 
|
| 
       870 
882 
     | 
    
         
             
                    if event.matches(QKeySequence.StandardKey.Cancel):
         
     | 
| 
       871 
883 
     | 
    
         
             
                        self.close()
         
     | 
| 
       872 
884 
     | 
    
         
             
                    event.ignore()
         
     | 
| 
       873 
     | 
    
         
            -
                    return
         
     | 
| 
       874 
885 
     | 
    
         | 
| 
       875 
886 
     | 
    
         
             
                ##
         
     | 
| 
       876 
887 
     | 
    
         
             
                #  Private Slots
         
     | 
| 
         @@ -880,13 +891,11 @@ class GuiPreferences(NDialog): 
     | 
|
| 
       880 
891 
     | 
    
         
             
                def _sidebarClicked(self, section: int) -> None:
         
     | 
| 
       881 
892 
     | 
    
         
             
                    """Process a user request to switch page."""
         
     | 
| 
       882 
893 
     | 
    
         
             
                    self.mainForm.scrollToSection(section)
         
     | 
| 
       883 
     | 
    
         
            -
                    return
         
     | 
| 
       884 
894 
     | 
    
         | 
| 
       885 
895 
     | 
    
         
             
                @pyqtSlot()
         
     | 
| 
       886 
896 
     | 
    
         
             
                def _gotoSearch(self) -> None:
         
     | 
| 
       887 
897 
     | 
    
         
             
                    """Go to the setting indicated by the search text."""
         
     | 
| 
       888 
898 
     | 
    
         
             
                    self.mainForm.scrollToLabel(self.searchText.text().strip())
         
     | 
| 
       889 
     | 
    
         
            -
                    return
         
     | 
| 
       890 
899 
     | 
    
         | 
| 
       891 
900 
     | 
    
         
             
                @pyqtSlot()
         
     | 
| 
       892 
901 
     | 
    
         
             
                def _selectGuiFont(self) -> None:
         
     | 
| 
         @@ -896,7 +905,6 @@ class GuiPreferences(NDialog): 
     | 
|
| 
       896 
905 
     | 
    
         
             
                        self.guiFont.setText(describeFont(font))
         
     | 
| 
       897 
906 
     | 
    
         
             
                        self.guiFont.setCursorPosition(0)
         
     | 
| 
       898 
907 
     | 
    
         
             
                        self._guiFont = font
         
     | 
| 
       899 
     | 
    
         
            -
                    return
         
     | 
| 
       900 
908 
     | 
    
         | 
| 
       901 
909 
     | 
    
         
             
                @pyqtSlot()
         
     | 
| 
       902 
910 
     | 
    
         
             
                def _selectTextFont(self) -> None:
         
     | 
| 
         @@ -906,7 +914,6 @@ class GuiPreferences(NDialog): 
     | 
|
| 
       906 
914 
     | 
    
         
             
                        self.textFont.setText(describeFont(font))
         
     | 
| 
       907 
915 
     | 
    
         
             
                        self.textFont.setCursorPosition(0)
         
     | 
| 
       908 
916 
     | 
    
         
             
                        self._textFont = font
         
     | 
| 
       909 
     | 
    
         
            -
                    return
         
     | 
| 
       910 
917 
     | 
    
         | 
| 
       911 
918 
     | 
    
         
             
                @pyqtSlot()
         
     | 
| 
       912 
919 
     | 
    
         
             
                def _backupFolder(self) -> None:
         
     | 
| 
         @@ -917,13 +924,11 @@ class GuiPreferences(NDialog): 
     | 
|
| 
       917 
924 
     | 
    
         
             
                    ):
         
     | 
| 
       918 
925 
     | 
    
         
             
                        self.backupPath = path
         
     | 
| 
       919 
926 
     | 
    
         
             
                        self.mainForm.setHelpText("backupPath", self.tr("Path: {0}").format(path))
         
     | 
| 
       920 
     | 
    
         
            -
                    return
         
     | 
| 
       921 
927 
     | 
    
         | 
| 
       922 
928 
     | 
    
         
             
                @pyqtSlot(bool)
         
     | 
| 
       923 
929 
     | 
    
         
             
                def _toggledBackupOnClose(self, state: bool) -> None:
         
     | 
| 
       924 
930 
     | 
    
         
             
                    """Toggle switch that depends on the backup on close switch."""
         
     | 
| 
       925 
931 
     | 
    
         
             
                    self.askBeforeBackup.setEnabled(state)
         
     | 
| 
       926 
     | 
    
         
            -
                    return
         
     | 
| 
       927 
932 
     | 
    
         | 
| 
       928 
933 
     | 
    
         
             
                @pyqtSlot(str)
         
     | 
| 
       929 
934 
     | 
    
         
             
                def _insertDialogLineSymbol(self, symbol: str) -> None:
         
     | 
| 
         @@ -931,7 +936,6 @@ class GuiPreferences(NDialog): 
     | 
|
| 
       931 
936 
     | 
    
         
             
                    current = self.dialogLine.text()
         
     | 
| 
       932 
937 
     | 
    
         
             
                    values = processDialogSymbols(f"{current} {symbol}")
         
     | 
| 
       933 
938 
     | 
    
         
             
                    self.dialogLine.setText(" ".join(values))
         
     | 
| 
       934 
     | 
    
         
            -
                    return
         
     | 
| 
       935 
939 
     | 
    
         | 
| 
       936 
940 
     | 
    
         
             
                @pyqtSlot(bool)
         
     | 
| 
       937 
941 
     | 
    
         
             
                def _toggleAutoReplaceMain(self, state: bool) -> None:
         
     | 
| 
         @@ -941,7 +945,6 @@ class GuiPreferences(NDialog): 
     | 
|
| 
       941 
945 
     | 
    
         
             
                    self.doReplaceDash.setEnabled(state)
         
     | 
| 
       942 
946 
     | 
    
         
             
                    self.doReplaceDots.setEnabled(state)
         
     | 
| 
       943 
947 
     | 
    
         
             
                    self.fmtPadThin.setEnabled(state)
         
     | 
| 
       944 
     | 
    
         
            -
                    return
         
     | 
| 
       945 
948 
     | 
    
         | 
| 
       946 
949 
     | 
    
         
             
                @pyqtSlot()
         
     | 
| 
       947 
950 
     | 
    
         
             
                def _changeSingleQuoteOpen(self) -> None:
         
     | 
| 
         @@ -949,7 +952,6 @@ class GuiPreferences(NDialog): 
     | 
|
| 
       949 
952 
     | 
    
         
             
                    quote, status = GuiQuoteSelect.getQuote(self, current=self.fmtSQuoteOpen.text())
         
     | 
| 
       950 
953 
     | 
    
         
             
                    if status:
         
     | 
| 
       951 
954 
     | 
    
         
             
                        self.fmtSQuoteOpen.setText(quote)
         
     | 
| 
       952 
     | 
    
         
            -
                    return
         
     | 
| 
       953 
955 
     | 
    
         | 
| 
       954 
956 
     | 
    
         
             
                @pyqtSlot()
         
     | 
| 
       955 
957 
     | 
    
         
             
                def _changeSingleQuoteClose(self) -> None:
         
     | 
| 
         @@ -957,7 +959,6 @@ class GuiPreferences(NDialog): 
     | 
|
| 
       957 
959 
     | 
    
         
             
                    quote, status = GuiQuoteSelect.getQuote(self, current=self.fmtSQuoteClose.text())
         
     | 
| 
       958 
960 
     | 
    
         
             
                    if status:
         
     | 
| 
       959 
961 
     | 
    
         
             
                        self.fmtSQuoteClose.setText(quote)
         
     | 
| 
       960 
     | 
    
         
            -
                    return
         
     | 
| 
       961 
962 
     | 
    
         | 
| 
       962 
963 
     | 
    
         
             
                @pyqtSlot()
         
     | 
| 
       963 
964 
     | 
    
         
             
                def _changeDoubleQuoteOpen(self) -> None:
         
     | 
| 
         @@ -965,7 +966,6 @@ class GuiPreferences(NDialog): 
     | 
|
| 
       965 
966 
     | 
    
         
             
                    quote, status = GuiQuoteSelect.getQuote(self, current=self.fmtDQuoteOpen.text())
         
     | 
| 
       966 
967 
     | 
    
         
             
                    if status:
         
     | 
| 
       967 
968 
     | 
    
         
             
                        self.fmtDQuoteOpen.setText(quote)
         
     | 
| 
       968 
     | 
    
         
            -
                    return
         
     | 
| 
       969 
969 
     | 
    
         | 
| 
       970 
970 
     | 
    
         
             
                @pyqtSlot()
         
     | 
| 
       971 
971 
     | 
    
         
             
                def _changeDoubleQuoteClose(self) -> None:
         
     | 
| 
         @@ -973,7 +973,6 @@ class GuiPreferences(NDialog): 
     | 
|
| 
       973 
973 
     | 
    
         
             
                    quote, status = GuiQuoteSelect.getQuote(self, current=self.fmtDQuoteClose.text())
         
     | 
| 
       974 
974 
     | 
    
         
             
                    if status:
         
     | 
| 
       975 
975 
     | 
    
         
             
                        self.fmtDQuoteClose.setText(quote)
         
     | 
| 
       976 
     | 
    
         
            -
                    return
         
     | 
| 
       977 
976 
     | 
    
         | 
| 
       978 
977 
     | 
    
         
             
                ##
         
     | 
| 
       979 
978 
     | 
    
         
             
                #  Internal Functions
         
     | 
| 
         @@ -982,7 +981,6 @@ class GuiPreferences(NDialog): 
     | 
|
| 
       982 
981 
     | 
    
         
             
                def _saveWindowSize(self) -> None:
         
     | 
| 
       983 
982 
     | 
    
         
             
                    """Save the dialog window size."""
         
     | 
| 
       984 
983 
     | 
    
         
             
                    CONFIG.setPreferencesWinSize(self.width(), self.height())
         
     | 
| 
       985 
     | 
    
         
            -
                    return
         
     | 
| 
       986 
984 
     | 
    
         | 
| 
       987 
985 
     | 
    
         
             
                def _doSave(self) -> None:
         
     | 
| 
       988 
986 
     | 
    
         
             
                    """Save the values set in the form."""
         
     | 
| 
         @@ -993,18 +991,23 @@ class GuiPreferences(NDialog): 
     | 
|
| 
       993 
991 
     | 
    
         | 
| 
       994 
992 
     | 
    
         
             
                    # Appearance
         
     | 
| 
       995 
993 
     | 
    
         
             
                    guiLocale    = self.guiLocale.currentData()
         
     | 
| 
       996 
     | 
    
         
            -
                     
     | 
| 
      
 994 
     | 
    
         
            +
                    lightTheme   = self.lightTheme.currentData()
         
     | 
| 
      
 995 
     | 
    
         
            +
                    darkTheme    = self.darkTheme.currentData()
         
     | 
| 
       997 
996 
     | 
    
         
             
                    iconTheme    = self.iconTheme.currentData()
         
     | 
| 
       998 
997 
     | 
    
         
             
                    useCharCount = self.useCharCount.isChecked()
         
     | 
| 
       999 
998 
     | 
    
         | 
| 
       1000 
     | 
    
         
            -
                    updateTheme  |= CONFIG. 
     | 
| 
      
 999 
     | 
    
         
            +
                    updateTheme  |= CONFIG.lightTheme != lightTheme
         
     | 
| 
      
 1000 
     | 
    
         
            +
                    updateTheme  |= CONFIG.darkTheme != darkTheme
         
     | 
| 
       1001 
1001 
     | 
    
         
             
                    updateTheme  |= CONFIG.iconTheme != iconTheme
         
     | 
| 
       1002 
1002 
     | 
    
         
             
                    needsRestart |= CONFIG.guiLocale != guiLocale
         
     | 
| 
       1003 
1003 
     | 
    
         
             
                    needsRestart |= CONFIG.guiFont != self._guiFont
         
     | 
| 
       1004 
1004 
     | 
    
         
             
                    refreshTree  |= CONFIG.useCharCount != useCharCount
         
     | 
| 
      
 1005 
     | 
    
         
            +
                    updateSyntax |= CONFIG.lightTheme != lightTheme
         
     | 
| 
      
 1006 
     | 
    
         
            +
                    updateSyntax |= CONFIG.darkTheme != darkTheme
         
     | 
| 
       1005 
1007 
     | 
    
         | 
| 
       1006 
1008 
     | 
    
         
             
                    CONFIG.guiLocale    = guiLocale
         
     | 
| 
       1007 
     | 
    
         
            -
                    CONFIG. 
     | 
| 
      
 1009 
     | 
    
         
            +
                    CONFIG.lightTheme   = lightTheme
         
     | 
| 
      
 1010 
     | 
    
         
            +
                    CONFIG.darkTheme    = darkTheme
         
     | 
| 
       1008 
1011 
     | 
    
         
             
                    CONFIG.iconTheme    = iconTheme
         
     | 
| 
       1009 
1012 
     | 
    
         
             
                    CONFIG.hideVScroll  = self.hideVScroll.isChecked()
         
     | 
| 
       1010 
1013 
     | 
    
         
             
                    CONFIG.hideHScroll  = self.hideHScroll.isChecked()
         
     | 
| 
         @@ -1013,11 +1016,6 @@ class GuiPreferences(NDialog): 
     | 
|
| 
       1013 
1016 
     | 
    
         
             
                    CONFIG.setGuiFont(self._guiFont)
         
     | 
| 
       1014 
1017 
     | 
    
         | 
| 
       1015 
1018 
     | 
    
         
             
                    # Document Style
         
     | 
| 
       1016 
     | 
    
         
            -
                    guiSyntax = self.guiSyntax.currentData()
         
     | 
| 
       1017 
     | 
    
         
            -
             
     | 
| 
       1018 
     | 
    
         
            -
                    updateSyntax |= CONFIG.guiSyntax != guiSyntax
         
     | 
| 
       1019 
     | 
    
         
            -
             
     | 
| 
       1020 
     | 
    
         
            -
                    CONFIG.guiSyntax      = guiSyntax
         
     | 
| 
       1021 
1019 
     | 
    
         
             
                    CONFIG.showFullPath   = self.showFullPath.isChecked()
         
     | 
| 
       1022 
1020 
     | 
    
         
             
                    CONFIG.incNotesWCount = self.incNotesWCount.isChecked()
         
     | 
| 
       1023 
1021 
     | 
    
         
             
                    CONFIG.setTextFont(self._textFont)
         
     | 
| 
         @@ -1058,9 +1056,14 @@ class GuiPreferences(NDialog): 
     | 
|
| 
       1058 
1056 
     | 
    
         
             
                    CONFIG.tabWidth        = self.tabWidth.value()
         
     | 
| 
       1059 
1057 
     | 
    
         | 
| 
       1060 
1058 
     | 
    
         
             
                    # Text Editing
         
     | 
| 
      
 1059 
     | 
    
         
            +
                    lineHighlight = self.lineHighlight.isChecked()
         
     | 
| 
      
 1060 
     | 
    
         
            +
             
     | 
| 
      
 1061 
     | 
    
         
            +
                    updateSyntax |= CONFIG.lineHighlight != lineHighlight
         
     | 
| 
      
 1062 
     | 
    
         
            +
             
     | 
| 
       1061 
1063 
     | 
    
         
             
                    CONFIG.spellLanguage   = self.spellLanguage.currentData()
         
     | 
| 
       1062 
1064 
     | 
    
         
             
                    CONFIG.autoSelect      = self.autoSelect.isChecked()
         
     | 
| 
       1063 
1065 
     | 
    
         
             
                    CONFIG.cursorWidth     = self.cursorWidth.value()
         
     | 
| 
      
 1066 
     | 
    
         
            +
                    CONFIG.lineHighlight   = lineHighlight
         
     | 
| 
       1064 
1067 
     | 
    
         
             
                    CONFIG.showTabsNSpaces = self.showTabsNSpaces.isChecked()
         
     | 
| 
       1065 
1068 
     | 
    
         
             
                    CONFIG.showLineEndings = self.showLineEndings.isChecked()
         
     | 
| 
       1066 
1069 
     | 
    
         | 
| 
         @@ -1121,5 +1124,3 @@ class GuiPreferences(NDialog): 
     | 
|
| 
       1121 
1124 
     | 
    
         
             
                    self.newPreferencesReady.emit(needsRestart, refreshTree, updateTheme, updateSyntax)
         
     | 
| 
       1122 
1125 
     | 
    
         | 
| 
       1123 
1126 
     | 
    
         
             
                    self.close()
         
     | 
| 
       1124 
     | 
    
         
            -
             
     | 
| 
       1125 
     | 
    
         
            -
                    return
         
     |