manuskript/manuskript
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
..
converters Fix typos in code comments, invisible to end-users. 2018-01-29 10:30:41 -07:00
exporter Spelling: Manuscript, could not, process, … No content (#588) 2019-06-06 11:55:24 -06:00
functions Fix crash when setting word Goal on new Text (scene) in Outline pane 2019-07-31 10:46:06 -06:00
importer Fix crash if using a custom pandoc installation 2019-05-20 09:39:45 -06:00
load_save Directory entries in ZIP break loading code 2019-03-12 14:44:51 -06:00
models Fix crash if invalid character is inserted into the text. 2019-05-21 09:52:18 -06:00
tests Fix pytest warning about duplicate name when running tests 2018-11-16 12:52:09 -07:00
ui Fix crash when setting word Goal on new Text (scene) in Outline pane 2019-07-31 10:46:06 -06:00
__init__.py Renaming source folder 2016-02-06 08:38:33 +01:00
enums.py Checkpoint in refactoring outlineItem 2017-11-17 12:16:39 +01:00
loadSave.py Ensure text file open methods use utf-8 encoding 2019-02-27 09:30:16 -07:00
main.py Add support for IPython Jupyter QT Console as a debugging aid 2019-03-29 10:37:53 -06:00
mainWindow.py Track dirty state and have the UI respect it 2019-08-12 10:35:07 -06:00
settings.py Add ability to save fullscreen panel settings 2019-04-02 11:42:25 -06:00
settingsWindow.py Add new language translations to the Settings window 2019-07-14 10:11:52 -06:00
version.py ========== manuskript-0.9.0 ========== 2019-04-04 10:34:25 -06:00