novelWriter 2.7.5__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 +160 -225
 - 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 +23 -13
 - {novelwriter-2.7.5.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.5.dist-info/RECORD +0 -163
 - {novelwriter-2.7.5.dist-info → novelwriter-2.8b1.dist-info}/WHEEL +0 -0
 - {novelwriter-2.7.5.dist-info → novelwriter-2.8b1.dist-info}/entry_points.txt +0 -0
 - {novelwriter-2.7.5.dist-info → novelwriter-2.8b1.dist-info}/licenses/LICENSE.md +0 -0
 - {novelwriter-2.7.5.dist-info → novelwriter-2.8b1.dist-info}/licenses/setup/LICENSE-Apache-2.0.txt +0 -0
 - {novelwriter-2.7.5.dist-info → novelwriter-2.8b1.dist-info}/top_level.txt +0 -0
 
    
        novelwriter/tools/lipsum.py
    CHANGED
    
    | 
         @@ -20,7 +20,7 @@ General Public License for more details. 
     | 
|
| 
       20 
20 
     | 
    
         | 
| 
       21 
21 
     | 
    
         
             
            You should have received a copy of the GNU General Public License
         
     | 
| 
       22 
22 
     | 
    
         
             
            along with this program. If not, see <https://www.gnu.org/licenses/>.
         
     | 
| 
       23 
     | 
    
         
            -
            """
         
     | 
| 
      
 23 
     | 
    
         
            +
            """  # noqa
         
     | 
| 
       24 
24 
     | 
    
         
             
            from __future__ import annotations
         
     | 
| 
       25 
25 
     | 
    
         | 
| 
       26 
26 
     | 
    
         
             
            import logging
         
     | 
| 
         @@ -34,14 +34,16 @@ from PyQt6.QtWidgets import ( 
     | 
|
| 
       34 
34 
     | 
    
         | 
| 
       35 
35 
     | 
    
         
             
            from novelwriter import CONFIG, SHARED
         
     | 
| 
       36 
36 
     | 
    
         
             
            from novelwriter.common import readTextFile
         
     | 
| 
      
 37 
     | 
    
         
            +
            from novelwriter.enum import nwStandardButton
         
     | 
| 
       37 
38 
     | 
    
         
             
            from novelwriter.extensions.modified import NDialog
         
     | 
| 
       38 
39 
     | 
    
         
             
            from novelwriter.extensions.switch import NSwitch
         
     | 
| 
       39 
     | 
    
         
            -
            from novelwriter.types import QtAlignLeft, QtAlignRight,  
     | 
| 
      
 40 
     | 
    
         
            +
            from novelwriter.types import QtAlignLeft, QtAlignRight, QtRoleApply, QtRoleDestruct
         
     | 
| 
       40 
41 
     | 
    
         | 
| 
       41 
42 
     | 
    
         
             
            logger = logging.getLogger(__name__)
         
     | 
| 
       42 
43 
     | 
    
         | 
| 
       43 
44 
     | 
    
         | 
| 
       44 
45 
     | 
    
         
             
            class GuiLipsum(NDialog):
         
     | 
| 
      
 46 
     | 
    
         
            +
                """GUI: Lorem Ipsum Text Tool."""
         
     | 
| 
       45 
47 
     | 
    
         | 
| 
       46 
48 
     | 
    
         
             
                def __init__(self, parent: QWidget) -> None:
         
     | 
| 
       47 
49 
     | 
    
         
             
                    super().__init__(parent=parent)
         
     | 
| 
         @@ -57,7 +59,7 @@ class GuiLipsum(NDialog): 
     | 
|
| 
       57 
59 
     | 
    
         | 
| 
       58 
60 
     | 
    
         
             
                    # Icon
         
     | 
| 
       59 
61 
     | 
    
         
             
                    self.docIcon = QLabel(self)
         
     | 
| 
       60 
     | 
    
         
            -
                    self.docIcon.setPixmap(SHARED.theme.getPixmap("text", (64, 64), " 
     | 
| 
      
 62 
     | 
    
         
            +
                    self.docIcon.setPixmap(SHARED.theme.getPixmap("text", (64, 64), "info"))
         
     | 
| 
       61 
63 
     | 
    
         | 
| 
       62 
64 
     | 
    
         
             
                    self.leftBox = QVBoxLayout()
         
     | 
| 
       63 
65 
     | 
    
         
             
                    self.leftBox.setSpacing(4)
         
     | 
| 
         @@ -90,32 +92,29 @@ class GuiLipsum(NDialog): 
     | 
|
| 
       90 
92 
     | 
    
         
             
                    self.innerBox.addLayout(self.formBox)
         
     | 
| 
       91 
93 
     | 
    
         | 
| 
       92 
94 
     | 
    
         
             
                    # Buttons
         
     | 
| 
       93 
     | 
    
         
            -
                    self. 
     | 
| 
       94 
     | 
    
         
            -
                    self. 
     | 
| 
      
 95 
     | 
    
         
            +
                    self.btnInsert = SHARED.theme.getStandardButton(nwStandardButton.INSERT, self)
         
     | 
| 
      
 96 
     | 
    
         
            +
                    self.btnInsert.clicked.connect(self._doInsert)
         
     | 
| 
      
 97 
     | 
    
         
            +
                    self.btnInsert.setAutoDefault(False)
         
     | 
| 
       95 
98 
     | 
    
         | 
| 
       96 
     | 
    
         
            -
                    self.btnClose =  
     | 
| 
       97 
     | 
    
         
            -
                     
     | 
| 
       98 
     | 
    
         
            -
             
     | 
| 
      
 99 
     | 
    
         
            +
                    self.btnClose = SHARED.theme.getStandardButton(nwStandardButton.CLOSE, self)
         
     | 
| 
      
 100 
     | 
    
         
            +
                    self.btnClose.clicked.connect(self.reject)
         
     | 
| 
      
 101 
     | 
    
         
            +
                    self.btnClose.setAutoDefault(False)
         
     | 
| 
       99 
102 
     | 
    
         | 
| 
       100 
     | 
    
         
            -
                    self. 
     | 
| 
       101 
     | 
    
         
            -
                     
     | 
| 
       102 
     | 
    
         
            -
             
     | 
| 
       103 
     | 
    
         
            -
                        self.btnInsert.setAutoDefault(False)
         
     | 
| 
      
 103 
     | 
    
         
            +
                    self.btnBox = QDialogButtonBox(self)
         
     | 
| 
      
 104 
     | 
    
         
            +
                    self.btnBox.addButton(self.btnInsert, QtRoleApply)
         
     | 
| 
      
 105 
     | 
    
         
            +
                    self.btnBox.addButton(self.btnClose, QtRoleDestruct)
         
     | 
| 
       104 
106 
     | 
    
         | 
| 
       105 
107 
     | 
    
         
             
                    # Assemble
         
     | 
| 
       106 
108 
     | 
    
         
             
                    self.outerBox = QVBoxLayout()
         
     | 
| 
       107 
109 
     | 
    
         
             
                    self.outerBox.addLayout(self.innerBox)
         
     | 
| 
       108 
     | 
    
         
            -
                    self.outerBox.addWidget(self. 
     | 
| 
      
 110 
     | 
    
         
            +
                    self.outerBox.addWidget(self.btnBox)
         
     | 
| 
       109 
111 
     | 
    
         
             
                    self.outerBox.setSpacing(16)
         
     | 
| 
       110 
112 
     | 
    
         
             
                    self.setLayout(self.outerBox)
         
     | 
| 
       111 
113 
     | 
    
         | 
| 
       112 
114 
     | 
    
         
             
                    logger.debug("Ready: GuiLipsum")
         
     | 
| 
       113 
115 
     | 
    
         | 
| 
       114 
     | 
    
         
            -
                    return
         
     | 
| 
       115 
     | 
    
         
            -
             
     | 
| 
       116 
116 
     | 
    
         
             
                def __del__(self) -> None:  # pragma: no cover
         
     | 
| 
       117 
117 
     | 
    
         
             
                    logger.debug("Delete: GuiLipsum")
         
     | 
| 
       118 
     | 
    
         
            -
                    return
         
     | 
| 
       119 
118 
     | 
    
         | 
| 
       120 
119 
     | 
    
         
             
                @property
         
     | 
| 
       121 
120 
     | 
    
         
             
                def lipsumText(self) -> str:
         
     | 
| 
         @@ -145,4 +144,3 @@ class GuiLipsum(NDialog): 
     | 
|
| 
       145 
144 
     | 
    
         
             
                    pCount = self.paraCount.value()
         
     | 
| 
       146 
145 
     | 
    
         
             
                    self._lipsumText = "\n\n".join(lipsumText[0:pCount]) + "\n\n"
         
     | 
| 
       147 
146 
     | 
    
         
             
                    self.close()
         
     | 
| 
       148 
     | 
    
         
            -
                    return
         
     | 
    
        novelwriter/tools/manusbuild.py
    CHANGED
    
    | 
         @@ -20,7 +20,7 @@ General Public License for more details. 
     | 
|
| 
       20 
20 
     | 
    
         | 
| 
       21 
21 
     | 
    
         
             
            You should have received a copy of the GNU General Public License
         
     | 
| 
       22 
22 
     | 
    
         
             
            along with this program. If not, see <https://www.gnu.org/licenses/>.
         
     | 
| 
       23 
     | 
    
         
            -
            """
         
     | 
| 
      
 23 
     | 
    
         
            +
            """  # noqa
         
     | 
| 
       24 
24 
     | 
    
         
             
            from __future__ import annotations
         
     | 
| 
       25 
25 
     | 
    
         | 
| 
       26 
26 
     | 
    
         
             
            import logging
         
     | 
| 
         @@ -32,7 +32,7 @@ from PyQt6.QtCore import QTimer, pyqtSlot 
     | 
|
| 
       32 
32 
     | 
    
         
             
            from PyQt6.QtWidgets import (
         
     | 
| 
       33 
33 
     | 
    
         
             
                QAbstractButton, QAbstractItemView, QDialogButtonBox, QFileDialog,
         
     | 
| 
       34 
34 
     | 
    
         
             
                QGridLayout, QHBoxLayout, QLabel, QLineEdit, QListWidget, QListWidgetItem,
         
     | 
| 
       35 
     | 
    
         
            -
                 
     | 
| 
      
 35 
     | 
    
         
            +
                QSplitter, QVBoxLayout, QWidget
         
     | 
| 
       36 
36 
     | 
    
         
             
            )
         
     | 
| 
       37 
37 
     | 
    
         | 
| 
       38 
38 
     | 
    
         
             
            from novelwriter import SHARED
         
     | 
| 
         @@ -40,10 +40,10 @@ from novelwriter.common import makeFileNameSafe, openExternalPath 
     | 
|
| 
       40 
40 
     | 
    
         
             
            from novelwriter.constants import nwLabels
         
     | 
| 
       41 
41 
     | 
    
         
             
            from novelwriter.core.docbuild import NWBuildDocument
         
     | 
| 
       42 
42 
     | 
    
         
             
            from novelwriter.core.item import NWItem
         
     | 
| 
       43 
     | 
    
         
            -
            from novelwriter.enum import nwBuildFmt
         
     | 
| 
       44 
     | 
    
         
            -
            from novelwriter.extensions.modified import NDialog, NIconToolButton
         
     | 
| 
      
 43 
     | 
    
         
            +
            from novelwriter.enum import nwBuildFmt, nwStandardButton
         
     | 
| 
      
 44 
     | 
    
         
            +
            from novelwriter.extensions.modified import NDialog, NIconToolButton, NPushButton
         
     | 
| 
       45 
45 
     | 
    
         
             
            from novelwriter.extensions.progressbars import NProgressSimple
         
     | 
| 
       46 
     | 
    
         
            -
            from novelwriter.types import QtAlignCenter,  
     | 
| 
      
 46 
     | 
    
         
            +
            from novelwriter.types import QtAlignCenter, QtRoleAction, QtRoleDestruct, QtUserRole
         
     | 
| 
       47 
47 
     | 
    
         | 
| 
       48 
48 
     | 
    
         
             
            if TYPE_CHECKING:
         
     | 
| 
       49 
49 
     | 
    
         
             
                from PyQt6.QtGui import QCloseEvent
         
     | 
| 
         @@ -54,7 +54,7 @@ logger = logging.getLogger(__name__) 
     | 
|
| 
       54 
54 
     | 
    
         | 
| 
       55 
55 
     | 
    
         | 
| 
       56 
56 
     | 
    
         
             
            class GuiManuscriptBuild(NDialog):
         
     | 
| 
       57 
     | 
    
         
            -
                """GUI Tools: Manuscript Build Dialog
         
     | 
| 
      
 57 
     | 
    
         
            +
                """GUI Tools: Manuscript Build Dialog.
         
     | 
| 
       58 
58 
     | 
    
         | 
| 
       59 
59 
     | 
    
         
             
                This is the tool for running the build itself. It can be accessed
         
     | 
| 
       60 
60 
     | 
    
         
             
                independently of the Manuscript Build Tool.
         
     | 
| 
         @@ -76,7 +76,7 @@ class GuiManuscriptBuild(NDialog): 
     | 
|
| 
       76 
76 
     | 
    
         
             
                    self.setMinimumHeight(300)
         
     | 
| 
       77 
77 
     | 
    
         | 
| 
       78 
78 
     | 
    
         
             
                    iSz = SHARED.theme.baseIconSize
         
     | 
| 
       79 
     | 
    
         
            -
                    bSz = SHARED.theme. 
     | 
| 
      
 79 
     | 
    
         
            +
                    bSz = SHARED.theme.toolButtonIconSize
         
     | 
| 
       80 
80 
     | 
    
         | 
| 
       81 
81 
     | 
    
         
             
                    pOptions = SHARED.project.options
         
     | 
| 
       82 
82 
     | 
    
         
             
                    self.resize(
         
     | 
| 
         @@ -143,7 +143,7 @@ class GuiManuscriptBuild(NDialog): 
     | 
|
| 
       143 
143 
     | 
    
         
             
                    # Build Path
         
     | 
| 
       144 
144 
     | 
    
         
             
                    self.lblPath = QLabel(self.tr("Path"), self)
         
     | 
| 
       145 
145 
     | 
    
         
             
                    self.buildPath = QLineEdit(self)
         
     | 
| 
       146 
     | 
    
         
            -
                    self.btnBrowse = NIconToolButton(self, iSz, "browse")
         
     | 
| 
      
 146 
     | 
    
         
            +
                    self.btnBrowse = NIconToolButton(self, iSz, "browse", "systemio")
         
     | 
| 
       147 
147 
     | 
    
         | 
| 
       148 
148 
     | 
    
         
             
                    self.pathBox = QHBoxLayout()
         
     | 
| 
       149 
149 
     | 
    
         
             
                    self.pathBox.addWidget(self.buildPath)
         
     | 
| 
         @@ -153,7 +153,7 @@ class GuiManuscriptBuild(NDialog): 
     | 
|
| 
       153 
153 
     | 
    
         
             
                    # Build Name
         
     | 
| 
       154 
154 
     | 
    
         
             
                    self.lblName = QLabel(self.tr("File Name"), self)
         
     | 
| 
       155 
155 
     | 
    
         
             
                    self.buildName = QLineEdit(self)
         
     | 
| 
       156 
     | 
    
         
            -
                    self.btnReset = NIconToolButton(self, iSz, "revert", " 
     | 
| 
      
 156 
     | 
    
         
            +
                    self.btnReset = NIconToolButton(self, iSz, "revert", "reset")
         
     | 
| 
       157 
157 
     | 
    
         
             
                    self.btnReset.setToolTip(self.tr("Reset file name to default"))
         
     | 
| 
       158 
158 
     | 
    
         | 
| 
       159 
159 
     | 
    
         
             
                    self.nameBox = QHBoxLayout()
         
     | 
| 
         @@ -178,25 +178,19 @@ class GuiManuscriptBuild(NDialog): 
     | 
|
| 
       178 
178 
     | 
    
         
             
                    self.buildBox.setVerticalSpacing(4)
         
     | 
| 
       179 
179 
     | 
    
         | 
| 
       180 
180 
     | 
    
         
             
                    # Dialog Buttons
         
     | 
| 
       181 
     | 
    
         
            -
                    self. 
     | 
| 
       182 
     | 
    
         
            -
             
     | 
| 
       183 
     | 
    
         
            -
                    self.btnOpen = QPushButton(
         
     | 
| 
       184 
     | 
    
         
            -
                        SHARED.theme.getIcon("browse", "yellow"), self.tr("Open Folder"), self
         
     | 
| 
       185 
     | 
    
         
            -
                    )
         
     | 
| 
       186 
     | 
    
         
            -
                    self.btnOpen.setIconSize(bSz)
         
     | 
| 
      
 181 
     | 
    
         
            +
                    self.btnOpen = NPushButton(self, self.tr("Open Folder"), bSz, "browse", "systemio")
         
     | 
| 
       187 
182 
     | 
    
         
             
                    self.btnOpen.setAutoDefault(False)
         
     | 
| 
       188 
     | 
    
         
            -
                    self.buttonBox.addButton(self.btnOpen, QtRoleAction)
         
     | 
| 
       189 
183 
     | 
    
         | 
| 
       190 
     | 
    
         
            -
                    self.btnBuild =  
     | 
| 
       191 
     | 
    
         
            -
                        SHARED.theme.getIcon("sb_build", "blue"), self.tr("&Build"), self
         
     | 
| 
       192 
     | 
    
         
            -
                    )
         
     | 
| 
       193 
     | 
    
         
            -
                    self.btnBuild.setIconSize(bSz)
         
     | 
| 
      
 184 
     | 
    
         
            +
                    self.btnBuild = SHARED.theme.getStandardButton(nwStandardButton.BUILD, self)
         
     | 
| 
       194 
185 
     | 
    
         
             
                    self.btnBuild.setAutoDefault(True)
         
     | 
| 
       195 
     | 
    
         
            -
                    self.buttonBox.addButton(self.btnBuild, QtRoleAction)
         
     | 
| 
       196 
186 
     | 
    
         | 
| 
       197 
     | 
    
         
            -
                    self.btnClose =  
     | 
| 
       198 
     | 
    
         
            -
                     
     | 
| 
       199 
     | 
    
         
            -
             
     | 
| 
      
 187 
     | 
    
         
            +
                    self.btnClose = SHARED.theme.getStandardButton(nwStandardButton.CLOSE, self)
         
     | 
| 
      
 188 
     | 
    
         
            +
                    self.btnClose.setAutoDefault(False)
         
     | 
| 
      
 189 
     | 
    
         
            +
             
     | 
| 
      
 190 
     | 
    
         
            +
                    self.btnBox = QDialogButtonBox(self)
         
     | 
| 
      
 191 
     | 
    
         
            +
                    self.btnBox.addButton(self.btnOpen, QtRoleAction)
         
     | 
| 
      
 192 
     | 
    
         
            +
                    self.btnBox.addButton(self.btnBuild, QtRoleAction)
         
     | 
| 
      
 193 
     | 
    
         
            +
                    self.btnBox.addButton(self.btnClose, QtRoleDestruct)
         
     | 
| 
       200 
194 
     | 
    
         | 
| 
       201 
195 
     | 
    
         
             
                    # Assemble GUI
         
     | 
| 
       202 
196 
     | 
    
         
             
                    # ============
         
     | 
| 
         @@ -223,7 +217,7 @@ class GuiManuscriptBuild(NDialog): 
     | 
|
| 
       223 
217 
     | 
    
         
             
                    self.outerBox.addSpacing(4)
         
     | 
| 
       224 
218 
     | 
    
         
             
                    self.outerBox.addLayout(self.buildBox, 0)
         
     | 
| 
       225 
219 
     | 
    
         
             
                    self.outerBox.addSpacing(16)
         
     | 
| 
       226 
     | 
    
         
            -
                    self.outerBox.addWidget(self. 
     | 
| 
      
 220 
     | 
    
         
            +
                    self.outerBox.addWidget(self.btnBox, 0)
         
     | 
| 
       227 
221 
     | 
    
         
             
                    self.outerBox.setSpacing(0)
         
     | 
| 
       228 
222 
     | 
    
         | 
| 
       229 
223 
     | 
    
         
             
                    self.setLayout(self.outerBox)
         
     | 
| 
         @@ -239,16 +233,13 @@ class GuiManuscriptBuild(NDialog): 
     | 
|
| 
       239 
233 
     | 
    
         
             
                    # Signals
         
     | 
| 
       240 
234 
     | 
    
         
             
                    self.btnReset.clicked.connect(self._doResetBuildName)
         
     | 
| 
       241 
235 
     | 
    
         
             
                    self.btnBrowse.clicked.connect(self._doSelectPath)
         
     | 
| 
       242 
     | 
    
         
            -
                    self. 
     | 
| 
      
 236 
     | 
    
         
            +
                    self.btnBox.clicked.connect(self._dialogButtonClicked)
         
     | 
| 
       243 
237 
     | 
    
         
             
                    self.listFormats.itemSelectionChanged.connect(self._resetProgress)
         
     | 
| 
       244 
238 
     | 
    
         | 
| 
       245 
239 
     | 
    
         
             
                    logger.debug("Ready: GuiManuscriptBuild")
         
     | 
| 
       246 
240 
     | 
    
         | 
| 
       247 
     | 
    
         
            -
                    return
         
     | 
| 
       248 
     | 
    
         
            -
             
     | 
| 
       249 
241 
     | 
    
         
             
                def __del__(self) -> None:  # pragma: no cover
         
     | 
| 
       250 
242 
     | 
    
         
             
                    logger.debug("Delete: GuiManuscriptBuild")
         
     | 
| 
       251 
     | 
    
         
            -
                    return
         
     | 
| 
       252 
243 
     | 
    
         | 
| 
       253 
244 
     | 
    
         
             
                ##
         
     | 
| 
       254 
245 
     | 
    
         
             
                #  Events
         
     | 
| 
         @@ -261,7 +252,6 @@ class GuiManuscriptBuild(NDialog): 
     | 
|
| 
       261 
252 
     | 
    
         
             
                    self._saveSettings()
         
     | 
| 
       262 
253 
     | 
    
         
             
                    event.accept()
         
     | 
| 
       263 
254 
     | 
    
         
             
                    self.softDelete()
         
     | 
| 
       264 
     | 
    
         
            -
                    return
         
     | 
| 
       265 
255 
     | 
    
         | 
| 
       266 
256 
     | 
    
         
             
                ##
         
     | 
| 
       267 
257 
     | 
    
         
             
                #  Private Slots
         
     | 
| 
         @@ -270,15 +260,12 @@ class GuiManuscriptBuild(NDialog): 
     | 
|
| 
       270 
260 
     | 
    
         
             
                @pyqtSlot("QAbstractButton*")
         
     | 
| 
       271 
261 
     | 
    
         
             
                def _dialogButtonClicked(self, button: QAbstractButton) -> None:
         
     | 
| 
       272 
262 
     | 
    
         
             
                    """Handle button clicks from the dialog button box."""
         
     | 
| 
       273 
     | 
    
         
            -
                     
     | 
| 
       274 
     | 
    
         
            -
             
     | 
| 
       275 
     | 
    
         
            -
             
     | 
| 
       276 
     | 
    
         
            -
             
     | 
| 
       277 
     | 
    
         
            -
             
     | 
| 
       278 
     | 
    
         
            -
                            self._openOutputFolder()
         
     | 
| 
       279 
     | 
    
         
            -
                    elif role == QtRoleReject:
         
     | 
| 
      
 263 
     | 
    
         
            +
                    if button == self.btnBuild:
         
     | 
| 
      
 264 
     | 
    
         
            +
                        self._runBuild()
         
     | 
| 
      
 265 
     | 
    
         
            +
                    elif button == self.btnOpen:
         
     | 
| 
      
 266 
     | 
    
         
            +
                        self._openOutputFolder()
         
     | 
| 
      
 267 
     | 
    
         
            +
                    elif button == self.btnClose:
         
     | 
| 
       280 
268 
     | 
    
         
             
                        self.close()
         
     | 
| 
       281 
     | 
    
         
            -
                    return
         
     | 
| 
       282 
269 
     | 
    
         | 
| 
       283 
270 
     | 
    
         
             
                @pyqtSlot()
         
     | 
| 
       284 
271 
     | 
    
         
             
                def _doSelectPath(self) -> None:
         
     | 
| 
         @@ -290,7 +277,6 @@ class GuiManuscriptBuild(NDialog): 
     | 
|
| 
       290 
277 
     | 
    
         
             
                    )
         
     | 
| 
       291 
278 
     | 
    
         
             
                    if savePath:
         
     | 
| 
       292 
279 
     | 
    
         
             
                        self.buildPath.setText(savePath)
         
     | 
| 
       293 
     | 
    
         
            -
                    return
         
     | 
| 
       294 
280 
     | 
    
         | 
| 
       295 
281 
     | 
    
         
             
                @pyqtSlot()
         
     | 
| 
       296 
282 
     | 
    
         
             
                def _doResetBuildName(self) -> None:
         
     | 
| 
         @@ -298,13 +284,11 @@ class GuiManuscriptBuild(NDialog): 
     | 
|
| 
       298 
284 
     | 
    
         
             
                    bName = f"{SHARED.project.data.name} - {self._build.name}"
         
     | 
| 
       299 
285 
     | 
    
         
             
                    self.buildName.setText(bName)
         
     | 
| 
       300 
286 
     | 
    
         
             
                    self._build.setLastBuildName(bName)
         
     | 
| 
       301 
     | 
    
         
            -
                    return
         
     | 
| 
       302 
287 
     | 
    
         | 
| 
       303 
288 
     | 
    
         
             
                @pyqtSlot()
         
     | 
| 
       304 
289 
     | 
    
         
             
                def _resetProgress(self) -> None:
         
     | 
| 
       305 
290 
     | 
    
         
             
                    """Set the progress bar back to 0."""
         
     | 
| 
       306 
291 
     | 
    
         
             
                    self.buildProgress.setValue(0)
         
     | 
| 
       307 
     | 
    
         
            -
                    return
         
     | 
| 
       308 
292 
     | 
    
         | 
| 
       309 
293 
     | 
    
         
             
                ##
         
     | 
| 
       310 
294 
     | 
    
         
             
                #  Internal Functions
         
     | 
| 
         @@ -371,7 +355,6 @@ class GuiManuscriptBuild(NDialog): 
     | 
|
| 
       371 
355 
     | 
    
         
             
                    pOptions.setValue("GuiManuscriptBuild", "fmtWidth", mainSplit[0])
         
     | 
| 
       372 
356 
     | 
    
         
             
                    pOptions.setValue("GuiManuscriptBuild", "sumWidth", mainSplit[1])
         
     | 
| 
       373 
357 
     | 
    
         
             
                    pOptions.saveSettings()
         
     | 
| 
       374 
     | 
    
         
            -
                    return
         
     | 
| 
       375 
358 
     | 
    
         | 
| 
       376 
359 
     | 
    
         
             
                def _populateContentList(self) -> None:
         
     | 
| 
       377 
360 
     | 
    
         
             
                    """Build the content list."""
         
     | 
| 
         @@ -396,9 +379,6 @@ class GuiManuscriptBuild(NDialog): 
     | 
|
| 
       396 
379 
     | 
    
         
             
                            item.setIcon(nwItem.getMainIcon())
         
     | 
| 
       397 
380 
     | 
    
         
             
                            self.listContent.addItem(item)
         
     | 
| 
       398 
381 
     | 
    
         | 
| 
       399 
     | 
    
         
            -
                    return
         
     | 
| 
       400 
     | 
    
         
            -
             
     | 
| 
       401 
382 
     | 
    
         
             
                def _openOutputFolder(self) -> None:
         
     | 
| 
       402 
383 
     | 
    
         
             
                    """Open the build folder in the system's file explorer."""
         
     | 
| 
       403 
384 
     | 
    
         
             
                    openExternalPath(Path(self.buildPath.text()))
         
     | 
| 
       404 
     | 
    
         
            -
                    return
         
     |