mirror of
https://github.com/olivierkes/manuskript.git
synced 2024-05-17 11:22:28 +12:00
97cf0e1373
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... |
||
---|---|---|
.. | ||
converters | ||
exporter | ||
functions | ||
importer | ||
load_save | ||
models | ||
tests | ||
ui | ||
__init__.py | ||
enums.py | ||
loadSave.py | ||
main.py | ||
mainWindow.py | ||
settings.py | ||
settingsWindow.py | ||
version.py |