Commit graph

37 commits

Author SHA1 Message Date
TheJackiMonster 12be4c3a3d
Fixed all Python syntax warnings 2021-02-21 23:45:34 +01:00
TheJackiMonster 6c84e4c8e3 Merge remote-tracking branch 'charcount/characterscount' into charcount 2020-03-27 15:31:28 +01:00
TheJackiMonster 24f3f092bb Added char-count with settings to enable/disable it. 2020-03-27 15:12:44 +01:00
Jan Wester 3aa9cadfd8 Restore progress bar functionality
A previous fix (5f9ea3) inadvertently broke the progress bar by
converting to the wrong data type. (See issue #561 / PR #609).

While checking the code I realized the problem occurred primarily
because we weren't checking the validity of the values closer to the
source. Doing so alleviates the need to check elsewhere.

In the hope of inspiring a more systematic approach, a new uiParse()
utility function has been added to curb the further growth of toXxx()
functions that exist solely to validate user input.

There is no doubt room for improvement, both on the end of the new
uiParse() function as well as the spot where it is used. Ideally, the
data that comes out of the model should already be 'safe', but since
this is a bugfix for a bugfix I want to keep waves to a minimum.

This commit fixes issue #652.
2019-09-23 14:13:38 -06:00
Curtis Gedak 5f9ea3baa5 Fix crash when setting word Goal on new Text (scene) in Outline pane
See issue #561.

The problem appears to be a due to a combination of factors, such as:

- Python does not automatically convert an empty/blank variable to the
  integer zero (0)
- Default goal value is empty/blank for a new Text (scene)
- Asynchronous events can occur such that the change in the Outline
  pane of a new Text (scene) goal from empty/blank to a value is not
  saved to the data model prior to the update event in the Editor pane
  accessing the model value for the word count progress display.

Steps to Reproduce:

1. Start manuskript and create new project (no template).

2. Select **Outline** pane.

3. Click "Text Plus" icon to create a text (default name "New")

4. Select **Editor** pane.

5. Click on **New** to display empty text.

6. Select **Outline** pane.

7. Double-click the empty area on **New** line under title **Goal**,
  type in "300", and press **Enter**.

   Note that manuskript crashes with a segmentation fault.

Work around the crash by using the already existing manuskript
function toInt() which handles conversion of empty/blank values to
integer value zero (0).
2019-07-31 10:46:06 -06:00
Curtis Gedak 60b58d9658 Fix Python 3.7 DeprecationWarning use local.format_string() messages
Fix by replacing locale.format() with locale.format_string().
2018-11-16 12:52:56 -07:00
Lech Baczynski e15cb80847 - formatting characters count according to locale, as in words count 2018-04-10 07:11:32 +02:00
Lech Baczynski c6da77baf9 - adding characters count. Implementing #334 2018-04-09 11:13:01 +02:00
Windspar 4638ba878f stop crash when click btnGoUp and current editor is None 2018-02-18 14:06:33 -05:00
Sebastian Rasmussen dfe88a9681 Fix typos in code comments, invisible to end-users. 2018-01-29 10:30:41 -07:00
Olivier Keshavjee cb79e504e7 Merge branch 'master' into develop 2017-11-27 21:53:37 +01:00
Olivier Keshavjee c2dcbf56a0 Adds new markdown highlighter and many little tweaks 2017-11-27 21:35:32 +01:00
Olivier Keshavjee 7b29d332c5 Removes textFormat panel (bold, italic, etc. buttons) 2017-11-27 20:58:02 +01:00
Olivier Keshavjee 52af71757e Adds: better harmonization between Documents menu and context menu #229 2017-11-24 20:50:18 +01:00
Curtis Gedak a8ed0f5767 Change "informations" to "information"
See issue #181.
2017-11-23 12:43:31 -07:00
Olivier Keshavjee 9e95196cc5 Changes Outline enums to IntEnum 2017-11-15 20:58:12 +01:00
Olivier Keshavjee 170c8ef404 Fixes #194: Editor tab should trim long titles 2017-11-14 18:11:50 +01:00
Olivier Keshavjee 2109f88816 Improves colors of goal progress bar 2017-11-14 10:36:57 +01:00
Olivier Keshavjee bb57d3d057 Adds: merge 2017-11-10 17:21:02 +01:00
Olivier Keshavjee a153606811 Adds: split dialog, split at cursor 2017-11-10 16:31:40 +01:00
Olivier Keshavjee 3b17c4e2b4 Adds: Menu Documents. Edit operations (copy, cut, paste, duplicate, remove), and Move up and down. 2017-11-10 11:35:53 +01:00
Olivier Keshavjee 0a0649a0db Fixes: Manuskript crashes when a wrong locale is set. See #188. 2017-11-06 18:29:18 +01:00
Olivier Keshavjee 648b4b67eb Fixes more bugs in drag n drop: seg fault when creating an item after deleting an item that was open for editing, and other small stuff 2017-10-20 23:39:57 +02:00
Olivier Keshavjee 1a8d4c5c72 Adds some docstrings on editor/view classes, because I never remember who they are and what they do... 2017-10-20 16:20:33 +02:00
Olivier Keshavjee a6123292ae Adds: go-up button. See #157 2017-10-14 21:39:16 +02:00
Olivier Keshavjee c6cace1a9b Less ambiguous behavior when failing to load openIndexes (cf. #27) 2016-04-18 11:46:07 +02:00
Olivier Keshavjee 7f9ea9e513 Some more UI tweaks 2016-04-12 00:01:51 +02:00
Olivier Keshavjee e90e9f9cc4 tabSplitter allows target. 2016-04-11 15:14:24 +02:00
Olivier Keshavjee b4e95f3629 Adds icon for folder views 2016-04-11 07:13:09 +02:00
Olivier Keshavjee 373b36406a Can split views 2016-04-10 19:58:49 +02:00
Olivier Keshavjee c3613f0687 Adds a custom style module to keep everything in one place 2016-04-09 10:52:37 +02:00
Olivier Keshavjee de425cd06a Some more tweaks 2016-04-08 20:16:35 +02:00
Olivier Keshavjee 47fb043197 Unsatisfying tests 2016-04-08 15:23:20 +02:00
Olivier Keshavjee 465c387284 Fixes bug: tabs are not properly closed 2016-03-30 09:43:18 +02:00
Olivier Keshavjee b1f5c17497 Bug fixing and UI tweaking 2016-02-08 09:04:24 +01:00
Olivier Keshavjee 69e0ca93be Cleaning up imports, at last 2016-02-06 12:34:22 +01:00
Olivier Keshavjee c469f262f3 Renaming source folder 2016-02-06 08:38:33 +01:00
Renamed from src/ui/editors/mainEditor.py (Browse further)