Damien Elmes
f274e85edf
Merge pull request #470 from Arthur-Milchior/accept_card
...
Hook to decide whether a note should be added.
2020-03-20 20:56:04 +10:00
Damien Elmes
a80cafb3cf
Merge pull request #514 from evandroforks/box-sizing_border-box
...
Added box-sizing: border-box; to typeans by default
2020-03-20 20:50:40 +10:00
Damien Elmes
b2aa0756c9
Merge pull request #516 from Arthur-Milchior/hook_models_advanced_will_show
...
Hook models_advanced_will_show
2020-03-20 20:42:14 +10:00
Arthur Milchior
97225a0364
Browser introduce method time_format
...
I expect to use this in my add-on 1243668133 (by monkey patching in
this case) where it would allow to show hours/minutes/seconds... in browser
2020-03-19 22:59:59 +01:00
Arthur Milchior
bfc305fa26
hook backup_is_done
...
I expect to use this hook in add-on 529955533. It'll serve me to
create long term backup at the same time than your backup
2020-03-19 13:21:00 +01:00
Arthur Milchior
b73507344c
Hook models_advanced_will_show
...
This will be useful for add-on 1863928230. I want to let users change
the LaTeX footer/header everywhere.
2020-03-19 12:03:09 +01:00
Arthur Milchior
e4ae41340f
Hook to decide whether a note should be added.
2020-03-19 03:39:53 +01:00
evandrocoan
43f512992d
Added box-sizing: border-box; to typeans by default
...
https://anki.tenderapp.com/discussions/beta-testing/1854-using-margin-auto-causes-horizontal-scrollbar-on-typesomething
2020-03-18 20:31:11 -03:00
evandrocoan
1ade1a1a0f
Fixed moved comment line on qt/aqt/main.py, long variables names on
...
pylib/Makefile and qt/Makefile, and rg --version not going to /dev/null
on .github/scripts/trailing-newlines.sh
2020-03-18 11:36:50 -03:00
evandrocoan
802c5b59cb
Fixed mypy and pylint not building on Windows
...
1. error: unused 'type: ignore' comment
2. Module 'pywintypes' has no 'error' member
3. Module 'win32pipe' has no 'SetNamedPipeHandleState' member,
but source is unavailable. Consider adding this module to
extension-pkg-whitelist if you want to perform analysis based on
run-time introspection of living objects.
2020-03-17 19:48:16 -03:00
evandrocoan
034ac10cf4
Fixed error: Incompatible types in assignment on qt/aqt/main.py
...
aqt\main.py:1437: error: Incompatible types in assignment (expression has type Module, variable has type "LibraryLoader[WinDLL]") [assignment]
_dummy = wintypes
^
2020-03-17 19:48:16 -03:00
evandrocoan
51823bf1ff
Fixed typecheck-setup.sh: sudo: command not found on Windows
2020-03-17 19:48:16 -03:00
evandrocoan
07a24c0d42
Fixed make check for pylint not working on Windows due
...
F:\Python\python.exe: can't open file '/cygdrive/f/anki/pyenv/Scripts/pylint': [Errno 2] No such file or directory
2020-03-17 19:48:16 -03:00
Damien Elmes
dfa10f5a1c
Merge pull request #509 from Arthur-Milchior/type_queue_in_browser
...
adding missing constants in browser file
2020-03-17 21:33:08 +10:00
Damien Elmes
acd3eb9058
Merge pull request #506 from Arthur-Milchior/editor_web_view_did_init
...
Hook editor_web_view_did_init
2020-03-17 20:53:20 +10:00
Damien Elmes
31347ffbaa
Merge pull request #505 from evandroforks/add_typearrow_id
...
Give the 'typearrow' id to the type answer arrow
2020-03-17 20:52:20 +10:00
Arthur Milchior
e7ea8f412f
adding missing constants in browser file
2020-03-17 06:32:46 +01:00
evandrocoan
4bb0a75fe7
Give the 'typearrow' id to the type answer arrow
2020-03-16 00:42:08 -03:00
Arthur Milchior
89bb5fe79b
Hook editor_web_view_did_init
...
I hope to use this in oder to had features to the web view. In
particular, I expect the "spell checking" feature to use it
hopefully. Because currently it's incompatible with other add-on
dealing with the editor
2020-03-16 04:37:07 +01:00
Damien Elmes
c2e14e6c98
fix dupe colour in day mode
2020-03-15 12:20:29 +10:00
Damien Elmes
0ecc189a9b
fix audio getting stuck (2/2)
2020-03-15 09:34:04 +10:00
Damien Elmes
f30853f5ed
fix audio getting stuck (1/2)
...
The problem was caused by stop() doing a spin loop on the main
thread waiting for the completion signal. This prevented Qt's run
loop from executing, and so the completion signal was never delivered,
meaning longer files would time out.
Fixed by reworking the code so that stop() does not block at all -
instead it just sets the termination flag, and AVPlayer does not
unset current_player. Then when the completion callback fires, it
can advance to the next file.
TTS code still needs updating, and the lock should be safe to remove
as the start/stop logic is all on the main thread.
2020-03-15 09:26:31 +10:00
Damien Elmes
e7452300a2
imports
2020-03-14 22:10:27 +10:00
Damien Elmes
8845b05933
make sure audio queue is cleared when transitioning between cards
...
https://anki.tenderapp.com/discussions/beta-testing/1846-anki-2122-beta#comment_48150139
2020-03-14 20:04:40 +10:00
Damien Elmes
522ee8fca7
drop the deck count warning
2020-03-14 19:41:33 +10:00
Damien Elmes
d9923b12ba
fix play icons not appearing in browser preview when autoplay off
2020-03-14 19:29:11 +10:00
Damien Elmes
aad491dbb9
possible fix for invalid handle issue
...
https://anki.tenderapp.com/discussions/ankidesktop/39346-cant-add-audio-on-flash-drive
2020-03-14 18:53:43 +10:00
Damien Elmes
33f312315e
must close progress before displaying error, or user can't click it away
2020-03-14 18:42:03 +10:00
evandrocoan
2e54d315e1
Fixed BeautifulSoup breaking string paths
...
https://anki.tenderapp.com/discussions/ankidesktop/39543-anki-is-replacing-the-character-by-when-i-exit-the-html-edit-mode-ctrlshiftx
2020-03-12 21:19:09 -03:00
Damien Elmes
50516a3074
fix missing zero count styling, and tweak colours
2020-03-12 20:01:25 +10:00
Damien Elmes
6514f18e3a
copy ftl to source folder in extra-po-string as well
2020-03-12 19:53:52 +10:00
Damien Elmes
d457ab0b17
add helper to duplicate a fluent string
2020-03-12 19:53:44 +10:00
Damien Elmes
72bfedbed8
no implicit {} in replacements
2020-03-12 18:02:40 +10:00
Damien Elmes
1b7417595e
add ability to use other path to translation json
2020-03-12 18:02:36 +10:00
Damien Elmes
f0be553e09
add media check window title, use consistent formatting in template
2020-03-12 18:02:22 +10:00
Damien Elmes
2f02867840
Merge pull request #503 from Arthur-Milchior/error_msg_in_schema
...
Error msg in schema
2020-03-11 16:00:47 +10:00
Damien Elmes
fd81fca4aa
fix wrong language selected in prefs screen
2020-03-11 14:58:57 +10:00
Arthur Milchior
5482cafef2
Allow add-on dev to show personalized message.
...
The error should be in "error_msg"
They can show:
* the original error message with {problem}
* the path of the error with {path},
* the value which does not match against the subchema with {error}
* the subschema against which the error occurs with {schema}
Thanks to Glutanimate for the idea https://github.com/ankitects/anki/pull/495#issuecomment-596685227
2020-03-11 01:39:39 +01:00
Arthur Milchior
0b04da6419
snake case for addon_schema
2020-03-11 00:56:14 +01: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
0f4c3ab611
add restore media action
2020-03-10 13:35:09 +10:00
Damien Elmes
6ad2a1f9a3
add empty trash action in aqt
2020-03-10 12:49:40 +10:00
Arthur Milchior
74b2b18966
hook single_addon_selected
2020-03-09 12:45:10 +01:00
Arthur Milchior
4e1838bba8
hook addons_dialog_will_show
2020-03-09 12:45:10 +01:00
Damien Elmes
b1d0945d10
Merge branch 'master' into more_precise_config_error_message
2020-03-09 19:41:26 +10:00
Damien Elmes
bc435b8772
Merge pull request #499 from glutanimate/add-custom-dialogs-to-dialogmanager
...
Allow add-on authors to register their dialogs with the dialog manager
2020-03-09 19:40:34 +10:00
Damien Elmes
722fe70632
Merge pull request #494 from Arthur-Milchior/debug_hook
...
Debug hook
2020-03-09 19:07:36 +10:00
Damien Elmes
93bb5a0bf6
fix missing newline in ftl files
...
https://anki.tenderapp.com/discussions/beta-testing/1836-problem-with-new-translations
2020-03-09 18:58:41 +10:00
Arthur Milchior
c9b89c5394
More precise schema failure message
...
While creating schema for the add-on I used, I realized that my error
message was not precise enough.
For a big configuration such as in "Enhance main window", the message
"None is not of type 'string'" is almost useless.
So I added a path in the json config, to indicate where the error
is. And also which subschema is currently being used.
2020-03-08 16:38:06 +01:00
Glutanimate
05f69272d0
Elaborate more on the use case and requirements for dialog registration
2020-03-07 17:43:21 +01:00
Glutanimate
1ed2ba8983
Allow add-ons to register custom dialogs with the dialog manager
2020-03-07 17:35:09 +01:00
Glutanimate
0f9683a850
Add cursory type annotations for aqt.DialogManager
...
Typing DialogManager._dialogs properly would require more extensive
changes which could break a number of add-ons
2020-03-07 17:29:37 +01:00
Arthur Milchior
5adbc33d4c
hook debug_ran_hook
2020-03-06 15:01:22 +01:00
Arthur Milchior
3319b114de
hook debug_will_show_hook
2020-03-06 15:01:02 +01:00
Damien Elmes
4290bc81eb
Merge pull request #496 from TooYoungTooSimp/patch-1
...
Use anki.consts.SYNC_BASE instead of hardcoded url
2020-03-06 21:22:18 +10:00
Damien Elmes
5f4839a901
Merge pull request #495 from Arthur-Milchior/check_schema_before_accepting
...
add-on config check schema of user config
2020-03-06 21:14:47 +10:00
雷宇辰
a2604b80f5
Use anki.consts.SYNC_BASE instead of hardcoded url
...
Use `anki.consts.SYNC_BASE` instead of hardcoded url in function `MediaSyncer._endpoint`
2020-03-06 18:55:07 +08:00
Damien Elmes
62aa3031b5
fix invert() in packaged builds
...
invert() was working in the QT 5.14 test environment, but failing
in 5.13
2020-03-06 18:02:22 +10:00
Arthur Milchior
01c74bc015
add-on config check schema of user config
2020-03-05 16:31:17 +01:00
Damien Elmes
6bc3462700
fix regression introduced by PR #492
2020-03-05 09:24:26 +10:00
Damien Elmes
94b90d23fb
Merge pull request #493 from glutanimate/type-annotate-editor-card
...
Type-annotate editor.card
2020-03-05 07:26:40 +10:00
Damien Elmes
78e9959e78
Merge pull request #492 from Arthur-Milchior/print_json_decode_error
...
print json decode error message
2020-03-05 07:26:17 +10:00
Glutanimate
3948b778e8
Type-annotate editor.card
2020-03-04 17:41:26 +01:00
Arthur Milchior
85966f42dc
print json decode error message
...
The main point is to allow add-on dev' to debug their own json
2020-03-04 15:29:48 +01:00
Arthur Milchior
bc67268d82
config_unprettify_json
2020-03-04 08:25:14 +01:00
Arthur Milchior
e4986c7784
hook prettify_json
2020-03-04 08:25:14 +01:00
Damien Elmes
669bb3737f
Merge pull request #454 from glutanimate/display-addon-name-in-config-window
...
Display add-on name in add-on configuration window title
2020-03-02 16:59:44 +10:00
Damien Elmes
5cf7d6672e
Merge pull request #476 from Arthur-Milchior/hook_browser_init
...
Hook browser init
2020-03-02 15:40:10 +10:00
Damien Elmes
3d7f643184
Merge pull request #472 from Arthur-Milchior/hook_init_clayout
...
Hook init clayout
2020-03-02 15:39:23 +10:00
Alan Du
6c2dda6c9c
Monkeytype qt/aqt/reviewer.py
2020-03-01 10:16:08 -05:00
Alan Du
96ca469d12
Monkeytype qt/aqt/theme.py
2020-03-01 10:16:08 -05:00
Alan Du
f8c22499cb
Monkeytype qt/aqt/sound.py
2020-03-01 10:16:08 -05:00
Alan Du
eebf5d2a1d
Monkeytype qt/aqt/toolbar.py
2020-03-01 10:16:08 -05:00
Alan Du
cd570eef24
Monkeytype qt/aqt/webview.py
2020-03-01 10:16:08 -05:00
Arthur Milchior
80ba217772
hook for initializing clayout
2020-03-01 11:42:41 +01:00
Arthur Milchior
047e027e01
browser_did_init
2020-03-01 11:39:41 +01:00
Glutanimate
d22ad11224
Display add-on name in add-on configuration window title
2020-02-29 20:15:23 +01:00
Arthur Milchior
f81134830b
move deck_browser hooks apart
2020-02-29 17:01:38 +01:00
Damien Elmes
2db7591b6d
fix shared link
2020-02-29 21:43:37 +10:00
Damien Elmes
7bde0556cb
Merge pull request #473 from evandroforks/fix_docs_urllink
...
Fixed anki website docs link on pylib/anki/consts.py
2020-02-29 21:39:11 +10:00
Damien Elmes
e2c6fd464c
Merge pull request #468 from BlueGreenMagick/fix-comment-setwebexports
...
allow either \ or / in web exports filter
2020-02-29 21:25:12 +10:00
Damien Elmes
8c0d4c8059
restore mpv/mplayer missing warning that got lost in the av changes
...
and ensure the UI doesn't get temporarily stuck after the command fails
2020-02-29 21:20:08 +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
BlueGreenMagick
e46ace5044
match both forward slash and os seperator
2020-02-29 12:36:10 +09:00
evandrocoan
21b66cd86b
Fixed anki website docs link on pylib/anki/consts.py
2020-02-28 22:18:19 -03:00
Arthur Milchior
5c5860eabc
indicate that card_will_show belong to multiple windows
2020-02-28 13:34:48 +01:00
Damien Elmes
a954dc1066
fix _tidy_name() comment
2020-02-28 17:14:47 +10:00
Damien Elmes
368e03e1a8
stop fetching qt translations as part of recompile step
2020-02-27 20:38:05 +10:00
Damien Elmes
493d9899e2
fix echo statement
2020-02-27 20:37:44 +10:00
Damien Elmes
57f9ca787b
dump po data into json to speed up invocations
2020-02-27 20:37:24 +10:00
Damien Elmes
43f5d13ed6
migrate strings with trailing newlines to fluent
2020-02-27 20:36:40 +10:00
Damien Elmes
f4d38f579d
strip whitespace in extracted strings
2020-02-27 17:38:02 +10:00
Damien Elmes
da86c27d05
fix extract-po-string path
2020-02-27 17:37:40 +10:00
Damien Elmes
dc1542c6b5
remove submodule that crept into Alan's patch
2020-02-27 14:33:15 +10:00
evandrocoan
ba3a84f89a
Merge remote-tracking branch 'danielelmes/master' into fix_windows_build
...
# Conflicts:
# CONTRIBUTORS
2020-02-27 00:54:16 -03:00
Alan Du
a63c9e5a9a
Apply mypy improvements to aqt
2020-02-26 22:27:58 -05:00
evandrocoan
dc049ce26a
Merge remote-tracking branch 'danielelmes/master' into fix_windows_build
...
# Conflicts:
# Makefile
2020-02-27 00:20:34 -03:00
Damien Elmes
e04cbfd7f8
Merge pull request #462 from Arthur-Milchior/filter_empty_card
...
Add a hook to change empty cards to delete
2020-02-27 12:53:52 +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
644670d0d6
return a localized error for all error kinds
...
some errors are not yet localized, but now the Python code
doesn't need to think about which property to use
2020-02-27 10:46:24 +10:00
Arthur Milchior
5ff1f3890f
Add a hook to change empty cards to delete
2020-02-26 10:59:34 -08:00
Damien Elmes
cfe4af81cf
add missing short argument to legacy fmtTimeSpan()
2020-02-26 20:36:59 +10:00
Damien Elmes
4983eb8e3d
fix push-i18n
2020-02-26 18:09:06 +10:00
Damien Elmes
46fadc2a82
don't abort build if mo file fails; rename files for consistency
...
Issues are now checked for in CI, so there's no need to break the
build for everyone each time there's a problem with the gettext
catalogs.
2020-02-26 17:47:02 +10:00
Damien Elmes
a634188ec5
fix dark mode target Qt version
2020-02-26 16:53:35 +10:00
evandrocoan
d88e5eb308
Removed the qt/Makefile INSTALL_PYAUDIO variable and
...
created the Makefile SYSTEM_PACKAGES updating README.development
2020-02-25 21:08:05 -03:00
Damien Elmes
65ec9d190d
formatting fixes
2020-02-25 17:56:46 +10:00
Damien Elmes
db69f84c0a
interrupt current audio when autoplay off
2020-02-25 17:49:06 +10:00
Damien Elmes
f71484a444
ensure user doesn't try to export into data folder
...
https://anki.tenderapp.com/discussions/ankidesktop/39008-export-path-accidentally-set-to-collectionmedia-possible-damage
2020-02-25 17:38:49 +10:00
Damien Elmes
06dee0ef08
formatting fix
2020-02-25 17:29:10 +10:00
Damien Elmes
fbbbbd6a7d
tweak rounding
...
- avoid rounding minutes
- round the seconds taken in the card info screen
- provide different precise and imprecise modes, since we need
to display seconds to multiple decimals in some areas
2020-02-25 17:29:06 +10:00
Damien Elmes
fd835d9b64
fix display of 1+ day intervals in review history
...
https://anki.tenderapp.com/discussions/ankidesktop/39189-interval-field-of-card-info-display-wrong-unit
2020-02-25 17:00:02 +10:00
Damien Elmes
32b38bf26d
ensure Anki starts on Windows systems that don't have TTS installed
2020-02-25 16:25:17 +10:00
Damien Elmes
621774559f
don't allow UI scale < 100%
...
Both Windows and Linux installs fail to render properly when the scale
is below 100%:
https://anki.tenderapp.com/discussions/ankidesktop/38909-user-interface-size
Retina Macs do render properly, but they tend to display at appropriate
size out of the box anyway.
2020-02-25 16:20:14 +10:00
evandrocoan
ac4933faca
Merge remote-tracking branch 'danielelmes/master' into fix_windows_build
...
# Conflicts:
# Makefile
2020-02-25 03:16:57 -03:00
evandrocoan
26cdff29ec
Renamed FIND_EXEC to FIND, replaced IS_WINDOWS by specific commands
...
as PYTHON_BIN, ACTIVE_SCRIPT and INSTALL_PYAUDIO.
Fixed echo statements not using @ to suppress double message output.
Deprecated the usage of ECHOCMD := /bin/echo -e because it has no
effect: https://stackoverflow.com/questions/60387684/how-to-make-the-makefile-echos-to-use-bin-echo-e
# Conflicts:
# Makefile
2020-02-25 03:15:11 -03:00
Damien Elmes
0fae85d2b4
don't pick up system dark theme in -alternate Mac build
...
The older Qt doesn't support it properly
2020-02-25 15:46:39 +10:00
Damien Elmes
364f4152a8
change default night mode card background to dark grey
2020-02-25 15:43:56 +10:00
Damien Elmes
22e8b7cd84
use -q instead of --for-msgfmt so older gettext versions don't break
...
I was mainly using it to keep the output tidy anyway
2020-02-25 13:52:40 +10:00
Damien Elmes
2b1c0ad9e4
Merge pull request #458 from glutanimate/add-deck-conf-hooks
...
Add deck options hooks
2020-02-25 13:38:04 +10:00
evandrocoan
47ccd6638d
Added -o pipefail to all set -e ensuring the build fails when some
...
operation with pipe exits error status.
# Conflicts:
# Makefile
2020-02-24 20:18:56 -03:00
evandrocoan
c171104a81
Fixed msgmerge not stopping the shell on error
2020-02-24 17:54:59 -03:00
evandrocoan
87c5316123
Fixed build-mo-files not stopping on build errors
2020-02-24 17:02:27 -03:00
evandrocoan
19f1c98025
Fixed development compilation with Windows 10
...
1. Documented on README.development how to setup the environment
for Windows.
2. Fixed qt/ts/package.json not working due usage of ; instead
of &&
3. Fixed copy-qt-files rsync using Windows paths instead of Unix
ones
4. Fixed Makefile's using Windows Linux Subsystem bash instead of
the Cygwin one.
5. Ensured running the correct pip module by using python -m pip
instead of just pip.
6. Fixed Makefiles using Windows `find` command, instead of the
Cygwin's one (POSIX find).
7. Fixed pyenv sourcing/activate using /pyevn/bin/ instead of
/python/Scripts/ on Windows.
8. Fixed pyaudio not installing/linking with portaudio on Windows
by installing for a patched fork at evandroforks/pyaudio
9. Forked and fixed portaudio not building with Visual Studio 2017
or superior and added the reference for the patched fork on
README.development at evandroforks/portaudio.
2020-02-24 14:59:11 -03:00
Glutanimate
8454e27efb
Use a consistent function signature across load and save hooks
2020-02-24 15:47:48 +01:00
Glutanimate
7cc9311b79
Add deck_conf_did_setup_ui_form hook
...
Called earlier than deck_conf_will_show, allowing add-on authors
to perform UI modifications before the deck config is loaded.
2020-02-24 15:29:23 +01:00
Glutanimate
335047187a
Add hooks for extending the deck options dialog
...
Introduces three new hooks:
* deck_conf_will_show: Allows adding or modifying widgets
* deck_conf_did_load_config: Allows add-on widgets to read from config
* deck_conf_will_save_config: Allows add-on widgets to write to config
2020-02-24 13:42:30 +01:00
Damien Elmes
2f4ee0e523
Merge pull request #456 from Arthur-Milchior/noDefaultDeckInBrowser
...
No default deck in browser
2020-02-24 19:35:49 +10:00
Damien Elmes
b9280ca31e
enable v2 apkg export
2020-02-24 18:54:55 +10:00
Damien Elmes
1afac2492b
fix tr()
2020-02-24 18:37:02 +10:00
Damien Elmes
0a618c40ad
add Tobias to contributors
...
if anyone else is reading this and thinks they should be on the list,
please let me know!
2020-02-24 18:36:37 +10:00
Damien Elmes
cd8d1b5dcd
merge po with pot before building mo
...
fixes errors in strings that have been removed from the template
2020-02-24 15:35:52 +10:00
Damien Elmes
e73157285e
remove old fmtTimeSpan() and associated strings
2020-02-23 18:47:16 +10:00
Damien Elmes
18aa836e0c
check-po-files moved into i18n repo
2020-02-23 18:33:03 +10:00
Damien Elmes
703b9da09c
move the big error message into FTL
...
this works around the issue Pontoon has with saving translations with
trailing newlines, and makes it easier for translators to update in
the future, as the errors are now using markdown
2020-02-23 18:01:34 +10:00
Damien Elmes
7230b6e390
support aqt-specific FTL files
2020-02-23 18:00:13 +10:00
Damien Elmes
515623a293
update extract-po-string
...
- use fluent.syntax for output (only non-plural case for now)
- add confirmation step
2020-02-23 17:58:43 +10:00
Damien Elmes
0e931808c9
translations no longer require an open collection
2020-02-23 14:57:02 +10:00
Damien Elmes
4430c67069
rework Fluent handling
...
- all .ftl files for a language are concatenated into a single file
at build time
- all languages are included in the binary
- external ftl files placed in the ftl folder can override the
built-in definitions
- constants are automatically generated for each string key
- dropped the separate StringsGroup enum
2020-02-23 13:22:50 +10:00
Arthur Milchior
bb86c9dbd6
should(default)deckbedisplayed in snake case
2020-02-22 04:08:01 -08:00
Arthur Milchior
927749d7a6
Remove options for all/allNames
...
Instead, we always see default deck if it has a child
As indicated in https://github.com/ankitects/anki/pull/452
2020-02-22 04:03:42 -08:00
Arthur Milchior
1126ae293e
forceDefault to force_default
2020-02-22 04:01:42 -08:00
Damien Elmes
9744736273
fix comment
2020-02-21 20:10:58 +10:00
Damien Elmes
42939fe0e4
remove unused import
2020-02-21 19:58:54 +10:00
Damien Elmes
49fe080636
add studied_today(), move to statistics.ftl
2020-02-21 18:01:15 +10:00
Damien Elmes
a85bca51b2
don't use implicit $ in extract-po-strings
2020-02-21 17:06:57 +10:00
Damien Elmes
f28b32cf75
split ftl and po syncing scripts
2020-02-21 15:29:38 +10:00
Damien Elmes
f4330cd213
simplify interval display in review log
2020-02-21 15:29:38 +10:00
Damien Elmes
3264f63535
add plural support to extract-po-string
2020-02-21 15:29:38 +10:00
Damien Elmes
2fc15d0d3a
add non-abbreviated timespan translation; update existing short=True calls
...
- drop the '5m3s' special casing done in the card stats screen, and
just use decimals
- change alignment of the review log so that the non-abbreviated
spans are easier to read
2020-02-21 15:29:38 +10:00
Damien Elmes
7b26814922
support variables when importing from gettext
2020-02-21 15:29:38 +10:00
Damien Elmes
598226a5c0
possible fix for race conditions in the sound code
...
https://anki.tenderapp.com/discussions/ankidesktop/39030-erro-ao-adicionar-arquivo-de-udio
the lock should at least ensure _process doesn't disappear in the
middle of our logic, and the longer wait should reduce the chances
of .stop() timing out and allowing multiple audio files to play
Not very happy with the current approach, as in the timeout case
you have multiple threads competing to access the same data
2020-02-21 15:14:09 +10:00
Damien Elmes
abe9f50c14
Revert "Merge pull request #452 from Arthur-Milchior/noDefaultDeckInBrowser"
...
This reverts commit b93d30795c
, reversing
changes made to e16d6055c1
.
More discussion required on https://github.com/ankitects/anki/pull/452
2020-02-21 12:27:39 +10:00
Damien Elmes
b3585502cd
Merge pull request #448 from glutanimate/top_toolbar_links_hook
...
Add a hook for adding links to the top toolbar
2020-02-21 12:18:25 +10:00
Damien Elmes
b93d30795c
Merge pull request #452 from Arthur-Milchior/noDefaultDeckInBrowser
...
No default deck in browser
2020-02-21 12:10:36 +10:00
Glutanimate
496548d886
Refactor ToolbarLink dataclass into create_link arguments
...
ToolbarLink was more of a vestigial left-over from an interim
implementation. This change simplifies link addition and brings
it closer in line with adding buttons in the editor screen
2020-02-20 18:22:31 +01:00
Glutanimate
075a2792f5
Restore gui_hooks changes
2020-02-20 17:05:27 +01:00
Glutanimate
de333cd503
Add ids to all link elements
2020-02-20 16:34:02 +01:00
Glutanimate
a7d56561ba
Rename CenterLink to more generic ToolbarLink and add inline docs
2020-02-20 16:30:22 +01:00
Glutanimate
dfefd67508
Update 'top_toolbar_did_init_links' hook
2020-02-20 16:23:33 +01:00
Glutanimate
e13fee5aa3
Refactor center link creation and link handler registration
...
Uses a CenterLink dataclass to describe individual links, and transforms
them into HTML using create_link, which may also be used by add-ons.
2020-02-20 16:15:50 +01:00
Glutanimate
33f7d7ed50
Merge branch 'master' into top_toolbar_links_hook
2020-02-20 15:17:48 +01:00
Arthur Milchior
0f18e9ee4b
no default in left-side browser
2020-02-19 02:42:04 -08:00
Arthur Milchior
bdcd111d72
Replace g[idx] by variable name
2020-02-19 02:41:57 -08:00
Arthur Milchior
a0bd232cfd
remove default deck from filter list
2020-02-19 02:41:56 -08:00
Damien Elmes
d0ec26709b
pin fcntl, which went missing on Linux in a recent update
2020-02-19 19:59:31 +10:00
Arthur Milchior
bdf10d9649
method shouldBeDisplayed
2020-02-19 01:56:33 -08:00
BlueGreenMagick
8318cb8e0c
fix typo
...
<font> tag was closed by </span>
2020-02-19 17:46:12 +09:00
Damien Elmes
e0951e4cfe
add 'new #' prefix to new cards in the due column
2020-02-18 11:16:15 +10:00
Damien Elmes
8c80e46d80
fix card info screen
2020-02-18 10:59:24 +10:00
Damien Elmes
0309113b0a
fix legacy filter return values being ignored
2020-02-18 09:12:16 +10:00
Damien Elmes
3ea272989b
fix negative number in compat message
2020-02-18 08:27:47 +10:00
Damien Elmes
25ecb5d1f0
Merge pull request #450 from Arthur-Milchior/selectCardInBrowserFromReviewer
...
Current card get selected in browser
2020-02-18 08:27:34 +10:00
Damien Elmes
c5156a0f6b
Merge pull request #449 from glutanimate/html-content-section-hooks
...
Add hooks for modifying HTML body sections in the deck browser and overview screens
2020-02-18 08:20:01 +10:00
Glutanimate
775765ff4f
Complete OverviewContent docs
2020-02-17 16:53:47 +01:00
Glutanimate
f7ae2fa1f7
Add overview_will_render_content hook
2020-02-17 16:49:21 +01:00
Glutanimate
8ff1a2e770
Bundle individual section hooks together into one
...
Uses new dataclass 'DeckBrowserContent'
2020-02-17 16:26:21 +01:00
Arthur Milchior
8ecd606ada
Current card get selected in browser
...
I'm pretty sure it was the way it worked before. I'm surprised that
it's not the case anymore.
If you open the browser from the reviewer, the current card get
selected if it exists. The current note is still entirely displayed.
Personally, I want to know easily which is the current card. Opening
the browser is the easiest way to do it; assuming I can see the
current card selected
2020-02-17 04:10:47 -08:00
Damien Elmes
ca0df4929d
add fallback for tr if collection not open
...
When syncing media on close, the collection may be closed before
media syncing completes.
A better solution in the future will be decouple translations from
the collection object.
2020-02-17 17:39:01 +10:00
Damien Elmes
f940c326c2
fix initial build failing
2020-02-17 15:48:27 +10:00
Damien Elmes
1524e7dcac
split "Due" into three different contexts for translators
2020-02-17 14:41:01 +10:00
Damien Elmes
a2481b18ef
add helper script to extract previous translated string
2020-02-17 13:41:21 +10:00
Damien Elmes
2f199750c0
make sure ftl files get updated
2020-02-17 12:35:55 +10:00
Damien Elmes
e6c8794eb1
fix sync-git
2020-02-17 11:45:56 +10:00
Damien Elmes
d612aa0945
localize some error messages
2020-02-17 11:38:22 +10:00
Damien Elmes
67a741958c
use new i18n infrastructure for more media check / media sync strings
2020-02-17 10:18:20 +10:00
Damien Elmes
f6a881f950
pass progress back as translated string(s)
2020-02-17 08:40:17 +10:00
Damien Elmes
d1e587fca9
add ftl to the build process, and a sync-git script
...
also
- ensure po files are checked when updated
- add start of sync.ftl
2020-02-17 08:40:17 +10:00
Damien Elmes
6c9e9eb330
drop unused threadLocal and noHint i18n code
2020-02-17 08:40:17 +10:00
Damien Elmes
97b9b94fc7
use new file locations for translations
...
- translation files are now stored in a separate repo, and
use a layout compatible with Pontoon
- normalize the language code in aqt, so that old config settings
and command line arguments are correctly handled
- store Qt and gettext translations in separate subfolders
- remove Crowdin scripts
2020-02-17 08:40:17 +10:00
Damien Elmes
1efe9e525c
move Gettext translations into separate repo for Pontoon
2020-02-17 08:40:17 +10:00
Damien Elmes
64445f17df
update translations
2020-02-17 08:40:17 +10:00
Damien Elmes
f6ddcd81df
fix sync deauth
2020-02-17 08:40:17 +10:00
Damien Elmes
5c8e3df612
include report in MediaCheckOutput
2020-02-17 08:40:17 +10:00
Damien Elmes
4c0f216df2
use media.trash for unused media deletion as well
2020-02-17 08:40:17 +10:00
Damien Elmes
4fc898ec1e
accept clicks on the progress dialog close button when updating
2020-02-17 08:40:17 +10:00
Damien Elmes
0c27126817
fix latex render progress; display more frequently
2020-02-17 08:40:17 +10:00
Damien Elmes
49cda5ffbb
rename aqt/media.py to mediacheck.py
2020-02-17 08:40:17 +10:00
Damien Elmes
2d0499580f
if latex fails to render in bulk, show the user the problem
2020-02-17 08:40:17 +10:00
Damien Elmes
9df2a08cb0
new render_all_latex() + gui button; remove some old code
2020-02-17 08:40:17 +10:00
Damien Elmes
c347c9aee8
sort media list
2020-02-17 08:40:17 +10:00
Damien Elmes
6f158c8555
plug new media check in
2020-02-17 08:40:17 +10:00
Damien Elmes
aa832e9117
backend stores media folder/db locations; don't need to pass them in
2020-02-17 08:40:17 +10:00
Damien Elmes
7ae6244f6a
log media DB change registration progress, and allow aborting it
2020-02-17 08:40:17 +10:00
Damien Elmes
5fe1bfc5b4
simplify code by accumulating stats at the source
2020-02-17 08:40:17 +10:00
Damien Elmes
98279add15
defer errors on upload to media check
2020-02-17 08:40:17 +10:00
Damien Elmes
d38c2c12d5
autosync media every ~15 minutes
2020-02-17 08:40:17 +10:00
Damien Elmes
12d009e503
autosync media on close
2020-02-17 08:40:17 +10:00
Damien Elmes
59a7993011
autosync media on startup
2020-02-17 08:40:17 +10:00
Damien Elmes
fdd850c0f0
add extra hook for media sync start/stop
2020-02-17 08:40:17 +10:00
Damien Elmes
de27cf2a63
if toolbar refreshed, make sure not to clear syncing
2020-02-17 08:40:16 +10:00
Damien Elmes
6a64c8dfcc
use enums for some common errors
2020-02-17 08:40:16 +10:00
Damien Elmes
c329759a88
catch DB errors in sync
2020-02-17 08:40:16 +10:00
Damien Elmes
d7e4d10184
constant sync spin speed
2020-02-17 08:40:16 +10:00
Damien Elmes
ec9abf1ce5
pass in endpoint
2020-02-17 08:40:16 +10:00
Damien Elmes
0c124188cd
catch network errors
2020-02-17 08:40:16 +10:00
Damien Elmes
93c768cab9
move more logic into mediasync.py, handle auth errors
2020-02-17 08:40:16 +10:00
Damien Elmes
347ac80086
remove unused code
2020-02-17 08:40:16 +10:00
Damien Elmes
cb0ce4146f
show spinner when media sync active, click to reveal dialog
2020-02-17 08:40:16 +10:00
Damien Elmes
ea4de9a6de
connect media sync progress to Python, add a progress dialog
2020-02-17 08:40:16 +10:00
Damien Elmes
4096d21c07
add add_file() and write_data()
2020-02-17 08:40:16 +10:00
Damien Elmes
57b678a939
put head text after css/js imports so it can override them
...
as discussed in PR #438
2020-02-17 08:38:59 +10:00
Glutanimate
d02de28f21
Add deck_browser_will_render_section hook
...
Allows add-on authors to specifcally target and modify individual
sections of the deck browser HTML body at string composition time.
2020-02-16 19:29:01 +01:00
Damien Elmes
0ec3bbe1af
Merge pull request #447 from glutanimate/browser-sidebar-tree-hooks
...
Add browser_will_build_tree filter
2020-02-16 08:36:28 +10:00
Damien Elmes
990a6c394b
Merge pull request #445 from glutanimate/new-html-view-hooks-2
...
Allow add-on authors to easily inject their own content into Anki's web views – take 3
2020-02-16 08:32:34 +10:00
Glutanimate
621e634bb2
Add a convenience function for creating toolbar links
...
Similar to aqt.editor.Editor.addButton
2020-02-15 23:22:41 +01:00
Glutanimate
18ae9e612e
Add top_toolbar_did_init_links hook
...
Allows extending the links in the top toolbar, in a similar
fashion to editor_did_init_shortcuts
2020-02-15 23:21:23 +01:00
Glutanimate
a8aac761f1
Add browser_will_build_tree filter
...
Allows add-ons to populate the browser sidebar tree with their own
items, and/or take over specific construction stages in their
entirety
2020-02-15 21:03:15 +01:00
Glutanimate
3637f466b4
Update documentation for webview_will_set_content and WebContent
2020-02-15 15:03:58 +01:00
Glutanimate
0e5dea4c9f
Assume that web assets without a specified subpath are under /_anki
...
Maintains compatibility with existing add-ons
2020-02-15 15:03:43 +01:00
Damien Elmes
f7ebb8c28f
Merge pull request #433 from Arthur-Milchior/ints
...
Constants
2020-02-14 08:37:31 +10:00
ijgnd
d0ea2ad749
small fix: store return value for hook in preview
2020-02-13 18:51:11 +01:00
Glutanimate
c86e55d451
Fix "js" parameter type
2020-02-12 22:20:30 +01:00
Glutanimate
c839cda19f
Fix missing "Optional" import and lint
2020-02-12 22:15:44 +01:00
Glutanimate
5bd38ce0a5
Pass CardInfoDialog context to stdHtml
2020-02-12 22:12:45 +01:00
Glutanimate
bbd667b0ff
Add webview_will_set_content hook & update supporting code accordingly
2020-02-12 22:00:13 +01:00
Glutanimate
df2a7b06ef
Refactor web view title setting and add titles to all web views
...
Simplifies debugging web views
2020-02-12 21:03:11 +01:00
Damien Elmes
d0284f759d
fix odd outline in replay button, and center align
...
https://anki.tenderapp.com/discussions/beta-testing/1708-anki-2120-beta#comment_48079637
2020-02-12 09:18:32 +10:00
Damien Elmes
bd9de51e82
study screen -> overview screen wording
...
This is a test change to see how Crowdin handles wording tweaks
2020-02-12 09:02:48 +10:00
Damien Elmes
a029ad9d45
update translations
2020-02-12 08:59:14 +10:00
Damien Elmes
4b0873cc9a
constrain editor and reviewer image width to container width
...
view height still makes more sense in the reviewing screen so images
are relative to the window instead of the document
2020-02-12 08:33:55 +10:00
Damien Elmes
1c677bb9d4
night mode fix for find dupes screen
2020-02-12 08:28:33 +10:00
Damien Elmes
3425bee968
provide easy access to browser from preview/dupes handlers
2020-02-12 08:28:21 +10:00
Damien Elmes
2c4c8d4ab0
tweak wording
2020-02-12 08:14:16 +10:00
Damien Elmes
62c86b2cbe
move export notes action to the notes menu
2020-02-12 08:09:12 +10:00
Arthur Milchior
a087d0e4c4
Adding export option in Browser
2020-02-11 10:50:59 -08:00
Arthur Milchior
617043f632
browser._exporting
2020-02-11 10:50:59 -08:00
Arthur Milchior
272db65f0a
Replace list of deck by "Browser Selection"
2020-02-11 10:50:59 -08:00
Arthur Milchior
a6567da259
if cards are selected, default is apkg
2020-02-11 10:50:59 -08:00
Arthur Milchior
d8669835d8
aqt.exporter takes extra argument cid
2020-02-11 10:49:13 -08:00
Damien Elmes
af26922493
fix error when double-clicking open profile button
...
https://anki.tenderapp.com/discussions/ankidesktop/38670-bug-when-auto-sync-is-enabled-and-open-profile-button-is-double-clicked
2020-02-10 09:32:56 +10:00
Damien Elmes
072b64c819
work around HTML editor race condition on macOS
...
https://anki.tenderapp.com/discussions/beta-testing/1785-cant-see-html-boxes
2020-02-10 09:25:11 +10:00
Damien Elmes
ddebf5741d
ensure the inverted images don't appear over toolbar
2020-02-09 09:30:37 +10:00
Damien Elmes
20c51555a1
support AnkiMobile's drawings in night mode
2020-02-09 09:20:08 +10:00
Damien Elmes
7fcb6b5672
pass instance to webview_did_receive_js_message instead of string
2020-02-09 08:59:29 +10:00
Damien Elmes
5bd67509ae
Merge pull request #441 from Arthur-Milchior/hookRefreshOverview
...
Allow to change main window when overview/deckbrowser is shown
2020-02-09 08:02:41 +10:00
Arthur Milchior
75a8ef832b
Allow to change main window when overview/deckbrowser is shown
2020-02-08 08:09:12 -08:00
Damien Elmes
c8b794e6cc
formatting
2020-02-07 17:55:26 +10:00
Damien Elmes
be6b8cd131
don't filter strong/em; sort list of tags
2020-02-07 17:55:17 +10:00
Damien Elmes
1fbd925f4c
update translations
2020-02-07 13:26:15 +10:00
Damien Elmes
5b01f0dad1
more legible graph colours in night mode
2020-02-07 13:21:46 +10:00
Arthur Milchior
fc5c1fd16a
correct missing french translation
2020-02-05 20:48:30 -08:00
Arthur Milchior
35c8f21eb6
Reformatting through black
2020-02-04 08:47:36 -08:00
Arthur Milchior
957f0c8e8b
QUEUE and TYPE day learn, relearn
2020-02-04 08:47:36 -08:00
Arthur Milchior
45bf763238
QUEUE_TYPE_REV and CARD_TYPE_REV
2020-02-04 08:47:36 -08:00
Arthur Milchior
69436643fe
CARD_TYPE_LRN and QUEUE_TYPE_LRN
2020-02-04 08:47:35 -08:00
Damien Elmes
3f3c1255bf
clearer variable names
2020-02-04 17:10:20 +10:00
Damien Elmes
2ccece86a7
minor wording tweak
2020-02-04 17:06:41 +10:00
Damien Elmes
8dd75edaa9
default human_version to None
2020-02-04 17:03:21 +10:00
Damien Elmes
d200d33aa5
Merge pull request #435 from ijgnd/debug2
...
Extend Copy Debug Info and add human_version to manifest.json
2020-02-04 17:01:50 +10:00
ijgnd
62527f0b54
about.py - some type hints
2020-02-04 04:16:51 +01:00
ijgnd
6e1996f701
Extend Copy Debug Info
2020-02-04 04:16:51 +01:00
ijgnd
de9331a03e
add human_version to manifest.json
...
edit 7586c67 add human_version to manifest.json
2020-02-04 04:16:12 +01:00
Arthur Milchior
a1cc0787d2
QUEUE_TYPE_NEW and CARD_TYPE_NEW
2020-02-03 02:24:37 -08:00
Arthur Milchior
25c579926b
radioCram
2020-02-03 02:24:37 -08:00
Arthur Milchior
fc7636c194
radioPreview
2020-02-03 02:24:37 -08:00
Arthur Milchior
7e0b4522fb
radioAhead
2020-02-03 02:24:37 -08:00
Arthur Milchior
20bb24a641
radioForgot
2020-02-03 02:24:37 -08:00
Arthur Milchior
c3bd167958
radiorRev
2020-02-03 02:24:37 -08:00
Arthur Milchior
da39ef378c
radioNew
2020-02-03 02:24:37 -08:00
Damien Elmes
5d91580ce2
add option to disable audio interrupting
2020-02-03 08:55:14 +10:00
Damien Elmes
ab1f2429a7
formatting
2020-02-02 13:09:02 +10:00
Damien Elmes
91326ec6d9
only apply padding fix to stats screen
...
It was breaking the display of dialogs like the filtered deck screen
2020-02-02 13:07:24 +10:00
Damien Elmes
3c48cbff6f
more contrast on buttons and scrollbars
2020-02-02 12:53:35 +10:00
Damien Elmes
dd9812c7ed
match fusion bars to webview bars, bump size again
2020-02-02 12:25:07 +10:00
Damien Elmes
92888345fb
fix gridline color in macOS dark mode
...
https://anki.tenderapp.com/discussions/beta-testing/1752-beta7-nightmode-issues-on-mac
2020-02-02 12:01:27 +10:00
Damien Elmes
05be20f834
make pylint happy
2020-01-31 14:30:41 +10:00
Damien Elmes
c70badcd5a
only import darkdetect on a Mac
2020-01-31 14:14:54 +10:00
Damien Elmes
77912aa225
mypy+darkdetect fix
2020-01-31 13:45:25 +10:00
Damien Elmes
a4764e2acd
update translations
2020-01-31 13:44:46 +10:00
Damien Elmes
8b68512e0e
when dark mode not active, match fusion buttons
2020-01-31 13:39:52 +10:00
Damien Elmes
b8ad45c4e4
redraw top toolbar when deck list refreshed
...
Just a hack that allows users to click on Decks to adjust the colour
after a macOS theme change.
2020-01-31 13:31:31 +10:00
Damien Elmes
70d085f475
ignore dark mode when running from source, as it doesn't work
2020-01-31 13:30:35 +10:00
Damien Elmes
598ffbd340
maintain separate icon cache for light and dark themes
2020-01-31 13:30:12 +10:00
Damien Elmes
c42e118339
use night mode when dark mode active, using standard macOS theme
2020-01-31 13:15:08 +10:00
Damien Elmes
1552c34bea
put % in spinners
...
fixes the lone % shown for users of the v1 scheduler
2020-01-31 12:19:51 +10:00
Damien Elmes
d48038cc29
ignore immediate=True in progress dialog
...
Instead, set the busy cursor immediately to give the user feedback,
but defer popup for at least 500ms. This will hopefully address the
white flash in night mode on Windows, and prevent progress dialogs
from rapidly appearing and disappearing for short operations.
2020-01-31 08:47:05 +10:00
Damien Elmes
eb6b64f4b1
ignore foreground/background colour in spans when night mode active
...
This prevents pasted text from a standard webpage appearing as
black on white. It could theoretically be made smarter in the future,
but handling all the situations where the background or foreground
colour is not exactly #000/#fff might be tricky.
2020-01-31 08:03:09 +10:00
Damien Elmes
32b279f750
make link/filtered deck colour in night mode more blue
2020-01-31 07:38:14 +10:00
Damien Elmes
083e4a0b66
drop the extraneous svg group
2020-01-31 07:23:35 +10:00
Damien Elmes
396f583e2a
disable elastic scrolling to work around Qt's buggy behaviour on macOS
2020-01-31 07:12:27 +10:00
Damien Elmes
23c6cafb94
add compat soundLink selector back
2020-01-31 07:01:22 +10:00
Damien Elmes
2d5cab6758
add .night_mode as well
...
Please report if this causes any regressions.
2020-01-31 07:00:01 +10:00
Damien Elmes
fb696f3e3b
use SVG for the play icon, and reduce the default size to 40px
2020-01-28 10:11:29 +10:00
Damien Elmes
23f13a312b
update translations
2020-01-27 18:17:59 +10:00
Damien Elmes
7f2109cf04
tolerate branch idx out of range
...
Branches can't be deleted at the moment, but this may change in the
future.
2020-01-27 17:59:40 +10:00
Damien Elmes
cb7a483d32
mac top toolbar looks better with a slightly whiter border
2020-01-27 17:02:40 +10:00
Damien Elmes
b76f153ffd
rework update checks to match latest AnkiWeb API
2020-01-27 17:01:09 +10:00
Damien Elmes
45e8a9a364
fix +ve max versions being marked as disabled
2020-01-27 16:58:12 +10:00
Damien Elmes
9933720994
don't do HTML filtering when pasting urls/text/images
...
fixes
https://anki.tenderapp.com/discussions/ankidesktop/37752-anki-21-wont-play-audio-files-with-a-blank-in-the-title
2020-01-26 19:13:31 +10:00
Damien Elmes
bfb1d5c5f5
fix pylint
2020-01-26 18:57:32 +10:00
Damien Elmes
09e59d7148
style tags area like fields
2020-01-26 18:47:28 +10:00
Damien Elmes
46733e8cd7
remove the extra margin in the editing area so everything lines up
2020-01-26 18:26:03 +10:00
Damien Elmes
41bbc189f6
remove the line at the top of the editor
2020-01-26 18:25:44 +10:00
Damien Elmes
d7d4fcb178
use a darker rather than lighter border in night mode
2020-01-26 18:16:21 +10:00
Damien Elmes
91c2825551
add a (perhaps temporary) tts-voices: filter to show all available engines
2020-01-26 17:35:07 +10:00
Damien Elmes
21cbb5a766
support speed control in tts tags
2020-01-26 14:31:07 +10:00
Damien Elmes
0480879c11
slightly lighter, larger night mode scrollbar
2020-01-26 10:39:53 +10:00
Damien Elmes
e4bbba4ec1
fix webview button alignment on Linux
...
caused by the height: specification inside webview.py
2020-01-26 10:18:24 +10:00
Damien Elmes
e2e7128385
fix tags area and stats buttons in night mode
2020-01-26 09:13:38 +10:00
Damien Elmes
3b8f851854
fix autoplaying of audio in preview screen, and drop extend_and_play()
2020-01-25 16:02:34 +10:00
Damien Elmes
218c033104
respond to play button clicks in preview screen + card layout screen
2020-01-25 16:02:21 +10:00
Glutanimate
44c09db450
Fix formatting error
2020-01-24 15:48:05 +01:00
Glutanimate
68c5fd50f9
Equip Reviewer._showAnswer with hooks covering common add-on usages
2020-01-24 15:36:05 +01:00
Damien Elmes
d428b3b4c0
Merge pull request #429 from zjosua/latex-nightmode
...
Invert LaTeX in night mode
2020-01-24 17:37:12 +10:00
Damien Elmes
f260cfa07e
Merge pull request #428 from Arthur-Milchior/unusedOptional
...
"unused" variable become optional.
2020-01-24 17:28:47 +10:00
Damien Elmes
b4c8eaf4bb
support min/max add-on versions in download and ankiaddon manifest
2020-01-24 17:25:52 +10:00
zjosua
1450d1ca07
Invert LaTeX in night mode
2020-01-24 08:23:27 +01:00
Damien Elmes
f6ef553ba5
move strip_av_refs() into anki.sound
2020-01-24 15:48:40 +10:00
Arthur Milchior
66e1f876d7
"unused" variable become optional.
...
Adding this parameter broke one of my add-on, see
https://github.com/Arthur-Milchior/anki-keep-model-in-add-cards/issues/1
Since those parameters are not used, setting them to None by default,
as was done in some other method, seems acceptable
2020-01-23 21:46:42 -08:00
Damien Elmes
17ebdfc099
extract and flag AV tags as part of the render process
...
We can now show replay buttons for the audio contained in {{FrontSide}}
without having to play it again when the answer is shown.
The template code now always defers FrontSide rendering, as it wasn't
a big saving, and meant the logic had to be implemented twice.
2020-01-24 11:06:11 +10:00
Damien Elmes
e3fb184a84
fix night mode tooltips
2020-01-24 07:55:14 +10:00
Damien Elmes
cc648195e4
night mode scrollbars in webviews
2020-01-24 07:41:39 +10:00
Damien Elmes
73a5233f92
fix link colour
2020-01-24 07:17:24 +10:00
Damien Elmes
3ecc572103
fix filtered deck colour
2020-01-24 07:17:20 +10:00
Damien Elmes
03a8f0e73b
fix mpv failing to load
2020-01-24 07:06:59 +10:00
Damien Elmes
9804105928
fix white background in day mode
2020-01-23 18:36:42 +10:00
Damien Elmes
406c58a109
inject legacy funcs referencing aqt in GUI load
2020-01-23 18:20:19 +10:00
Damien Elmes
4a25853c57
fix inconsistently sized buttons and add platform classes
2020-01-23 18:05:55 +10:00
Damien Elmes
3acf926fb0
better dupe color
2020-01-23 18:01:29 +10:00
Damien Elmes
b9ee7f49d8
don't wait as long for player to stop
2020-01-23 17:27:07 +10:00
Damien Elmes
d2336f3829
iconFromRef() compat
2020-01-23 17:27:07 +10:00
Damien Elmes
5a79bc69b8
fix audio displaying console window on Windows
2020-01-23 17:27:07 +10:00
Damien Elmes
982aca0c99
fix white flash on webview load
2020-01-23 17:27:07 +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
44f2f16546
move css files to scss
2020-01-23 17:27:07 +10:00
Damien Elmes
95b497ccf0
handle spaces in voices, add platform prefix
2020-01-22 17:50:08 +10:00
Damien Elmes
3f3a8fc4ab
move ignore statements for python 3.7
...
sigh :-(
https://github.com/python/mypy/issues/3251#issuecomment-490298556
2020-01-22 16:54:18 +10:00
Damien Elmes
0ad6e8b58e
make pylint happy
2020-01-22 15:37:58 +10:00
Damien Elmes
cfa0f65311
add a hook for when playback begins
2020-01-22 14:41:32 +10:00
Damien Elmes
6af7933084
make .command() behave the same way for mplayer and mpv
2020-01-22 14:11:25 +10:00
Damien Elmes
be3393fcb4
simplify taskman, and add .run_on_main()
2020-01-22 14:09:51 +10:00
Damien Elmes
8236f800ae
add pause and seek forward/back shortcuts to review screen
2020-01-22 12:50:33 +10:00
Damien Elmes
d54f719558
add a webview_did_receive_js_message hook
2020-01-22 11:06:12 +10:00
Damien Elmes
a5db36e208
add optional result_callback arg to pycmd() definition
2020-01-22 10:28:45 +10:00
Damien Elmes
b870abd2d4
include card ordinal in clayout
2020-01-22 10:28:10 +10:00
Damien Elmes
f92bb55c25
add option in prefs to hide replay audio buttons
2020-01-21 21:00:17 +10:00
Damien Elmes
fd95336933
mypy fixes
2020-01-21 20:42:06 +10:00
Damien Elmes
19b3a15146
formatting fixes
2020-01-21 20:39:25 +10:00
Damien Elmes
37d2a4d43c
add a helper for caching generated files
2020-01-21 20:35:23 +10:00
Damien Elmes
b00a9010be
when matching voices, need to check language matches too
2020-01-21 20:35:00 +10:00
Damien Elmes
ccd7150136
fix mpv args
...
https://anki.tenderapp.com/discussions/ankidesktop/38186-mpvprocesserror-unable-to-start-process
2020-01-21 19:29:50 +10:00
Damien Elmes
5351a5f396
compare only on rank, as voices may be subclassed
2020-01-21 18:33:14 +10:00
Damien Elmes
84711f8fe2
add Windows TTS support
2020-01-21 17:34:47 +10:00
Damien Elmes
7b3d701ad5
add replay buttons to reviewing screen
2020-01-21 14:47:03 +10:00
Damien Elmes
7504ef6857
make sure we don't mutate list passed to play_from_tags()
2020-01-21 14:43:33 +10:00
Damien Elmes
98802c9c9a
deal with spaces in macOS voices like "Bad News"
2020-01-21 13:38:37 +10:00
Damien Elmes
2ac86ac400
add file-based TTS say implementation as well
2020-01-21 13:21:43 +10:00
Damien Elmes
c713683f63
add rank handling to TTS; parse TTS args in get_av_tags()
2020-01-21 12:41:37 +10:00
Damien Elmes
66e277e44b
more TTS and sound work
...
- use provided language and voices when playing on Mac
- fix hang in waiting for termination
- allow players to return a rank for a given tag,
which will allow for the best matching player to be chosen
depending on the context (eg, prioritize one player for videos,
one tts player for certain voices, etc)
2020-01-21 11:34:25 +10:00
Damien Elmes
d4d16d35a8
spawn a new slave mode mplayer for each file
...
This solves a few problems:
- We no longer need to write temporary files to disk, as files
passed on the command line with non-Latin text can be read by mplayer.
- We no longer need to deal with mplayer processes left around in
the background that have failed to terminate.
- We don't need to deal with the added complexity that comes with
polling mplayer's status output to determine when the file has finished
playing.
Also add seek_relative(), toggle_pause() and shutdown() as optional
methods on AVPlayer.
2020-01-21 08:55:15 +10:00
Damien Elmes
01f3fd06d6
support interrupting say; fix race in simple player
2020-01-21 07:28:19 +10:00
Damien Elmes
1beae4f858
pass task manager in instead of creating a new one
2020-01-21 06:49:09 +10:00
Damien Elmes
0b5e22253b
add .stop() to mpv
2020-01-21 06:45:32 +10:00
Damien Elmes
a6e6ffae06
get mpv slave mode working with new API
...
Also move the mpv-specific hooks into AVPlayer
2020-01-20 22:01:38 +10:00
Damien Elmes
d9c240afa2
minor tidyup to sound.py
2020-01-20 21:03:22 +10:00
Damien Elmes
7900f68051
don't need allSounds/stripSounds in qt's sound.py
2020-01-20 20:13:01 +10:00
Damien Elmes
02ec3f149c
update qt/ to use the new API
2020-01-20 20:10:38 +10:00
Damien Elmes
caac4527e9
add a proof of concept TTS implementation on Mac
2020-01-20 20:08:19 +10:00
Damien Elmes
707ac587ec
rework the audio player API and add a simpler player implementation
...
- the new API operates on AVTags so it can support TTS as well as
audio files
- added a simple "run for each file" implementation for mpv and mplayer.
- will need to test handling of unicode filenames on Windows
- the old mpv and mplayer code is currently not active
2020-01-20 20:07:11 +10:00
Damien Elmes
5084438a0b
we can depend on pyaudio being available now that the code is in qt/
2020-01-20 19:21:24 +10:00
Damien Elmes
c9a4626807
update translations
2020-01-19 16:58:34 +10:00
Damien Elmes
b6ed84998d
fix download log newlines
2020-01-19 16:46:24 +10:00
Damien Elmes
02145c7078
fix <br> remaining when image attached to empty field
2020-01-19 16:41:39 +10:00
Damien Elmes
5260e10f8f
leave percent-escaped text from the editor alone
...
Originally added in d7339d9a27b8abd65fbcf85f809fb0089046986f;
unfortunately the change message does not describe why. Images
are handled separately, so it should theoretically not be required,
and keeping it in leads to garbled text when people include %
on their cards.
Latest report at https://anki.tenderapp.com/discussions/ankidesktop/38138-errors-in-conversion-of-latex-and-ea
2020-01-19 16:29:46 +10:00
Damien Elmes
766321d746
avoid setting provided_name if not in the json
2020-01-19 14:10:48 +10:00
Damien Elmes
5d9661cee5
update add-ons even if they're disabled
...
If a user enables an old add-on and restarts immediately, it won't have
had a chance to update, and may raise errors that could have been
prevented if the user was running the latest version.
2020-01-19 14:04:57 +10:00
Damien Elmes
6fe6a9e597
send point version when downloading
...
AnkiWeb will return a 404 if add-on does not support that version
2020-01-19 13:43:16 +10:00
Damien Elmes
66714260a3
automatically disable add-ons that have been marked as incompatible
2020-01-19 13:37:55 +10:00
Damien Elmes
a619130e5e
add write_addon_meta(); use methods for derived values
2020-01-19 13:06:53 +10:00
Damien Elmes
54ca4efb8e
use an object for add-on metadata instead of reading the dict directly
...
also, sort disabled add-ons to the end
2020-01-19 12:44:53 +10:00
Damien Elmes
ef8bb61fc3
AnkiRequestsClient -> HttpClient
2020-01-19 11:33:27 +10:00
Damien Elmes
09e47fbc36
check for add-on updates once a day
2020-01-19 11:31:09 +10:00
Damien Elmes
6134ae9ec6
refactor add-on downloading/installing/updating
...
- web requests done on a background thread
- easier to use outside of the addon dialog
- gets max point version info from AnkiWeb, which we can use in
the future
2020-01-19 10:37:15 +10:00
Damien Elmes
49bba16f24
fix display errors on macOS after updating add-ons
2020-01-19 10:33:51 +10:00
Damien Elmes
a47db0d609
add helper for background execution
2020-01-19 10:06:01 +10:00
Damien Elmes
3287e8c057
pass in a progress callback instead of http_data_did_[send|receive]
...
If a request is happening on a background thread, the GUI code
receiving requests on that thread can lead to a crash
Add-on downloading still to do.
2020-01-18 17:49:59 +10:00
Damien Elmes
0d1a25eb5b
move AnkiRequestsClient into its own file
...
It should still be accessible via anki.sync as well.
2020-01-18 15:45:14 +10:00
Damien Elmes
fa56477205
remove template/ from i18n
2020-01-17 11:14:54 +10:00