Commit graph

437 commits

Author SHA1 Message Date
Curtis Gedak 5ea37bd192 Remove plot resolution step key bindings Ctrl+Enter and Ctrl+Backspace
Many applications, including Manuskript in the Editor pane, use the
keyboard shortcut 'Ctrl+Backspace' to delete the previous word.
However in the Plot pane Manuskript uses 'Ctrl+Backspace' to delete a
plot resolution step.

Fix this inconsistent behaviour by removing the keyboard shortcuts for
'Ctrl+Enter' and 'Ctrl+Backspace' from the Plot pane.

Closes issue #375
2018-11-26 11:05:46 -07:00
Curtis Gedak 98a629454e Add support for pandoc v2 command line options
Now both pandoc v1 and v2 are supported.

Closes issue #304
2018-11-20 10:21:48 -07: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
Curtis Gedak 7f592bae41 Fix Python 3.6 DeprecationWarning invalid escape sequence messages
Fix by ensuring that regular expressions are constructed using either
raw string literals [1] or double backslashes [2].

[1] https://stackoverflow.com/questions/44325948/pandas-invalid-escape-sequence-after-update
[2] https://github.com/joblib/joblib/pull/526

Note that python only shows the deprecation warnings on initial run [3].

[3] https://bugs.python.org/issue30091

To work around this issue, remove the cached bytecode with:

    find . -name "__pycache__" -exec rm -rf {} \;

Then to prevent compiling to bytecode add the "-B" option to python:

    python3 -B -m pytest -vs
2018-11-16 12:52:56 -07:00
Curtis Gedak af53102e77 Fix pytest warning about duplicate name when running tests
When running pytest on kubuntu 16.04 the following warning was displayed:

    $ python3 -m pytest -v
    ...
    ./manuskript/load_save/version_1.py:319: \
    UserWarning: Duplicate name: 'outline/0-Folder/0-Text-3.md'
      zf.writestr(filename, content, compress_type=compression)

The error was tracked down using the following pytest invocation:

    $ python3 -m pytest -v -W error::UserWarning

This invocation showed 4 occurrences similar to the following warning:

    self = <zipfile.ZipFile filename='/tmp/tmpgs_sjpzr.msk' mode='w'>
    zinfo = <[AttributeError("compress_size") raised in repr()] \
    ZipInfo object at 0x7f3cc0124588>

        def _writecheck(self, zinfo):
            """Check for errors before writing a file to the archive."""
            if zinfo.filename in self.NameToInfo:
                import warnings
    >           warnings.warn('Duplicate name: %r' % zinfo.filename, \
                stacklevel=3)
    E           UserWarning: Duplicate name: 'outline/0-Folder/0-Text-3.md'

These warnings arose in the following 4 tests:

  - test_references
  - test_autoLoad
  - test_loadExportWiget
  - test_loadImportWiget

The cause of the issue is that in manuskript/tests/conftest.py, the
mainWindow::closeProject() method is called to close the project, but
the project was never loaded.  This meant the zip file setting
defaulted to True, when in fact the Acts sample project is not stored
in a single zip project file.

Fix by removing the call to MW.closeProject() before the project is
loaded.
2018-11-16 12:52:09 -07:00
Curtis Gedak b0774b4149 Fix segmentation fault on import
Manuskript started to segmentation fault on import starting with Qt 5.11.

I found the following link and the Qt bug links within to be useful in
my trouble-shooting efforts.

[Qt 5.11] Various Applications Segfault in 'libfm-qt'
https://github.com/lxqt/libfm-qt/issues/164

Closes issue #402
2018-11-11 13:31:06 -07:00
Curtis Gedak 026861ee87 Fix plot importance changes if delete earlier plot and click other plots
The root cause was a mismatch between plot IDs and plot model rows.

This issue would appear when a plot was deleted such that the plot IDs
did not match the plot model row numbers and different plots had
different importance levels.  The problem would not occur if the most
recently added plot was deleted.

The plot ID / plot model row mismatch was introduced with the
following commit:

    Fixes: add plot then choose new plot does not set \
    importance slider
    3569f78928

Closes issue #404
2018-11-05 09:29:53 -07:00
Curtis Gedak 729489a77e Improve pandoc compile/export return code handling
See issue #186
2018-10-31 10:31:53 -06:00
RiderExMachina 41e9467267 Fix crash in Outline mode with multi-item select #355
Closes issue #355 and pull request #385
2018-10-14 11:10:46 -06:00
Curtis Gedak 21423734e9 Revert "Minor grammar fixes"
This reverts commit 2fdf8c64bf.

The problem introduced by the commit is that the Editor pane would
incorrectly label book elements with the plural form of a word.  For
example "Books 4", "Sections 2", "Chapters 1", or "Scenes 3".  Hence
the need to undo the commit.

Closes issue #383.
2018-09-20 14:57:44 -06:00
RiderExMachina 5f8168fb37 Moved incorrectly placed parameter to correct place. Closes #377. 2018-09-17 23:32:10 -07:00
RiderExMachina 2fdf8c64bf Minor grammar fixes
Fix grammar regarding multiple of an object.
2018-09-11 10:32:51 -06:00
Lech Baczynski 3fdef2b800 Fix for compile/export crash (error when saving in cp1250) #331
See issue #331 and pull request #340
2018-08-21 10:55:53 -06:00
Curtis Gedak 97e4679d83 ========== manuskript-0.7.0 ========== 2018-08-15 09:25:21 -06:00
Curtis Gedak 378f03c0b6 Clear Cheatsheet results when filter text empty 2018-08-14 09:04:00 -06:00
Curtis Gedak 713528a239 Fix crash if Cheatsheet filter term not found and Enter key pressed #354
See issue #354.
2018-08-14 09:04:00 -06:00
Curtis Gedak 0d84202da6 Add new language translations to the Settings window 2018-08-06 11:27:29 -06:00
Windspar 67db180c25 Fixes #217 - segfault when pasting text with focus mode enabled 2018-03-08 11:19:25 -07:00
JackXVII d3afa11ceb Remove _updateIndexFromID from textEditView
It is not used anymore.
2018-03-03 12:53:52 -07:00
JackXVII 3a21ddd137 Use QPersistentModelIndex in textEditView
It is much simpler than catching rowsAboutToBeDeleted signal from model. Also
it fixes #306.
2018-03-03 12:53:52 -07:00
Curtis Gedak 63b471e10d Make word match for spell check exclude underscore from words
See issue #283.

Adds (?!_) to perform negative lookahead to exclude "_" from pattern match.

https://stackoverflow.com/questions/14858346/regular-expressions-how-to-express-w-without-underscore
2018-02-20 10:51:57 -07:00
Windspar 4638ba878f stop crash when click btnGoUp and current editor is None 2018-02-18 14:06:33 -05:00
Curtis Gedak 43c077552a Avoid crash on spellcheck by ensuring enchant dictionary exists
See issue #273.
2018-02-12 10:59:14 -07:00
Allan Nordhøy 62a8a136c0 Spelling: LaTeX, Pandoc, XeLaTeX, Unicode, HTML. https link
See pull request #310.
2018-02-12 10:52:35 -07:00
Sebastian Rasmussen dde836e0f4 Fix typos that are visible to end-users. 2018-01-29 10:30:41 -07:00
Sebastian Rasmussen dfe88a9681 Fix typos in code comments, invisible to end-users. 2018-01-29 10:30:41 -07:00
Olivier Keshavjee 4a9dc00381 Fixes #307: Overlay status bar prevents access to add/delete world item icons when displaying a message 2018-01-22 18:19:22 +01:00
Olivier 30a49a44d4
Merge pull request #302 from gedakc/issue-281-hidden-file-crash-open-project
Skip loading directory and file names that begin with a period
2018-01-18 10:18:58 +01:00
JackXVII 8a9044b4ae Fix World items positional insertion 2018-01-15 22:02:43 +03:00
JackXVII 43df0b3d8a Fix World sub-items disappearing 2018-01-15 18:29:21 +03:00
Curtis Gedak 60cc6c59aa Skip loading directory and file names that begin with a period
See issue #281.

When loading a project that has the setting **Save to one single
file** disabled, Manuskript tries to read all directories and files
under the project directory.

Manuskript expects all files to contain valid unicode characters.

However if a file containing non-unicode characters is read then
Manuskript will crash.

The error message displayed on the console is similar to the
following:

----- begin snippet -----
Traceback (most recent call last):
  File "/home/gedakc/workspace/manuskript.olivierkes/bin/../manuskript/ui/welcome.py", line 134, in loadRecentFile
    self.mw.loadProject(act.data())
  File "/home/gedakc/workspace/manuskript.olivierkes/bin/../manuskript/mainWindow.py", line 566, in loadProject
    self.loadDatas(project)
  File "/home/gedakc/workspace/manuskript.olivierkes/bin/../manuskript/mainWindow.py", line 793, in loadDatas
    errors = loadSave.loadProject(project)
  File "/home/gedakc/workspace/manuskript.olivierkes/bin/../manuskript/loadSave.py", line 66, in loadProject
    v1.loadProject(project, zip=isZip)
  File "/home/gedakc/workspace/manuskript.olivierkes/bin/../manuskript/load_save/version_1.py", line 657, in loadProject
    files[os.path.join(p, f)] = fo.read()
  File "/usr/lib/python3.5/codecs.py", line 321, in decode
    (result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x80 in position 3131: invalid start byte
----- end snippet -----

There are at least two known situations in which files with
non-unicode characters can arise:

A. The project is on Mac OS X and the operating system automatically
   creates a .DS_Store file.

B. The project is under git version control and contains a .git
   subdirectory.

This enhancement prevents the Manuskript crash on project load by
ignoring all directory and file names that start with a period.
2018-01-14 11:51:50 -07:00
JackXVII fe617f871f Adds moving World items. #219 2018-01-11 23:44:50 +03:00
JackXVII 42bda30331 Fix bug in worldModel
Because of this bug treeView could not properly hide the columns
2018-01-11 22:36:42 +03:00
Olivier Keshavjee 3c140d755f Adds "Sentence mode" to Focus mode. #259 2017-12-15 20:56:40 +01:00
Olivier Keshavjee 19f8938852 Corrects bug in links tooltips 2017-12-15 20:12:51 +01:00
Olivier Keshavjee a6a82d1bba Clickable links: adds tip to tooltip 2017-12-14 15:06:51 +01:00
Olivier Keshavjee cd8ad6cc3a Adds: clickable links, and display images as tooltips (#22, #215) 2017-12-14 14:55:14 +01:00
Olivier Keshavjee e76b9b4a1c Another take on status bar (#262) 2017-12-08 10:20:33 +01:00
Olivier Keshavjee 1764baf292 Fixes a bug introduced when fixing #261 2017-12-06 18:53:42 +01:00
Olivier Keshavjee d521fc0771 Fixes #261: Manuskript response slow with recent addition of focus mode 2017-12-06 18:41:26 +01:00
Olivier Keshavjee 5e2ac47dcc Fixes #260: Organize Menu is not disabled on startup 2017-12-06 08:55:52 +01:00
Olivier Keshavjee 46384b68eb Fixes bugs in focus mode (#259) 2017-12-05 23:45:16 +01:00
Olivier Keshavjee 826d53933f Adds #259: Focus Mode (poke #234) 2017-12-05 23:18:32 +01:00
Olivier Keshavjee 3998ed68d3 Fixes #249: Ctrl+tab gets trapped in Debug tab 2017-12-04 14:50:09 +01:00
Olivier Keshavjee 3cdb2f8f25 Hides Navigation Dock's title bar 2017-12-04 14:18:58 +01:00
Olivier Keshavjee 17f341fe85 Hides debug tab, and fixes #253: French Tab in English Mode 2017-12-04 14:12:00 +01:00
Olivier Keshavjee 25911876eb Fixes #246: Index card status can spillover 2017-12-04 13:52:58 +01:00
Olivier Keshavjee 9cbd8887c7 Fixes #240: Cannot write a summary on a plot resolution step 2017-12-04 13:27:57 +01:00
Olivier Keshavjee 9c635301b5 Adds #223: command line parameter to open project 2017-11-30 17:47:23 +01:00
Olivier Keshavjee ca39121826 UI tweaks 2017-11-30 17:18:53 +01:00