Anki/qt/aqt
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
..
browser Track Current Deck Context from Browser (#3385) 2024-09-22 18:02:17 +10:00
data Fix ease button alignment (#3404) 2024-09-11 02:44:11 +07:00
forms Integrate AnkiHub Sign-in (#3232) 2024-08-17 10:58:23 +07:00
import_export Fix imports of decks with file paths using special URL characters (#3377) 2024-08-29 17:19:27 +07:00
operations Update type annotations (#3322) 2024-07-26 17:57:25 +07:00
qt Improve exception handling (#3290) 2024-08-04 20:51:13 +07:00
__init__.py Fix Qt desktop file name warning (#3419) 2024-09-22 18:02:35 +10:00
_macos_helper.py Update type annotations (#3322) 2024-07-26 17:57:25 +07:00
about.py Add Eros to about 2024-08-28 23:25:00 +07:00
addcards.py Track Current Deck Context from Browser (#3385) 2024-09-22 18:02:17 +10:00
addons.py python: add missing type annotations for None values (#3364) 2024-08-22 16:03:44 +07:00
ankihub.py Integrate AnkiHub Sign-in (#3232) 2024-08-17 10:58:23 +07:00
changenotetype.py Update type annotation syntax (#3283) 2024-07-21 14:00:52 +07:00
clayout.py Update type annotation syntax (#3283) 2024-07-21 14:00:52 +07:00
colors.py Move away from Bazel (#2202) 2022-11-27 15:24:20 +10:00
customstudy.py Update type annotation syntax (#3283) 2024-07-21 14:00:52 +07:00
dbcheck.py Ensure DB check tooltip appears in main window 2024-04-30 23:21:41 +10:00
debug_console.py fix: add proper imports (#3296) 2024-08-05 11:34:46 +07:00
deckbrowser.py Bump Python deps 2024-07-06 18:40:37 +07:00
deckchooser.py fix: add proper imports (#3296) 2024-08-05 11:34:46 +07:00
deckconf.py Improve exception handling (#3290) 2024-08-04 20:51:13 +07:00
deckdescription.py Update Python deps 2023-03-31 14:04:05 +10:00
deckoptions.py If deck options are modified, ask before closing (#3410) 2024-09-22 18:07:24 +10:00
editcurrent.py Fix field focus lost when pressing alt in the editor (#3378) 2024-08-29 17:32:24 +07:00
editor.py Add an option to show image from editor in folder (#3412) 2024-09-20 21:38:44 +10:00
emptycards.py Rework & unify webview identification and title setting (#2366) 2023-02-10 14:53:11 +10:00
errors.py fix: add proper imports (#3296) 2024-08-05 11:34:46 +07:00
exporting.py Update type annotation syntax (#3283) 2024-07-21 14:00:52 +07:00
fields.py Update type annotation syntax (#3283) 2024-07-21 14:00:52 +07:00
filtered_deck.py Use seconds instead of minutes for preview delay 2023-12-21 11:02:29 +10:00
flags.py Introduce new color palette using Sass maps (#2016) 2022-09-16 14:11:18 +10:00
gui_hooks.py Move away from Bazel (#2202) 2022-11-27 15:24:20 +10:00
importing.py Updated error message to provide help for import if 'Legacy Import/Export' is enabled (#3399) 2024-09-11 02:06:35 +07:00
legacy.py Import submodules directly (#1662) 2022-02-13 13:40:47 +10:00
log.py Add support for python logging (#2969) 2024-02-11 16:41:50 +10:00
main.py Call the profile_did_open() hook earlier (#3421) 2024-09-20 21:22:27 +10:00
mediacheck.py Update type annotation syntax (#3283) 2024-07-21 14:00:52 +07:00
mediasrv.py Feat/FSRS Simulator (#3257) 2024-08-22 15:34:19 +07:00
mediasync.py Update type annotations (#3322) 2024-07-26 17:57:25 +07:00
modelchooser.py Update type annotations to use | operator (#3323) 2024-07-26 18:15:39 +07:00
models.py Add maximize hint for models.py (#3151) (#3328) 2024-08-05 15:21:18 +07:00
mpv.py Update type annotations to use | operator (#3323) 2024-07-26 18:15:39 +07:00
notetypechooser.py Update type annotation syntax (#3283) 2024-07-21 14:00:52 +07:00
overview.py Update type annotations (#3322) 2024-07-26 17:57:25 +07:00
package.py Improve exception handling (#3290) 2024-08-04 20:51:13 +07:00
preferences.py Integrate AnkiHub Sign-in (#3232) 2024-08-17 10:58:23 +07:00
profiles.py Ensure profile name is treated in a case-insensitive manner (#3372) 2024-08-22 17:35:48 +07:00
progress.py python: add missing type annotations for None values (#3364) 2024-08-22 16:03:44 +07:00
props.py Move away from Bazel (#2202) 2022-11-27 15:24:20 +10:00
py.typed mark anki and aqt modules as having typing info 2020-01-13 13:03:37 +10:00
reviewer.py mypy: fix type checking error (#3365) 2024-08-29 17:07:06 +07:00
schema_change_tracker.py Add ability to restore a notetype to its original configuration (#2472) 2023-04-18 14:07:51 +10:00
sound.py fix: add proper imports (#3296) 2024-08-05 11:34:46 +07:00
stats.py fix: add proper imports (#3296) 2024-08-05 11:34:46 +07:00
studydeck.py Update type annotations (#3322) 2024-07-26 17:57:25 +07:00
stylesheets.py Workaround Ubuntu ignoring tooltip palette in dark mode 2023-05-31 15:19:10 +10:00
switch.py python: add missing type annotations for None values (#3364) 2024-08-22 16:03:44 +07:00
sync.py Integrate AnkiHub Sign-in (#3232) 2024-08-17 10:58:23 +07:00
tagedit.py fix: add proper imports (#3296) 2024-08-05 11:34:46 +07:00
taglimit.py Update type annotation syntax (#3283) 2024-07-21 14:00:52 +07:00
taskman.py fix: add proper imports (#3296) 2024-08-05 11:34:46 +07:00
theme.py Update type annotations (#3322) 2024-07-26 17:57:25 +07:00
toolbar.py Update type annotation syntax (#3283) 2024-07-21 14:00:52 +07:00
tts.py Improve exception handling (#3290) 2024-08-04 20:51:13 +07:00
undo.py Dependency updates (#3040) 2024-02-28 16:28:04 +07:00
update.py Fix update suppression 2024-01-09 14:12:26 +10:00
utils.py Add an option to show image from editor in folder (#3412) 2024-09-20 21:38:44 +10:00
webview.py Hide right click copy option in deck list (#3363) 2024-08-17 13:18:46 +07:00
widgetgallery.py Improve debug console (#2435) 2023-03-15 15:29:05 +10:00
winpaths.py run pyupgrade over codebase [python upgrade required] 2021-10-04 15:05:48 +10:00