novelWriter 2.6.2__py3-none-any.whl → 2.7b1__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 +84 -74
- novelwriter/assets/i18n/nw_cs_CZ.qm +0 -0
- novelwriter/assets/i18n/nw_de_DE.qm +0 -0
- novelwriter/assets/i18n/nw_en_US.qm +0 -0
- novelwriter/assets/i18n/nw_es_419.qm +0 -0
- novelwriter/assets/i18n/nw_fr_FR.qm +0 -0
- novelwriter/assets/i18n/nw_it_IT.qm +0 -0
- novelwriter/assets/i18n/nw_ja_JP.qm +0 -0
- novelwriter/assets/i18n/nw_nb_NO.qm +0 -0
- novelwriter/assets/i18n/nw_nl_NL.qm +0 -0
- novelwriter/assets/i18n/nw_pl_PL.qm +0 -0
- novelwriter/assets/i18n/nw_pt_BR.qm +0 -0
- novelwriter/assets/i18n/nw_ru_RU.qm +0 -0
- novelwriter/assets/i18n/nw_zh_CN.qm +0 -0
- novelwriter/assets/i18n/project_en_GB.json +1 -0
- novelwriter/assets/icons/font_awesome.icons +109 -0
- novelwriter/assets/icons/material_filled_bold.icons +109 -0
- novelwriter/assets/icons/material_filled_normal.icons +109 -0
- novelwriter/assets/icons/material_filled_thin.icons +109 -0
- novelwriter/assets/icons/material_rounded_bold.icons +109 -0
- novelwriter/assets/icons/material_rounded_normal.icons +109 -0
- novelwriter/assets/icons/material_rounded_thin.icons +109 -0
- novelwriter/assets/icons/remix_filled.icons +108 -0
- novelwriter/assets/icons/remix_outline.icons +108 -0
- novelwriter/assets/manual.pdf +0 -0
- novelwriter/assets/{manual_fr_FR.pdf → manual_fr.pdf} +0 -0
- novelwriter/assets/sample.zip +0 -0
- novelwriter/assets/syntax/cyberpunk_night.conf +1 -1
- novelwriter/assets/text/credits_en.htm +6 -6
- novelwriter/assets/themes/cyberpunk_night.conf +23 -7
- novelwriter/assets/themes/default_dark.conf +20 -4
- novelwriter/assets/themes/default_light.conf +21 -5
- novelwriter/assets/themes/dracula.conf +20 -4
- novelwriter/assets/themes/solarized_dark.conf +24 -8
- novelwriter/assets/themes/solarized_light.conf +22 -6
- novelwriter/common.py +33 -26
- novelwriter/config.py +118 -127
- novelwriter/constants.py +75 -56
- novelwriter/core/buildsettings.py +23 -16
- novelwriter/core/coretools.py +11 -7
- novelwriter/core/docbuild.py +19 -13
- novelwriter/core/document.py +2 -2
- novelwriter/core/index.py +142 -432
- novelwriter/core/indexdata.py +403 -0
- novelwriter/core/item.py +35 -28
- novelwriter/core/itemmodel.py +27 -26
- novelwriter/core/novelmodel.py +223 -0
- novelwriter/core/options.py +1 -1
- novelwriter/core/project.py +10 -11
- novelwriter/core/projectdata.py +5 -5
- novelwriter/core/projectxml.py +1 -1
- novelwriter/core/sessions.py +3 -2
- novelwriter/core/spellcheck.py +4 -3
- novelwriter/core/status.py +12 -15
- novelwriter/core/storage.py +1 -1
- novelwriter/core/tree.py +46 -8
- novelwriter/dialogs/about.py +19 -22
- novelwriter/dialogs/docmerge.py +21 -23
- novelwriter/dialogs/docsplit.py +20 -23
- novelwriter/dialogs/editlabel.py +9 -13
- novelwriter/dialogs/preferences.py +111 -48
- novelwriter/dialogs/projectsettings.py +48 -54
- novelwriter/dialogs/quotes.py +14 -19
- novelwriter/dialogs/wordlist.py +25 -30
- novelwriter/enum.py +8 -0
- novelwriter/error.py +16 -16
- novelwriter/extensions/configlayout.py +18 -18
- novelwriter/extensions/eventfilters.py +9 -5
- novelwriter/extensions/modified.py +34 -15
- novelwriter/extensions/novelselector.py +18 -5
- novelwriter/extensions/pagedsidebar.py +39 -49
- novelwriter/extensions/progressbars.py +10 -8
- novelwriter/extensions/statusled.py +6 -13
- novelwriter/extensions/switch.py +19 -30
- novelwriter/extensions/switchbox.py +7 -3
- novelwriter/extensions/versioninfo.py +4 -4
- novelwriter/formats/shared.py +1 -1
- novelwriter/formats/todocx.py +14 -10
- novelwriter/formats/tohtml.py +7 -5
- novelwriter/formats/tokenizer.py +36 -33
- novelwriter/formats/tomarkdown.py +6 -2
- novelwriter/formats/toodt.py +27 -22
- novelwriter/formats/toqdoc.py +19 -14
- novelwriter/formats/toraw.py +6 -2
- novelwriter/gui/doceditor.py +216 -265
- novelwriter/gui/dochighlight.py +46 -45
- novelwriter/gui/docviewer.py +102 -104
- novelwriter/gui/docviewerpanel.py +47 -51
- novelwriter/gui/editordocument.py +8 -5
- novelwriter/gui/itemdetails.py +15 -18
- novelwriter/gui/mainmenu.py +147 -146
- novelwriter/gui/noveltree.py +239 -405
- novelwriter/gui/outline.py +137 -76
- novelwriter/gui/projtree.py +138 -132
- novelwriter/gui/search.py +33 -31
- novelwriter/gui/sidebar.py +13 -18
- novelwriter/gui/statusbar.py +13 -15
- novelwriter/gui/theme.py +533 -430
- novelwriter/guimain.py +27 -29
- novelwriter/shared.py +32 -23
- novelwriter/text/comments.py +70 -0
- novelwriter/text/patterns.py +4 -4
- novelwriter/tools/dictionaries.py +20 -29
- novelwriter/tools/lipsum.py +16 -17
- novelwriter/tools/manusbuild.py +39 -42
- novelwriter/tools/manuscript.py +113 -126
- novelwriter/tools/manussettings.py +78 -83
- novelwriter/tools/noveldetails.py +51 -64
- novelwriter/tools/welcome.py +56 -75
- novelwriter/tools/writingstats.py +44 -57
- novelwriter/types.py +5 -7
- {novelWriter-2.6.2.dist-info → novelwriter-2.7b1.dist-info}/METADATA +6 -6
- novelwriter-2.7b1.dist-info/RECORD +159 -0
- {novelWriter-2.6.2.dist-info → novelwriter-2.7b1.dist-info}/WHEEL +1 -1
- novelWriter-2.6.2.dist-info/RECORD +0 -363
- novelwriter/assets/icons/typicons_dark/README.md +0 -29
- novelwriter/assets/icons/typicons_dark/icons.conf +0 -134
- novelwriter/assets/icons/typicons_dark/mixed_copy.svg +0 -4
- novelwriter/assets/icons/typicons_dark/mixed_document-chapter.svg +0 -12
- novelwriter/assets/icons/typicons_dark/mixed_document-new.svg +0 -6
- novelwriter/assets/icons/typicons_dark/mixed_document-note.svg +0 -12
- novelwriter/assets/icons/typicons_dark/mixed_document-scene.svg +0 -12
- novelwriter/assets/icons/typicons_dark/mixed_document-section.svg +0 -12
- novelwriter/assets/icons/typicons_dark/mixed_document-title.svg +0 -12
- novelwriter/assets/icons/typicons_dark/mixed_edit.svg +0 -4
- novelwriter/assets/icons/typicons_dark/mixed_import.svg +0 -5
- novelwriter/assets/icons/typicons_dark/mixed_input-checked.svg +0 -5
- novelwriter/assets/icons/typicons_dark/mixed_input-none.svg +0 -5
- novelwriter/assets/icons/typicons_dark/mixed_input-unchecked.svg +0 -5
- novelwriter/assets/icons/typicons_dark/mixed_margin-bottom.svg +0 -6
- novelwriter/assets/icons/typicons_dark/mixed_margin-left.svg +0 -6
- novelwriter/assets/icons/typicons_dark/mixed_margin-right.svg +0 -6
- novelwriter/assets/icons/typicons_dark/mixed_margin-top.svg +0 -6
- novelwriter/assets/icons/typicons_dark/mixed_search-replace.svg +0 -6
- novelwriter/assets/icons/typicons_dark/mixed_size-height.svg +0 -6
- novelwriter/assets/icons/typicons_dark/mixed_size-width.svg +0 -6
- novelwriter/assets/icons/typicons_dark/nw_deco-h0.svg +0 -4
- novelwriter/assets/icons/typicons_dark/nw_deco-h1.svg +0 -4
- novelwriter/assets/icons/typicons_dark/nw_deco-h2-narrow.svg +0 -4
- novelwriter/assets/icons/typicons_dark/nw_deco-h2.svg +0 -4
- novelwriter/assets/icons/typicons_dark/nw_deco-h3-narrow.svg +0 -4
- novelwriter/assets/icons/typicons_dark/nw_deco-h3.svg +0 -4
- novelwriter/assets/icons/typicons_dark/nw_deco-h4-narrow.svg +0 -4
- novelwriter/assets/icons/typicons_dark/nw_deco-h4.svg +0 -4
- novelwriter/assets/icons/typicons_dark/nw_deco-note.svg +0 -4
- novelwriter/assets/icons/typicons_dark/nw_deco-noveltree-more.svg +0 -4
- novelwriter/assets/icons/typicons_dark/nw_font.svg +0 -4
- novelwriter/assets/icons/typicons_dark/nw_panel.svg +0 -4
- novelwriter/assets/icons/typicons_dark/nw_quote.svg +0 -4
- novelwriter/assets/icons/typicons_dark/nw_search-case.svg +0 -4
- novelwriter/assets/icons/typicons_dark/nw_search-preserve.svg +0 -4
- novelwriter/assets/icons/typicons_dark/nw_search-regex.svg +0 -4
- novelwriter/assets/icons/typicons_dark/nw_search-word.svg +0 -4
- novelwriter/assets/icons/typicons_dark/nw_tb-bold-md.svg +0 -4
- novelwriter/assets/icons/typicons_dark/nw_tb-bold.svg +0 -6
- novelwriter/assets/icons/typicons_dark/nw_tb-italic-md.svg +0 -4
- novelwriter/assets/icons/typicons_dark/nw_tb-italic.svg +0 -6
- novelwriter/assets/icons/typicons_dark/nw_tb-mark.svg +0 -7
- novelwriter/assets/icons/typicons_dark/nw_tb-strike-md.svg +0 -4
- novelwriter/assets/icons/typicons_dark/nw_tb-strike.svg +0 -6
- novelwriter/assets/icons/typicons_dark/nw_tb-subscript.svg +0 -7
- novelwriter/assets/icons/typicons_dark/nw_tb-superscript.svg +0 -7
- novelwriter/assets/icons/typicons_dark/nw_tb-underline.svg +0 -7
- novelwriter/assets/icons/typicons_dark/nw_toolbar.svg +0 -5
- novelwriter/assets/icons/typicons_dark/typ_arrow-down-thick-grey.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_arrow-forward.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_arrow-maximise.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_arrow-minimise.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_arrow-repeat-grey.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_book-grey.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_book.svg +0 -6
- novelwriter/assets/icons/typicons_dark/typ_bookmark.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_calendar.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_cancel-grey.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_cancel.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_chart-bar-grey.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_chevron-down.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_chevron-left.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_chevron-right.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_chevron-up.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_cog.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_delete-full.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_delete.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_directions-full.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_document-add.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_document-text.svg +0 -8
- novelwriter/assets/icons/typicons_dark/typ_document.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_export-grey.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_export.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_eye.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_flag.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_folder-open.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_folder.svg +0 -5
- novelwriter/assets/icons/typicons_dark/typ_globe-grey.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_key.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_lightbulb-full.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_location.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_media-pause-grey.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_media-record-outline.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_media-record.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_minus.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_pencil.svg +0 -5
- novelwriter/assets/icons/typicons_dark/typ_pin-outline.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_pin.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_plus.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_puzzle-outline.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_puzzle.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_refresh-flipped.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_refresh.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_search-grey.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_search.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_star.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_stopwatch-grey.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_th-dot-menu.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_th-dot-more.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_th-list-grey.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_th-list.svg +0 -9
- novelwriter/assets/icons/typicons_dark/typ_times.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_trash.svg +0 -5
- novelwriter/assets/icons/typicons_dark/typ_unfold-hidden.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_unfold-visible.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_user.svg +0 -5
- novelwriter/assets/icons/typicons_dark/typ_warning-full.svg +0 -4
- novelwriter/assets/icons/typicons_light/README.md +0 -29
- novelwriter/assets/icons/typicons_light/icons.conf +0 -134
- novelwriter/assets/icons/typicons_light/mixed_copy.svg +0 -4
- novelwriter/assets/icons/typicons_light/mixed_document-chapter.svg +0 -12
- novelwriter/assets/icons/typicons_light/mixed_document-new.svg +0 -6
- novelwriter/assets/icons/typicons_light/mixed_document-note.svg +0 -12
- novelwriter/assets/icons/typicons_light/mixed_document-scene.svg +0 -12
- novelwriter/assets/icons/typicons_light/mixed_document-section.svg +0 -12
- novelwriter/assets/icons/typicons_light/mixed_document-title.svg +0 -12
- novelwriter/assets/icons/typicons_light/mixed_edit.svg +0 -4
- novelwriter/assets/icons/typicons_light/mixed_import.svg +0 -5
- novelwriter/assets/icons/typicons_light/mixed_input-checked.svg +0 -5
- novelwriter/assets/icons/typicons_light/mixed_input-none.svg +0 -5
- novelwriter/assets/icons/typicons_light/mixed_input-unchecked.svg +0 -5
- novelwriter/assets/icons/typicons_light/mixed_margin-bottom.svg +0 -6
- novelwriter/assets/icons/typicons_light/mixed_margin-left.svg +0 -6
- novelwriter/assets/icons/typicons_light/mixed_margin-right.svg +0 -6
- novelwriter/assets/icons/typicons_light/mixed_margin-top.svg +0 -6
- novelwriter/assets/icons/typicons_light/mixed_search-replace.svg +0 -6
- novelwriter/assets/icons/typicons_light/mixed_size-height.svg +0 -6
- novelwriter/assets/icons/typicons_light/mixed_size-width.svg +0 -6
- novelwriter/assets/icons/typicons_light/nw_deco-h0.svg +0 -4
- novelwriter/assets/icons/typicons_light/nw_deco-h1.svg +0 -4
- novelwriter/assets/icons/typicons_light/nw_deco-h2-narrow.svg +0 -4
- novelwriter/assets/icons/typicons_light/nw_deco-h2.svg +0 -4
- novelwriter/assets/icons/typicons_light/nw_deco-h3-narrow.svg +0 -4
- novelwriter/assets/icons/typicons_light/nw_deco-h3.svg +0 -4
- novelwriter/assets/icons/typicons_light/nw_deco-h4-narrow.svg +0 -4
- novelwriter/assets/icons/typicons_light/nw_deco-h4.svg +0 -4
- novelwriter/assets/icons/typicons_light/nw_deco-note.svg +0 -4
- novelwriter/assets/icons/typicons_light/nw_deco-noveltree-more.svg +0 -4
- novelwriter/assets/icons/typicons_light/nw_font.svg +0 -4
- novelwriter/assets/icons/typicons_light/nw_panel.svg +0 -4
- novelwriter/assets/icons/typicons_light/nw_quote.svg +0 -4
- novelwriter/assets/icons/typicons_light/nw_search-case.svg +0 -4
- novelwriter/assets/icons/typicons_light/nw_search-preserve.svg +0 -4
- novelwriter/assets/icons/typicons_light/nw_search-regex.svg +0 -4
- novelwriter/assets/icons/typicons_light/nw_search-word.svg +0 -4
- novelwriter/assets/icons/typicons_light/nw_tb-bold-md.svg +0 -4
- novelwriter/assets/icons/typicons_light/nw_tb-bold.svg +0 -6
- novelwriter/assets/icons/typicons_light/nw_tb-italic-md.svg +0 -4
- novelwriter/assets/icons/typicons_light/nw_tb-italic.svg +0 -6
- novelwriter/assets/icons/typicons_light/nw_tb-mark.svg +0 -7
- novelwriter/assets/icons/typicons_light/nw_tb-strike-md.svg +0 -4
- novelwriter/assets/icons/typicons_light/nw_tb-strike.svg +0 -6
- novelwriter/assets/icons/typicons_light/nw_tb-subscript.svg +0 -7
- novelwriter/assets/icons/typicons_light/nw_tb-superscript.svg +0 -7
- novelwriter/assets/icons/typicons_light/nw_tb-underline.svg +0 -7
- novelwriter/assets/icons/typicons_light/nw_toolbar.svg +0 -5
- novelwriter/assets/icons/typicons_light/typ_arrow-down-thick-grey.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_arrow-forward.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_arrow-maximise.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_arrow-minimise.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_arrow-repeat-grey.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_book-grey.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_book.svg +0 -6
- novelwriter/assets/icons/typicons_light/typ_bookmark.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_calendar.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_cancel-grey.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_cancel.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_chart-bar-grey.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_chevron-down.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_chevron-left.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_chevron-right.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_chevron-up.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_cog.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_delete-full.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_delete.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_directions-full.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_document-add.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_document-text.svg +0 -5
- novelwriter/assets/icons/typicons_light/typ_document.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_export-grey.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_export.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_eye.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_flag.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_folder-open.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_folder.svg +0 -5
- novelwriter/assets/icons/typicons_light/typ_globe-grey.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_key.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_lightbulb-full.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_location.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_media-pause-grey.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_media-record-outline.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_media-record.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_minus.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_pencil.svg +0 -5
- novelwriter/assets/icons/typicons_light/typ_pin-outline.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_pin.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_plus.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_puzzle-outline.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_puzzle.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_refresh-flipped.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_refresh.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_search-grey.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_search.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_star.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_stopwatch-grey.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_th-dot-menu.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_th-dot-more.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_th-list-grey.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_th-list.svg +0 -9
- novelwriter/assets/icons/typicons_light/typ_times.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_trash.svg +0 -5
- novelwriter/assets/icons/typicons_light/typ_unfold-hidden.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_unfold-visible.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_user.svg +0 -5
- novelwriter/assets/icons/typicons_light/typ_warning-full.svg +0 -4
- {novelWriter-2.6.2.dist-info → novelwriter-2.7b1.dist-info}/entry_points.txt +0 -0
- {novelWriter-2.6.2.dist-info → novelwriter-2.7b1.dist-info/licenses}/LICENSE.md +0 -0
- {novelWriter-2.6.2.dist-info → novelwriter-2.7b1.dist-info}/top_level.txt +0 -0
@@ -6,7 +6,6 @@ credit = Zeno Rocha
|
|
6
6
|
url = https://draculatheme.com
|
7
7
|
license = MIT
|
8
8
|
licenseurl = https://github.com/dracula/dracula-theme/blob/main/LICENSE
|
9
|
-
icontheme = typicons_dark
|
10
9
|
|
11
10
|
##
|
12
11
|
# Colours:
|
@@ -23,6 +22,26 @@ icontheme = typicons_dark
|
|
23
22
|
# Yellow = f1fa8c : 241, 250, 140
|
24
23
|
##
|
25
24
|
|
25
|
+
[Icons]
|
26
|
+
default = 230, 230, 224
|
27
|
+
faded = 98, 114, 164
|
28
|
+
red = 255, 85, 85
|
29
|
+
orange = 255, 184, 108
|
30
|
+
yellow = 241, 250, 140
|
31
|
+
green = 80, 250, 123
|
32
|
+
aqua = 139, 233, 253
|
33
|
+
blue = 147, 207, 249
|
34
|
+
purple = 189, 147, 249
|
35
|
+
|
36
|
+
[Project]
|
37
|
+
root = 189, 147, 249
|
38
|
+
folder = 241, 250, 140
|
39
|
+
file = 230, 230, 224
|
40
|
+
title = 80, 250, 123
|
41
|
+
chapter = 255, 85, 85
|
42
|
+
scene = 139, 233, 253
|
43
|
+
note = 241, 250, 140
|
44
|
+
|
26
45
|
[Palette]
|
27
46
|
window = 68, 71, 90
|
28
47
|
windowtext = 248, 248, 242
|
@@ -43,6 +62,3 @@ linkvisited = 139, 233, 253
|
|
43
62
|
helptext = 204, 172, 249
|
44
63
|
fadedtext = 98, 114, 164
|
45
64
|
errortext = 255, 85, 85
|
46
|
-
statusnone = 98, 114, 164
|
47
|
-
statussaved = 80, 250, 123
|
48
|
-
statusunsaved = 255, 85, 85
|
@@ -5,13 +5,32 @@ credit = Ethan Schoonover
|
|
5
5
|
url = https://ethanschoonover.com/solarized/
|
6
6
|
license = MIT
|
7
7
|
licenseurl = https://github.com/altercation/solarized/blob/master/LICENSE
|
8
|
-
|
8
|
+
|
9
|
+
[Icons]
|
10
|
+
default = 230, 223, 206
|
11
|
+
faded = 166, 161, 149
|
12
|
+
red = 220, 50, 47
|
13
|
+
orange = 203, 75, 22
|
14
|
+
yellow = 181, 137, 0
|
15
|
+
green = 133, 153, 0
|
16
|
+
aqua = 42, 161, 152
|
17
|
+
blue = 38, 139, 210
|
18
|
+
purple = 211, 54, 130
|
19
|
+
|
20
|
+
[Project]
|
21
|
+
root = 42, 161, 152
|
22
|
+
folder = 42, 161, 152
|
23
|
+
file = 230, 223, 206
|
24
|
+
title = 133, 153, 0
|
25
|
+
chapter = 220, 50, 47
|
26
|
+
scene = 38, 139, 210
|
27
|
+
note = 181, 137, 0
|
9
28
|
|
10
29
|
[Palette]
|
11
30
|
window = 0, 43, 54
|
12
31
|
windowtext = 253, 246, 227
|
13
32
|
base = 7, 54, 66
|
14
|
-
alternatebase =
|
33
|
+
alternatebase = 88, 110, 117
|
15
34
|
text = 253, 246, 227
|
16
35
|
tooltipbase = 133, 153, 0
|
17
36
|
tooltiptext = 0, 43, 54
|
@@ -24,9 +43,6 @@ link = 38, 139, 210
|
|
24
43
|
linkvisited = 38, 139, 210
|
25
44
|
|
26
45
|
[GUI]
|
27
|
-
helptext =
|
28
|
-
fadedtext =
|
29
|
-
errortext =
|
30
|
-
statusnone = 88, 110, 117
|
31
|
-
statussaved = 42, 161, 152
|
32
|
-
statusunsaved = 203, 75, 22
|
46
|
+
helptext = 101, 123, 131
|
47
|
+
fadedtext = 101, 123, 131
|
48
|
+
errortext = 220, 50, 47
|
@@ -5,13 +5,32 @@ credit = Ethan Schoonover
|
|
5
5
|
url = https://ethanschoonover.com/solarized/
|
6
6
|
license = MIT
|
7
7
|
licenseurl = https://github.com/altercation/solarized/blob/master/LICENSE
|
8
|
-
|
8
|
+
|
9
|
+
[Icons]
|
10
|
+
default = 59, 68, 71
|
11
|
+
faded = 78, 91, 95
|
12
|
+
red = 220, 50, 47
|
13
|
+
orange = 203, 75, 22
|
14
|
+
yellow = 181, 137, 0
|
15
|
+
green = 133, 153, 0
|
16
|
+
aqua = 42, 161, 152
|
17
|
+
blue = 38, 139, 210
|
18
|
+
purple = 211, 54, 130
|
19
|
+
|
20
|
+
[Project]
|
21
|
+
root = 42, 161, 152
|
22
|
+
folder = 42, 161, 152
|
23
|
+
file = 59, 68, 71
|
24
|
+
title = 133, 153, 0
|
25
|
+
chapter = 220, 50, 47
|
26
|
+
scene = 38, 139, 210
|
27
|
+
note = 181, 137, 0
|
9
28
|
|
10
29
|
[Palette]
|
11
30
|
window = 238, 232, 213
|
12
31
|
windowtext = 0, 43, 54
|
13
32
|
base = 253, 246, 227
|
14
|
-
alternatebase =
|
33
|
+
alternatebase = 147, 161, 161
|
15
34
|
text = 0, 43, 54
|
16
35
|
tooltipbase = 133, 153, 0
|
17
36
|
tooltiptext = 0, 43, 54
|
@@ -26,7 +45,4 @@ linkvisited = 38, 139, 210
|
|
26
45
|
[GUI]
|
27
46
|
helptext = 78, 91, 95
|
28
47
|
fadedtext = 78, 91, 95
|
29
|
-
errortext =
|
30
|
-
statusnone = 88, 110, 117
|
31
|
-
statussaved = 42, 161, 152
|
32
|
-
statusunsaved = 203, 75, 22
|
48
|
+
errortext = 220, 50, 47
|
novelwriter/common.py
CHANGED
@@ -29,23 +29,23 @@ import unicodedata
|
|
29
29
|
import uuid
|
30
30
|
import xml.etree.ElementTree as ET
|
31
31
|
|
32
|
-
from collections.abc import Callable
|
33
32
|
from configparser import ConfigParser
|
34
33
|
from datetime import datetime
|
35
34
|
from pathlib import Path
|
36
|
-
from typing import TYPE_CHECKING, Any, Literal, TypeVar
|
35
|
+
from typing import TYPE_CHECKING, Any, Literal, TypeGuard, TypeVar
|
37
36
|
from urllib.parse import urljoin
|
38
37
|
from urllib.request import pathname2url
|
39
38
|
|
40
|
-
from
|
41
|
-
from
|
39
|
+
from PyQt6.QtCore import QCoreApplication, QMimeData, QUrl
|
40
|
+
from PyQt6.QtGui import QAction, QDesktopServices, QFont, QFontDatabase, QFontInfo
|
41
|
+
from PyQt6.QtWidgets import QMenu, QMenuBar, QWidget
|
42
42
|
|
43
43
|
from novelwriter.constants import nwConst, nwLabels, nwUnicode, trConst
|
44
44
|
from novelwriter.enum import nwItemClass, nwItemLayout, nwItemType
|
45
45
|
from novelwriter.error import logException
|
46
46
|
|
47
|
-
if TYPE_CHECKING:
|
48
|
-
from
|
47
|
+
if TYPE_CHECKING:
|
48
|
+
from collections.abc import Callable
|
49
49
|
|
50
50
|
logger = logging.getLogger(__name__)
|
51
51
|
|
@@ -349,7 +349,7 @@ def fuzzyTime(seconds: int) -> str:
|
|
349
349
|
elif seconds < 3300: # 55 minutes
|
350
350
|
return QCoreApplication.translate(
|
351
351
|
"Common", "{0} minutes ago"
|
352
|
-
).format(
|
352
|
+
).format(round(seconds/60))
|
353
353
|
elif seconds < 5400: # 90 minutes
|
354
354
|
return QCoreApplication.translate(
|
355
355
|
"Common", "an hour ago"
|
@@ -357,7 +357,7 @@ def fuzzyTime(seconds: int) -> str:
|
|
357
357
|
elif seconds < 84600: # 23.5 hours
|
358
358
|
return QCoreApplication.translate(
|
359
359
|
"Common", "{0} hours ago"
|
360
|
-
).format(
|
360
|
+
).format(round(seconds/3600))
|
361
361
|
elif seconds < 129600: # 1.5 days
|
362
362
|
return QCoreApplication.translate(
|
363
363
|
"Common", "a day ago"
|
@@ -365,7 +365,7 @@ def fuzzyTime(seconds: int) -> str:
|
|
365
365
|
elif seconds < 561600: # 6.5 days
|
366
366
|
return QCoreApplication.translate(
|
367
367
|
"Common", "{0} days ago"
|
368
|
-
).format(
|
368
|
+
).format(round(seconds/86400))
|
369
369
|
elif seconds < 907200: # 10.5 days
|
370
370
|
return QCoreApplication.translate(
|
371
371
|
"Common", "a week ago"
|
@@ -373,7 +373,7 @@ def fuzzyTime(seconds: int) -> str:
|
|
373
373
|
elif seconds < 2419200: # 28 days
|
374
374
|
return QCoreApplication.translate(
|
375
375
|
"Common", "{0} weeks ago"
|
376
|
-
).format(
|
376
|
+
).format(round(seconds/604800))
|
377
377
|
elif seconds < 3888000: # 45 days
|
378
378
|
return QCoreApplication.translate(
|
379
379
|
"Common", "a month ago"
|
@@ -381,7 +381,7 @@ def fuzzyTime(seconds: int) -> str:
|
|
381
381
|
elif seconds < 29808000: # 345 days
|
382
382
|
return QCoreApplication.translate(
|
383
383
|
"Common", "{0} months ago"
|
384
|
-
).format(
|
384
|
+
).format(round(seconds/2592000))
|
385
385
|
elif seconds < 47336400: # 1.5 years
|
386
386
|
return QCoreApplication.translate(
|
387
387
|
"Common", "a year ago"
|
@@ -389,7 +389,7 @@ def fuzzyTime(seconds: int) -> str:
|
|
389
389
|
else:
|
390
390
|
return QCoreApplication.translate(
|
391
391
|
"Common", "{0} years ago"
|
392
|
-
).format(
|
392
|
+
).format(round(seconds/31557600))
|
393
393
|
|
394
394
|
|
395
395
|
def numberToRoman(value: int, toLower: bool = False) -> str:
|
@@ -419,35 +419,29 @@ def numberToRoman(value: int, toLower: bool = False) -> str:
|
|
419
419
|
# Qt Helpers
|
420
420
|
##
|
421
421
|
|
422
|
-
def cssCol(col: QColor, alpha: int | None = None) -> str:
|
423
|
-
"""Convert a QColor object to an rgba entry to use in CSS."""
|
424
|
-
return f"rgba({col.red()}, {col.green()}, {col.blue()}, {alpha or col.alpha()})"
|
425
|
-
|
426
|
-
|
427
422
|
def describeFont(font: QFont) -> str:
|
428
423
|
"""Describe a font in a way that can be displayed on the GUI."""
|
429
424
|
if isinstance(font, QFont):
|
430
425
|
info = QFontInfo(font)
|
431
426
|
family = info.family()
|
432
427
|
styles = [v for v in info.styleName().split() if v not in family]
|
433
|
-
return " ".join([f"{info.pointSize()} pt", family
|
428
|
+
return " ".join([f"{info.pointSize()} pt", family, *styles])
|
434
429
|
return "Error"
|
435
430
|
|
436
431
|
|
437
432
|
def fontMatcher(font: QFont) -> QFont:
|
438
433
|
"""Make sure the font is the correct family, if possible. This
|
439
434
|
ensures that Qt doesn't re-use another font under the hood. The
|
440
|
-
default
|
435
|
+
default Qt font matching algorithm doesn't handle well changing
|
441
436
|
application fonts at runtime.
|
442
437
|
"""
|
443
438
|
info = QFontInfo(font)
|
444
439
|
if (famRequest := font.family()) != (famActual := info.family()):
|
445
440
|
logger.warning("Font mismatch: Requested '%s', but got '%s'", famRequest, famActual)
|
446
|
-
|
447
|
-
if famRequest in db.families():
|
441
|
+
if famRequest in QFontDatabase.families():
|
448
442
|
styleRequest, sizeRequest = font.styleName(), font.pointSize()
|
449
443
|
logger.info("Lookup: %s, %s, %d pt", famRequest, styleRequest, sizeRequest)
|
450
|
-
temp =
|
444
|
+
temp = QFontDatabase.font(famRequest, styleRequest, sizeRequest)
|
451
445
|
temp.setPointSize(sizeRequest) # Make sure it isn't changed
|
452
446
|
famFound, styleFound, sizeFound = temp.family(), temp.styleName(), temp.pointSize()
|
453
447
|
if famFound == famRequest:
|
@@ -465,6 +459,20 @@ def qtLambda(func: Callable, *args: Any, **kwargs: Any) -> Callable:
|
|
465
459
|
return wrapper
|
466
460
|
|
467
461
|
|
462
|
+
def qtAddAction(parent: QWidget, label: str) -> QAction:
|
463
|
+
"""Helper to add action to widget and always return the action."""
|
464
|
+
action = QAction(label, parent)
|
465
|
+
parent.addAction(action)
|
466
|
+
return action
|
467
|
+
|
468
|
+
|
469
|
+
def qtAddMenu(parent: QMenuBar | QMenu, label: str) -> QMenu:
|
470
|
+
"""Helper to add menu to menu and always return the menu."""
|
471
|
+
menu = QMenu(label, parent)
|
472
|
+
parent.addMenu(menu)
|
473
|
+
return menu
|
474
|
+
|
475
|
+
|
468
476
|
def encodeMimeHandles(mimeData: QMimeData, handles: list[str]) -> None:
|
469
477
|
"""Encode handles into a mime data object."""
|
470
478
|
mimeData.setData(nwConst.MIME_HANDLE, b"|".join(h.encode() for h in handles))
|
@@ -484,7 +492,7 @@ def jsonEncode(data: dict | list | tuple, n: int = 0, nmax: int = 0) -> str:
|
|
484
492
|
"""Encode a dictionary, list or tuple as a json object or array, and
|
485
493
|
indent from level n up to a max level nmax if nmax is larger than 0.
|
486
494
|
"""
|
487
|
-
if not isinstance(data,
|
495
|
+
if not isinstance(data, dict | list | tuple):
|
488
496
|
return "[]"
|
489
497
|
|
490
498
|
buffer = []
|
@@ -531,12 +539,11 @@ def jsonEncode(data: dict | list | tuple, n: int = 0, nmax: int = 0) -> str:
|
|
531
539
|
# XML Helpers
|
532
540
|
##
|
533
541
|
|
534
|
-
def xmlIndent(
|
542
|
+
def xmlIndent(xml: ET.Element | ET.ElementTree) -> None:
|
535
543
|
"""A modified version of the XML indent function in the standard
|
536
544
|
library. It behaves more closely to how the one from lxml does.
|
537
545
|
"""
|
538
|
-
if isinstance(
|
539
|
-
tree = tree.getroot()
|
546
|
+
tree = xml.getroot() if isinstance(xml, ET.ElementTree) else xml
|
540
547
|
if not isinstance(tree, ET.Element):
|
541
548
|
return
|
542
549
|
|