Commit Graph

41 Commits

Author SHA1 Message Date
Damien Elmes
5ae66af5d2 rework v2 scheduler upgrade; drop downgrade
- Rework V2 upgrade so that it no longer resets cards in learning,
or empties filtered decks.
- V1 users will receive a message at the top of the deck list
encouraging them to upgrade, and they can upgrade directly from that
screen.
- The setting in the preferences screen has been removed, so users
will need to use an older Anki version if they wish to switch back to
V1.
- Prevent V2 exports with scheduling from being importable into a V1
collection - the code was previously allowing this when it shouldn't
have been.
- New collections still default to v1 at the moment.

Also add helper to get map of decks and deck configs, as there were
a few places in the codebase where that was required.
2021-02-21 15:50:41 +10:00
Damien Elmes
bb29ce88f3 minor code cleanups with pyupgrade
- pyupgrade --py38-plus --keep-runtime-typing --keep-percent-format
- third-party mpv and winpaths excluded
2021-02-11 09:43:40 +10:00
Damien Elmes
4a5ef69068 add remaining types and disable missing types on (almost) all aqt 2021-02-03 00:00:29 +10:00
Damien Elmes
a56b09b987 add a bunch of return types 2021-02-01 23:53:23 +10:00
Damien Elmes
6c483bb577 add public wrappers for remaining backend functions 2021-01-31 18:56:16 +10:00
Arthur Milchior
e0a2d90a68 NF: HelpPage in an enum
Hopefully, this can help with updating on next manual update and maybe even linking to manual translation
2021-01-26 02:16:37 +01:00
Damien Elmes
94064b8230 convert setWindowFlags call into helper, and fix invalid variables
"type: ignore" was masking the invalid references to self in places
like showText()
2021-01-07 14:24:49 +10:00
BlueGreenMagick
6224658c0d remove context help button 2021-01-06 22:15:48 +09:00
Damien Elmes
0a633160c5 add video driver enum; allow setting angle+software on mac in prefs 2020-12-22 13:01:06 +10:00
Damien Elmes
729293f5e3 remove voice recording fixme 2020-12-21 16:13:32 +10:00
Damien Elmes
0bc4ea9c4d ask users to report if PyAudio works better for them 2020-12-21 16:04:41 +10:00
Damien Elmes
019a65efc1 drop QtRecorder driver; rename existing 2020-12-21 15:02:22 +10:00
Damien Elmes
038f0a10ec expose recording driver in preferences (at least for now) 2020-12-18 19:49:17 +10:00
cecini
d2ae874d9e fix float to int conversion DeprecationWarning 2020-12-15 13:10:12 +00:00
Damien Elmes
ffa26fe4bc fix remaining _() references; remove unused imports 2020-11-18 12:43:46 +10:00
Damien Elmes
ba336d5de3 update multi-line _() references 2020-11-18 11:32:22 +10:00
Damien Elmes
9d1b6231d7 merge pylib references 2020-11-17 19:23:06 +10:00
Damien Elmes
6418993840 merge bulk of qt/ - designer files still to do 2020-11-17 17:42:43 +10:00
johan456789
06f1aeb052 fix help url paths 2020-10-10 00:38:07 +08:00
Damien Elmes
6a0faac407 deauth -> log out 2020-08-09 14:44:03 +10:00
ANH
03a80e596a add night mode and mobile class toggles in card layout screen 2020-07-30 15:39:02 +03:00
Damien Elmes
4d23a69e9a formatting 2020-07-01 14:01:24 +10:00
Damien Elmes
bedd9dadb1 add option to disable media syncing
https://forums.ankiweb.net/t/error-when-adding-audio-file/495/2
2020-07-01 11:35:24 +10:00
Damien Elmes
38508c3ad7 use keyword args for calls with more than one argument 2020-05-24 09:12:47 +10:00
Damien Elmes
9317cee9ba handle scheduling preferences in the backend 2020-05-12 21:13:34 +10:00
Damien Elmes
eec3fcf87a use qconnect everywhere, and fix some typing issues
a step towards check_untyped_defs in aqt, but there's still 100+
issues to resolve
2020-05-04 13:23:08 +10:00
Damien Elmes
65cfcf9226 pare back dark mode support
Anki now solely relies on the night mode setting in the preferences
to decide whether to show in light or dark mode. Some users wanted
to run Anki in light mode while keeping the rest of their system dark,
and there were various display problems when dark mode was changed
after Anki started that couldn't be easily worked around.

NSRequiresAquaAppearance is set again, which means we can rely on
the interface appearing properly and not changing as the macOS theme
is changed.

Users who only use dark mode, and preferred the native look of widgets
in dark mode, can achieve the previous appearance by running the
following command in the terminal:

defaults write net.ankiweb.dtop NSRequiresAquaSystemAppearance -bool no

And the following in the debug console:

mw.pm.meta["dark_mode_widgets"] = True

This is hidden behind a debug console command because it requires the
user ensure their system is always set to the same light/dark mode
as Anki.
2020-04-15 21:44:56 +10:00
Damien Elmes
c615342130 fix English being shown in prefs for fully qualified langs like zh-CN
https://anki.tenderapp.com/discussions/ankidesktop/39845-a-new-bug-has-been-found
2020-03-23 16:08:06 +10:00
Damien Elmes
75b7ebb156 add back new_timezone_enabled(), as it's used in the prefs screen 2020-03-23 07:40:50 +10:00
Damien Elmes
fd81fca4aa fix wrong language selected in prefs screen 2020-03-11 14:58:57 +10:00
Damien Elmes
131d37dca5 add switch in prefs for new timezone handling code; bump sync version
AD devs: before updating the sync version to 10, please make sure
the new timezone code has been ported over. The core change to the
scheduler is in _updateCutoff():

9736e4a970/pylib/anki/schedv2.py (L1357)

with the following supporting Python functions:

9736e4a970/pylib/anki/schedv2.py (L1410)

 _timing_today() is calculated in Rust (lines up to 92, the rest are
tests):

9736e4a970/rslib/src/sched/cutoff.rs (L20)

The change went through a few iterations before stabilising, so it's
probably easier to refer to the above code than the patches that got
us to that point.
2020-03-10 17:50:18 +10:00
Damien Elmes
56b2cc58ed point user to manual if they're trying to disable night mode in dark mode 2020-02-29 20:44:49 +10:00
Damien Elmes
0c49431719 FString -> TR 2020-02-27 12:25:19 +10:00
Damien Elmes
e439e8cdec add string for media log title, and add button in prefs to access it 2020-02-27 12:22:24 +10:00
Damien Elmes
6c9e9eb330 drop unused threadLocal and noHint i18n code 2020-02-17 08:40:17 +10:00
Damien Elmes
f6ddcd81df fix sync deauth 2020-02-17 08:40:17 +10:00
Damien Elmes
5d91580ce2 add option to disable audio interrupting 2020-02-03 08:55:14 +10:00
Damien Elmes
7dcbc7efec basic night mode support
Forces the Fusion theme when running night mode, so we don't need
to work around platform themes that don't respond to the defined
palette.

Feedback/suggestions on the chosen colours welcome - _vars.scss is the
file to change if you want to experiment with adjustments.
2020-01-23 17:27:07 +10:00
Damien Elmes
f92bb55c25 add option in prefs to hide replay audio buttons 2020-01-21 21:00:17 +10:00
Damien Elmes
4c0b7d37c9 option to invert paste handling in prefs 2020-01-16 12:36:04 +10:00
Damien Elmes
5876866565 tweaking the folder names again
hopefully that's the last of it
2020-01-03 07:48:38 +10:00