Anki/qt
Arthur Milchior b08e454f57
If deck options are modified, ask before closing (#3410)
* If deck options are modified, ask before closing

This imitates the way the note editor behaves. If a user assumes by
error that chanhges are automatically saved, it ensures they won't
lose them.

Also, this will eventually allows to have the same feature on
AnkiDroid. While, currently, we always ask the user whether they want
to close the deck options, even when there are no modification, which
seems to regularly frustate users (including myself).

I'm new to Svelte, please let me know whether there is a better way to
obtain the information from Svelte state that I missed.

Note that I ensured that only a boolean can be obtained. I didn't
cause the whole state to be accessible. May be useful for some
add-ons, I guess, but risks breaking too much things.

Regarding the deckoptions.py, I tried to imitate addcards.py way to
check whether the add card view can be closed. Reusing the same
function and variable name when possible.

* Update qt/aqt/deckoptions.py (dae)
2024-09-22 18:07:24 +10:00
..
aqt If deck options are modified, ask before closing (#3410) 2024-09-22 18:07:24 +10:00
bundle Add StartupWMClass for anki.desktop 2024-06-01 14:58:47 +07:00
icons move remaining Filter button items into sidebar 2021-02-05 18:58:22 +10:00
mac Ensure ankihelper is rebuilt on arch change 2024-04-03 15:07:50 +07:00
tests Change Anki's version scheme; bump to 23.09 (#2640) 2023-09-07 12:37:15 +10:00
tools refactor: use not in and is not as recommended (#3351) 2024-08-10 17:55:26 +07:00
.isort.cfg Specify Python version for auto-formatters (#3325) 2024-08-04 20:54:14 +07:00
README.md minor doc updates 2020-12-11 22:37:12 +10:00
runanki.py get PyQt working directly with ./run on macOS 2021-10-16 18:07:29 +10:00

Python's Qt GUI is in aqt/