Commit graph

559 commits

Author SHA1 Message Date
Tobias Frisch 2545f9c7a3
Merge pull request #793 from FrancoisDuchene/notEnoughArgsFix
Fix for TypeErrors when using certain app styles
2021-04-08 14:46:59 +02:00
Belug 696678e25d Fix #456 - Force the distraction free window to be display on the same screen as the main window 2021-04-07 20:43:37 -04:00
TheJackiMonster 83fae3f286
Fixed LanguageTool spellchecker working with newer versions
Signed-off-by: TheJackiMonster <thejackimonster@gmail.com>
2021-04-04 22:30:33 +02:00
Robert Barlow a266b1bfff
Fixed project not opening with missing background
This is the quick way to patch this. I'd recommend changing the findFirstFile function in functions/__init__.py for a more permanent solution, but this should suffice for now.
2021-04-04 13:48:54 -04:00
Moisés J 1e52af54e2 Add global search 2021-04-02 14:15:17 +01:00
Ling Samuel 41ebf87471
setup signal handler to avoid accident data loss
Signed-off-by: Ling Samuel <lingsamuelgrace@gmail.com>
2021-02-23 16:53:49 +08:00
bentleyjoakes 7e9fbf27fb Properly disconnect add person connection. 2021-02-22 21:31:15 +01:00
TheJackiMonster 3effe5c7fa
Added more consistency to the context menu 2021-02-22 03:18:45 +01:00
nagolinc 22fdab3f46 added 3 buttons to the textEditView that allow quickly adding new items
add character takes parameter name
2021-02-21 20:06:17 -05:00
TheJackiMonster 0cb65c452e
Fixed cursor selection without suggestions 2021-02-22 01:26:07 +01:00
TheJackiMonster ad21d5faa5
Fixed finding suggestions using enchant and word selection without external dictionary 2021-02-22 01:13:19 +01:00
TheJackiMonster d27910449d
Fixed issue #817 with the settings style picking 2021-02-21 23:59:23 +01:00
TheJackiMonster 12be4c3a3d
Fixed all Python syntax warnings 2021-02-21 23:45:34 +01:00
bentleyjoakes 06e35cd969 Clones importance setting.
When creating a new character, sets an appropriate importance level.
* If a character is selected, the new character has the same importance level.
* If a top-level importance level is selected, the new character has that level
* Otherwise, the importance level is zero
2021-02-21 21:09:20 +01:00
Tobias Frisch 13d1f1bddd
Merge pull request #735 from johnbintz/select-newly-added-world-item
Select newly added world items, opening branches as necessary
2021-02-21 18:14:41 +01:00
Tobias Frisch e8c61e74ba
Merge branch 'develop' into optional-pov 2021-02-19 16:02:45 +01:00
TheJackiMonster 61734c1afa
Enabling/Disabling POV for a specific character 2021-02-19 16:01:30 +01:00
Tobias Frisch ca5a987e3c
Merge pull request #747 from TheJackiMonster/languagetool
Added basic support for LanguageTool via 'language_check' as advanced spellchecker
2021-02-19 15:46:47 +01:00
TheJackiMonster ac8cb3e403
Added support for LanguageTool via 'language_check' as advanced spellchecker 2021-02-19 15:44:38 +01:00
Tobias Frisch 1b62288982
Merge branch 'develop' into charcount 2021-02-19 15:08:51 +01:00
Tobias Frisch 30b15b94dc
Merge branch 'develop' into characterscount 2021-02-19 15:05:15 +01:00
FrancoisDuchene bd7b1e96f7 Fix for TypeErrors when using certain styles
When i was using certain styles like cleanlooks or qt5ct-style, a TypeError was raising in cascade about the function not having enough arguments.
It looked like that, despite the last args of Qstyle.subElementRect() and Qstyle.sizeFromContents() were optional, it was still required to mention it (even if it was just None).
That TypeError was only appearing with certain styles, at startup or when changing styles in the settings window.
2020-08-13 19:10:16 +02:00
TheJackiMonster fc653ad74b Added setting to disable counting spaces as chars but requires restart 2020-07-05 01:27:54 +02: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
John Bintz 5ca087a67d Select newly added world items, opening branches as necessary 2020-02-09 10:54:40 -05:00
Curtis Gedak 12defa8fa4 ========== manuskript-0.11.0 ========== 2020-01-18 10:37:45 -07:00
Curtis Gedak 2411409260 Update copyright year 2020-01-18 10:26:14 -07:00
Curtis Gedak a3ee840846 Add new language translations to the Settings window 2020-01-18 10:23:53 -07:00
Curtis Gedak 82169dbf4f Change wording of import warning for PyQt/Qt versions 5.11 and 5.12
Two separate pull requests indicate an issue translating the warning
for when an import is attempted with PyQt/Qt versions 5.11 and 5.12.
As such change the warning message.

See PRs #668 and #701.
2020-01-15 10:01:55 -07:00
TheJackiMonster 9f6b65aaca Fixed bugs caused by parallel access during multithreading 2020-01-06 11:16:02 -07:00
Jan Wester 67f987d44b Fix for Windows 10 Dark Theme on older Qt versions
QtCore.Qt.GlobalColor does not have any accessors for the predefined
colors on PyQt versions before 5.11 despite the object itself existing.

It would have been nice if the documentation* had mentioned that object
being broken on older versions, but I should have tested with even older
versions of PyQt before submitting the original patch.

Apparently the most supported way to access these colors is through the
Qt namespace itself, but those aren't documented in the slightest. Ugh.

My apologies to all those affected. Fixes issue #659.

*: https://www.riverbankcomputing.com/static/Docs/PyQt5/api/qtcore/qt.html#GlobalColor
2019-10-02 09:49:52 -06:00
Curtis Gedak f9970fc09a ========== manuskript-0.10.0 ========== 2019-09-30 09:49:14 -06:00
Curtis Gedak 4784d2b5aa Add new language translations to the Settings window 2019-09-30 09:31:49 -06:00
Jan Wester 7377a34714 Added warning to revision UI 2019-09-29 09:34:48 -06:00
Jan Wester 961bac7e16 UI enforces >=1 revision kept per timespan 2019-09-29 09:34:48 -06:00
leela decb60cbef change markdown to "Markdown" in....
...A universal document converter. Can be used to convert markdown to a wide range of other formats.
see https://en.wikipedia.org/wiki/Markdown
2019-09-29 09:09:31 -06: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 be35786b68 Default keep revisions to disabled, and remove tests for revisions
This commit sets the "keep revisions" setting to disabled by default
for new projects.  It also removes the test cases associated with
revisions.

The revisions feature as currently implemented is of questionable use.
It has been a source of performance issues for users, and has consumed
developer time in attempts to address its shortcomings.  This commit
is the first step to deprecate the current revisions feature.
2019-09-22 10:45:07 -06:00
Curtis Gedak b473ead98e Fix word recognition for spell checker, ignore active partial words
See PR #651

This commit restores the functionality that prevents spell checking a
word that is being actively typed at the end of a paragraph.

The goals for the spell check word match regexp are:

A. Words should include those with an apostrophe
   *E.g., can't*
B. Words should exclude underscore
   *E.g., hello_world is two words*
C. Words in other languages should be recognized
   *E.g., French word familiarisé*
D. Spell check should include word at absolute end of line with no
   trailing space or punctuation
   *E.g., tezt*
E. Spell check should ignore partial words in progress (user typing)
   *E.g., paragr while midway through typing paragraph*

This commit addresses all five of the above goals.

HISTORY:
- See issue #166 and commit 6ec0c19 in the 0.5.0 release.
- See issue #283 and commit 63b471e in the 0.7.0 release.

Also fix minor incorrect utf-8 encoding at top of source file.
2019-09-22 10:28:49 -06:00
Curtis Gedak 10df2baf8d Fix typo missed in two previous commits
See PR #645 and PR #648.

Change second instance in string of "save" to "saved".
2019-09-19 10:38:16 -06:00
luz.paz d20e7a8122 Fix typo missed in previous commit
https://github.com/olivierkes/manuskript/pull/489#issuecomment-533195819
2019-09-19 10:13:15 -06:00
luz.paz 2fd45dc42c Fix misc. typos
Found via `codespell -q 3 -S *.ts,./libs,./sample-projects -L searchin`
2019-09-19 09:58:24 -06:00
Curtis Gedak 0943d81317 Move Qt 5.11 / 5.12 version warning to Import invocation
See issue #611 and pull request #642.

The warning previously added in PR #612 for Manuskript users with Qt
5.11 / 5.12 has shown itself, in my opinion, to be overly annoying.
This is because the warning *always* displays on systems with the
affected Qt versions even though the crash is verified to happen with
the import feature only.

Additionally the process to upgrade to a newer version of PyQt / Qt is
not trivial for users who rely on pre-built packages and do not run
from source code.

Because the crash has been verified with the Import feature only, limit
the scope of the warning to the Import feature.
2019-09-17 10:41:33 -06:00
luz.paz 1368a9b79b Fix source typo
Split off from #489
2019-09-17 10:26:46 -06:00
Jan Wester 5dcd93ced3 Improved detection of UI language
The user can configure a language for Manuskript in the dialog, but
before that setting is ever written to disk, there is the default
behaviour that tries to auto-detect the best language to show based on
the configuration of the device it is running on.

While doing my due diligence on issue #619, I realized we were relying
on the system locale, which is not necessarily equivalent to the
language the user is working with. Worse still: a user can have multiple
preferred languages for their user interface, and our old approach might
actually offer them the 'wrong' language. This patch fixes this.

It also refactors and comments things a little bit where necessary.
2019-09-15 09:21:31 -06:00
Jan Wester 0aa83180de Reworked translation loading to avoid ambiguity
Issue #619 revealed an unintentional overlap between the auto-detection
of the locale and the implicit builtin English language, which resulted
in users being unable to select the builtin English language when their
device was configured with a locale that we happen to have a translation
for. The code has been rewritten to more clearly separate auto-detection
and the final fallback that is the builtin English translations.
2019-09-15 09:21:31 -06:00
Curtis Gedak a2fc4c5ecd Set default window tab to Word frequency for Frequency Analyzer tool
This code change sets:
- Fequency Analyzer tool default first tab of "Word frequency"
  (was Phrase frequency)

Steps to set default window tab:

1. Start Qt Designer
2. Open .ui file
3. Ensure that each selected window tab is the one desired as default
4. Save .ui file
5. Exit Qt Designer
6. Generate .py file with:  make ui

See PR #623
2019-09-13 10:00:29 -06:00
Curtis Gedak 8f4ddefb48 Fix tab key order, and default window tab for character pane and plot pane
This code change sets:
- Character pane default first tab of "Basic info" (was Notes)
- Character pane Basic info "Name" as the default first field (was Motivation)
- Plots pane default first tab of "Basic info" (was Resolution steps)

Steps to edit tab order and default window tab:

1. Start Qt Designer
2. Open .ui file
3. Choose menu **Edit -> Edit Tab Order**
4. Ctrl-click on item just before the first incorrect tab order item
5. Click other items in order until remaining order is correct
6. Ensure that each selected window tab is the one desired as default
7. Save .ui file
8. Exit Qt Designer
9. Generate .py file with:  make ui

See https://doc.qt.io/qt-5/designer-tab-order.html

This code change implements a portion of issue #244
2019-09-13 10:00:29 -06:00
Jan Wester d626d3ba75 Fixed & robustified image tooltips (issue #593)
Last time I touched this code, I went in looking for a specific problem,
and came out with a fix specific to that issue. That fix was not wrong,
yet it hardly covered all the problems present in the code once one took
into account issues like:

- local vs remote resources,
- relative vs absolute paths,
- different operating systems behaving differently, and
- Qt being uniquely buggy on different platforms.

The major part of it was fixed by using QUrl.fromUserInput(), which does
the exact kind of auto-detection for the nature of the resource that we
were in need of.

The rest of the issues were fixed by creating a number of test cases and
fixing problems as they popped up. Testing was done in Windows & Ubunty
against the above-mentioned test cases, which can be found in PR #629.

Regarding ImageTooltip.supportedSchemes

When QUrl.fromUserInput() misidentifies the scheme on Linux, it causes
all resemblance between the original request and the reply.request() in
the finished() signal to be lost, which results in this item getting
stuck in the ImageTooltip processing pipeline.

Limiting the supported schemes to the ones most commonly encountered
('file', 'http', 'https' and the schema-less local paths) is the only
reliable method I have found to work around this particular bug in Qt.
2019-09-10 11:30:35 -06:00