Commit graph

136 commits

Author SHA1 Message Date
TheJackiMonster e62432307f
Make selection adjustment permanent and improve consistency
Signed-off-by: TheJackiMonster <thejackimonster@gmail.com>
2023-03-15 21:06:31 +01:00
tntscreed 92b1e0b648 Made small improvements to the bulk detail manager.
-Cleaned the code up a bit.

-Added warning message before discarding unapplied entries in the bulk manager. The bulk manager now doesn't automatically close when selecting a single (or no) character, but asks for the user's consent.
2023-03-09 16:24:35 +01:00
tntscreed 1fd45ba1d2 Fixed a typo.
The warning message-box for when the bulk manager was empty has been fixed.
2023-03-07 21:56:30 +01:00
tntscreed 953ce4bd15 Multi-Deletion of Characters + Confirmation Dialog
-Since multi-selection of characters is now possible, it's more intuitive that all selected characters should be deleted.

-Added a confirmation dialog before character-deletion? Why the heck  was this not a thing before? It was way too easy to accidentally delete characters, with no way to restore them without external source-control or backups.
2023-03-07 20:56:54 +01:00
tntscreed 06f8ab3519 The bulk info managers is now completely functional.
Also, a change has been made to the character tree view. Theoretically it shouldn't have any functional significance, but "addCharacterInfo" is used for adding info to only one character, so it makes sense to remove the old multi-selection info-adding functionality, even if it wouldn't ever be accessible.
2023-03-07 20:27:16 +01:00
tntscreed 66df68af69 Made the code a little nicer, added addition and deletion
The bulk manager has been made partially functional.
2023-03-07 18:14:01 +01:00
tntscreed b5dfee59d7 Created a (not yet functional) bulk manager widget.
-Some variables had to be declared in the mainWindow.py __init__ function.

-Added functions for creating the bulkPersoInfoManager widget as a tab when multiple characters are selected. All other tabs get stored and deleted, and restored after only one character is selected.

-Started work on functions that create the intended behaviours of the widget.
2023-03-06 21:43:31 +01:00
tntscreed d55e88599d Made multi-selection of characters a bit more intuitive 2023-03-05 17:40:05 +01:00
tntscreed fc86ed5df6 Started work on character multi-selection features.
-Added currentCharacters method, a list counterpart of currentCharacter.

-Replaced the connection for currentItemChanged with itemSelectionChanged. This is to accommodate for the bulk-changes when multiple characters are selected. The currentItemChanged method is now not called with a connection, but from the handleCharacterSelectionChanged method. The latter is called with the itemSelectionChanged connection.

-If no valid characters are selected, the tabPersos widget is disabled. This obviously breaks the functionality of bulk-adding info to characters. This will have to be fixed by only disabling the parts of the tabPersos widget that should not be affected with multiple selection operations.
2023-03-05 14:14:58 +01:00
TheJackiMonster ee76b2d84e
Adjust syntax
Signed-off-by: TheJackiMonster <thejackimonster@gmail.com>
2023-02-09 22:13:01 +01:00
TheJackiMonster 00aca6a0e1
Fix type conversions, replace potentially deprecated function usage and center dialog
Signed-off-by: TheJackiMonster <thejackimonster@gmail.com>
2022-12-10 18:05:41 +01:00
nephlm 0a81ff4960
Merge branch 'develop' into session-target 2022-11-21 01:13:28 -05:00
TheJackiMonster c656911996
Removed snow flake method
Signed-off-by: TheJackiMonster <thejackimonster@gmail.com>
2022-08-10 11:43:32 +02:00
TheJackiMonster dc86e3b14e
Adjusted fixes for python 3.10 to not crash immediately
Signed-off-by: TheJackiMonster <thejackimonster@gmail.com>
2021-12-13 14:27:59 +01:00
TheJackiMonster 77eee852de
Fixed issue #808 by resetting POV once the character gets deleted
Signed-off-by: TheJackiMonster <thejackimonster@gmail.com>
2021-11-30 23:40:31 +01:00
worstje b2817b5f08
Friendly logging for end users (#859)
* Changed default logging behaviour

We now log by default to a timestamped file in $datadir/logs/. No longer
shall restarting Manuskript after a crash wipe a very useful logfile.

Logs older than 35 days in the $datadir/logs/ directory are pruned
during startup. In case of subtle corruption detected a few weeks after
the fact, relevant logs might still exist to explain what had happened...
yet it does not come at the cost of infinitely gobbling up a users
storage space, either.

The --logfile (-L) argument can now utilize strftime() specifiers. A
special modifier %# is also supported which will insert the process id.
Besides being an added factor of uniqueness for a filename, it can also
be relevant to help identify the log file belonging to a misbehaving
Manuskript process.

* Added support-related items to Help menu

The 'Technical Support' item should lead to a landing page that will
guide the user to the most efficient way to resolve their problem.
How to report bugs and submit logs would be one of those.

The 'Locate Log File' item should open a file manager window with the
logfile of this session highlighted. Because Manuskript is still writing
to it, we first remind them of its limited use until Manuskript is
closed.

This approach was chosen because users might want to locate the file
prior to reproducing a bug, or because they'd like to look at other logs
from previous sessions.

* Updated translation files and added german translation

Co-authored-by: TheJackiMonster <thejackimonster@gmail.com>
2021-04-13 13:32:46 +02:00
Belug d22eb3bcb9 Fixing the tests for travis-CI 2021-04-09 19:19:03 -04:00
Alexandre 40e6bf0793
Fix #846 close Fullscreen when exiting main editor (#854)
* Fix #846 close Fullscreen when exiting main screen

* Removing debug code and initializing _fullscreen

* Removing the print
2021-04-09 16:03:31 +02:00
Jan Wester ff2cbca028 Converted most print statements to use logging
Some snippets have yet to be converted due to the more complex nature
of those snippets, and to keep things neat a separate commit makes more
sense for those.
2021-04-08 18:44:28 +02:00
Jan Wester b41fb00b0d Several tiny things squashed into one
All Models should have only one object managing them, and it is not the
class responsible for doing the welcome-related tasks.

Small .gitignore update
2021-04-08 18:28:53 +02:00
Moisés J 1e52af54e2 Add global search 2021-04-02 14:15:17 +01:00
bentleyjoakes 7e9fbf27fb Properly disconnect add person connection. 2021-02-22 21:31:15 +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 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
TheJackiMonster 61734c1afa
Enabling/Disabling POV for a specific character 2021-02-19 16:01:30 +01: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
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
Curtis Gedak f4c8108b28 Do not prompt "Save project?" when _Save on quit_ setting enabled
See PR #615

The Travis CI tests began failing after merging Pull Request #583.

Log snippet:

----------------------------------------------------------------------
...
Ref not implemented
PASSED
manuskript/tests/ui/test_welcome.py::test_autoLoad QXcbConnection: XCB error: 8 (BadMatch), sequence: 613, resource id: 2097162, major code: 42 (SetInputFocus), minor code: 0
QXcbConnection: XCB error: 8 (BadMatch), sequence: 619, resource id: 2097168, major code: 42 (SetInputFocus), minor code: 0
QXcbConnection: XCB error: 8 (BadMatch), sequence: 625, resource id: 2097171, major code: 42 (SetInputFocus), minor code: 0
----------------------------------------------------------------------

When running "pytest -vs" locally, which is a command used in our
.travis.yml file, a dialog to "Save project?" is displayed.  Because
the test scripts use the "saveOnQuit" default setting of *enabled*,
the "Save project?" dialog should not be displayed.

In other words when a call is made to close the project, a "Save
project?" dialog is incorrectly displayed because the dirtyProject
flag is set, but so too is saveOnQuit set to True.  What should happen
is an automatic save with no prompt.  This PR fixes this logic so that
the Travis CI test suite completes successfully.
2019-08-22 15:18:18 -06:00
Jan Wester 34f84126df Fixed race when closing an auto-saving project.
Turning off the timer for saveTimerNoChanges just like the code
already did in closeProject() for saveTimer fixes this bug. Easy.

But how to prevent this kind of race condition in the future?

Several related routines have been adjusted to fail gracefully or report
a bug to the console when something goes wrong, depending on what is
most suitable for that bit of logic.
2019-08-12 10:35:07 -06:00
Jan Wester 97cf0e1373 Track dirty state and have the UI respect it
Intending to learn more about the way Manuskript goes about saving the
project in order to figure out how to tackle some recent saving-related
issues, I stumbled into learning that Manuskript likes to save data a
whole lot. Too much, in fact. When I close the project with unsaved
changes, I expected those changes to not be saved... but they were. This
completely subverts my expectations of a program using typical
file-based operations involving opening, saving and closing files.

There are three more settings that influence when the program saves, and
I personally consider them a bit overkill or even detrimental to the
stated purpose. What if Manuskript forces a save when nothing was
changed and something goes wrong? Saving too much can in fact be
dangerous!

For now, I have left existing functionality as-is, but I would prefer to
respect the dirty flag I have introduced in this commit for at least the
'save-on-quit' and 'save every X minutes' features. (The third is
smarter and only triggers after noticing changes, so it is less
important.)

Making sure the dirty flag works as expected is the first step in making
such changes in the future.

UI-wise, this commit now offers the user the opportunity to save their
changes, discard them, or outright cancel their action entirely when
performing a destructive action on a dirty project. As of this commit, I
have identified two of such scenarios:

1) closing the project,
2) closing the window with save-on-quit turned off.

If I missed any, do let me know. But for now, maybe now I can finally
start digging into those issues that sent me down this rabbit hole...
2019-08-12 10:35:07 -06:00
Youness Alaoui 3dfb43f6c1 Center dialog for the frequency analyzer too. 2019-05-20 09:25:17 -06:00
Youness Alaoui e4da844708 Fix dialog windows being created outside the desktop area
The About/Settings/Import/Export/ExportManager windows were all created
in odd places, usually to the left of the main window, which meant outside the
desktop area with little overlap if the main window is maximized. The logic in
centering the window on its parent was wrong. This fixes it.
2019-05-20 09:25:17 -06:00
Youness Alaoui 4f7c81bbff spellcheck: Handle use case of a dictionary becoming unavailable. 2019-04-30 09:54:31 -06:00
Youness Alaoui f9b181ff67 spellchecker: Improve support for symspellpy
Add support for 6.3.8 which has delete_dictionary_entry and do not use gzipped
pickle. Also give higher priority to symspellpy vs pyspellchecker.
List symspellpy dictionaries by order of cached vs non-cached.
symspellpy 6.3.8 is now the minimum version required and add support for showing
that information to the user.
Also add support for spellcheck libraries that are installed but without dicts.
2019-04-30 09:54:31 -06:00
Youness Alaoui 20c5586a6c Add support for pyspellchecker as an alternative to PyEnchant
This modifies the Spellchecker abstraction to add a new dictionary support, with
support for pyspellchecker. It also changes the main UI so that multiple libraries
can be supported and dictionaries provided to the user. The custom dictionary of
pyspellchecker has to be handled manually, and the performance and words of this
library isn't on par with PyEnchant, but at least it works with 64 bits.

Fixes #505
2019-04-30 09:54:31 -06:00
Youness Alaoui d0f02cb2a7 Add a Spellchecker abstraction layer and clean up code
This is in preparation for adding support for additional spellchecking libraries
other than PyEnchant which seems to be unmaintained and does not build in
Windows 64 bit.
2019-04-30 09:54:31 -06:00
nephlm 4f2d57e86f Issue 459 - session progress/goal window 2019-01-22 00:37:22 -05:00
Curtis Gedak 528ea130ee Remove unimplemented snowflake view mode menu entry
The menu option "View -> Mode -> Snowflake" has not been implemented.
This greyed out / disabled option has caused some confusion for users.
Remove the snowflake menu option to avoid confusion.

Closes issue #419
See also earlier issue #45
2018-11-30 09:42:42 -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
RiderExMachina 5f8168fb37 Moved incorrectly placed parameter to correct place. Closes #377. 2018-09-17 23:32:10 -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 Keshavjee e76b9b4a1c Another take on status bar (#262) 2017-12-08 10:20:33 +01:00
Olivier Keshavjee 5e2ac47dcc Fixes #260: Organize Menu is not disabled on startup 2017-12-06 08:55:52 +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