Skip to content

Commit

Permalink
Prepare version 4.11.8 based on novxlib 4.7.2
Browse files Browse the repository at this point in the history
- Fix a bug where an exception is raised when trying to add a parent
element to the tree while the project is locked.
  • Loading branch information
peter88213 committed Oct 17, 2024
1 parent 80bae41 commit 9ae8968
Show file tree
Hide file tree
Showing 12 changed files with 66 additions and 50 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![Download the latest release](docs/img/download-button.png)](https://github.com/peter88213/novelibre/raw/main/dist/novelibre_v4.11.7.pyzw)
[![Download the latest release](docs/img/download-button.png)](https://github.com/peter88213/novelibre/raw/main/dist/novelibre_v4.11.8.pyzw)
[![Changelog](docs/img/changelog-button.png)](docs/changelog.md)
[![News](docs/img/news-button.png)](https://github.com/peter88213/novelibre/discussions/1)
[![Online help](docs/img/help-button.png)](https://peter88213.github.io/nvhelp-en/)
Expand Down Expand Up @@ -81,10 +81,10 @@ I use the program myself and fix errors immediately if I notice any. As far as I

### Default: Executable Python zip archive

Download the latest release [novelibre_v4.11.7.pyzw](https://github.com/peter88213/novelibre/raw/main/dist/novelibre_v4.11.7.pyzw)
Download the latest release [novelibre_v4.11.8.pyzw](https://github.com/peter88213/novelibre/raw/main/dist/novelibre_v4.11.8.pyzw)

- Launch *novelibre_v4.11.7.pyzw* by double-clicking (Windows/Linux desktop),
- or execute `python novelibre_v4.11.7.pyzw` (Windows), resp. `python3 novelibre_v4.11.7.pyzw` (Linux) on the command line.
- Launch *novelibre_v4.11.8.pyzw* by double-clicking (Windows/Linux desktop),
- or execute `python novelibre_v4.11.8.pyzw` (Windows), resp. `python3 novelibre_v4.11.8.pyzw` (Linux) on the command line.

#### Important

Expand All @@ -100,9 +100,9 @@ the zip file.

### Alternative: Zip file

The package is also available in zip format: [novelibre_v4.11.7.zip](https://github.com/peter88213/novelibre/raw/main/dist/novelibre_v4.11.7.zip)
The package is also available in zip format: [novelibre_v4.11.8.zip](https://github.com/peter88213/novelibre/raw/main/dist/novelibre_v4.11.8.zip)

- Extract the *novelibre_v4.11.7* folder from the downloaded zipfile "novelibre_v4.11.7.zip".
- Extract the *novelibre_v4.11.8* folder from the downloaded zipfile "novelibre_v4.11.8.zip".
- Move into this new folder and launch *setup.pyw* by double-clicking (Windows/Linux desktop),
- or execute `python setup.pyw` (Windows), resp. `python3 setup.pyw` (Linux) on the command line.

Expand Down
4 changes: 2 additions & 2 deletions VERSION
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[LATEST]
version = 4.11.7
download_link = https://github.com/peter88213/novelibre/raw/main/dist/novelibre_v4.11.7.pyzw
version = 4.11.8
download_link = https://github.com/peter88213/novelibre/raw/main/dist/novelibre_v4.11.8.pyzw
Binary file removed dist/novelibre_v4.11.7.pyzw
Binary file not shown.
Binary file removed dist/novelibre_v4.11.7.zip
Binary file not shown.
Binary file added dist/novelibre_v4.11.8.pyzw
Binary file not shown.
Binary file added dist/novelibre_v4.11.8.zip
Binary file not shown.
6 changes: 6 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@

See the [GitHub "Features" project](https://github.com/users/peter88213/projects/14).

### Version 4.11.8

- Fix a bug where an exception is raised when trying to add a parent element to the tree while the project is locked.

Based on novxlib 4.7.2

### Version 4.11.7

- Fix HTML report title display.
Expand Down
6 changes: 3 additions & 3 deletions i18n/de.po
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
#
msgid ""
msgstr ""
"Project-Id-Version: 4.11.7\n"
"POT-Creation-Date: 2024-10-16 10:40:19\n"
"PO-Revision-Date: 2024-10-16 10:40:19\n"
"Project-Id-Version: 4.11.8\n"
"POT-Creation-Date: 2024-10-17 18:08:32\n"
"PO-Revision-Date: 2024-10-17 18:08:32\n"
"Last-Translator: Peter Triesberger\n"
"Language: de\n"
"MIME-Version: 1.0\n"
Expand Down
Binary file modified i18n/locale/de/LC_MESSAGES/novelibre.mo
Binary file not shown.
4 changes: 2 additions & 2 deletions i18n/messages.pot
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
#
msgid ""
msgstr ""
"Project-Id-Version: 4.11.7\n"
"POT-Creation-Date: 2024-10-16 10:40:19\n"
"Project-Id-Version: 4.11.8\n"
"POT-Creation-Date: 2024-10-17 18:08:32\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language: LANGUAGE\n"
Expand Down
82 changes: 46 additions & 36 deletions src/nvlib/controller/nv_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,11 +303,13 @@ def add_parent(self, event=None):
if self._mdl.prjFile is None:
return

if not self.check_lock():
try:
selection = self._ui.tv.tree.selection()[0]
except:
return
if self.check_lock():
return

try:
selection = self._ui.tv.tree.selection()[0]
except:
return

if selection.startswith(SECTION_PREFIX):
self.add_chapter(targetNode=selection)
Expand Down Expand Up @@ -1069,15 +1071,17 @@ def set_character_status(self, isMajor, elemIds=None):
isMajor: bool -- If True, make the characters major. Otherwise, make them minor.
elemIds: list of character IDs to process.
"""
if not self.check_lock():
if elemIds is None:
try:
elemIds = self._ui.tv.tree.selection()
except:
return
if self.check_lock():
return

self._ui.tv.open_children(CR_ROOT)
self._mdl.set_character_status(isMajor, elemIds)
if elemIds is None:
try:
elemIds = self._ui.tv.tree.selection()
except:
return

self._ui.tv.open_children(CR_ROOT)
self._mdl.set_character_status(isMajor, elemIds)

def set_level(self, newLevel, elemIds=None):
"""Set chapter or stage level.
Expand All @@ -1086,14 +1090,16 @@ def set_level(self, newLevel, elemIds=None):
newLevel: int -- New level to be set.
elemIds: list of IDs to process.
"""
if not self.check_lock():
if elemIds is None:
try:
elemIds = self._ui.tv.tree.selection()
except:
return
if self.check_lock():
return

if elemIds is None:
try:
elemIds = self._ui.tv.tree.selection()
except:
return

self._mdl.set_level(newLevel, elemIds)
self._mdl.set_level(newLevel, elemIds)

def set_completion_status(self, newStatus, elemIds=None):
"""Set section completion status (Outline/Draft..).
Expand All @@ -1102,15 +1108,17 @@ def set_completion_status(self, newStatus, elemIds=None):
newStatus: int -- New section status to be set.
elemIds: list of IDs to process.
"""
if not self.check_lock():
if elemIds is None:
try:
elemIds = self._ui.tv.tree.selection()
except:
return
if self.check_lock():
return

self._ui.tv.open_children(elemIds[0])
self._mdl.set_completion_status(newStatus, elemIds)
if elemIds is None:
try:
elemIds = self._ui.tv.tree.selection()
except:
return

self._ui.tv.open_children(elemIds[0])
self._mdl.set_completion_status(newStatus, elemIds)

def set_type(self, newType, elemIds=None):
"""Set section or chapter type Normal).
Expand All @@ -1119,15 +1127,17 @@ def set_type(self, newType, elemIds=None):
newType: int -- New type to be set.
elemIds: list of IDs to process.
"""
if not self.check_lock():
if elemIds is None:
try:
elemIds = self._ui.tv.tree.selection()
except:
return
if self.check_lock():
return

if elemIds is None:
try:
elemIds = self._ui.tv.tree.selection()
except:
return

self._ui.tv.open_children(elemIds[0])
self._mdl.set_type(newType, elemIds)
self._ui.tv.open_children(elemIds[0])
self._mdl.set_type(newType, elemIds)

def show_report(self, suffix):
"""Create HTML report for the web browser.
Expand Down
2 changes: 1 addition & 1 deletion tools/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
sys.path.insert(0, f'{os.getcwd()}/../../novelibre/tools')
from package_builder import PackageBuilder

VERSION = '4.11.7'
VERSION = '4.11.8'


class ApplicationBuilder(PackageBuilder):
Expand Down

0 comments on commit 9ae8968

Please sign in to comment.