Damien Elmes
9038015f4f
formatting fix
2020-12-18 10:27:32 +10:00
Damien Elmes
b13f6d4931
document ANKI_PROFILE_CODE and add bazel command to run snakeviz
2020-12-17 12:03:24 +10:00
Damien Elmes
7e655614b2
fix remaining _() references; remove unused imports
2020-11-18 12:43:46 +10:00
ianki
28ad68d490
Add hooks for filtering media.
2020-11-09 02:12:23 -08:00
Damien Elmes
ce3b08ac58
initial Bazel conversion
...
Running and testing should be working on the three platforms, but
there's still a fair bit that needs to be done:
- Wheel building + testing in a venv still needs to be implemented.
- Python requirements still need to be compiled with piptool and pinned;
need to compile on all platforms then merge
- Cargo deps in cargo/ and rslib/ need to be cleaned up, and ideally
unified into one place
- Currently using rustls to work around openssl compilation issues
on Linux, but this will break corporate proxies with custom SSL
authorities; need to conditionally use openssl or use
https://github.com/seanmonstar/reqwest/pull/1058
- Makefiles and docs still need cleaning up
- It may make sense to reparent ts/* to the top level, as we don't
nest the other modules under a specific language.
- rspy and pylib must always be updated in lock-step, so merging
rspy into pylib as a private module would simplify things.
- Merging desktop-ftl and mobile-ftl into the core ftl would make
managing and updating translations easier.
- Obsolete scripts need removing.
- And probably more.
2020-11-01 14:26:58 +10:00
Damien Elmes
874366fce7
formatting fix
2020-10-12 12:37:51 +10:00
Henrik Giesel
0f09258e68
Add fields_did_rename_field and fields_did_remove_field hooks
2020-10-11 19:16:30 +02:00
Henrik Giesel
716f8a103c
Add editor_did_init_left_buttons gui_hook
2020-10-04 22:50:02 +02:00
Henrik Giesel
306424455c
Add some documentation to sync_did_finish hook
2020-09-14 13:18:16 +02:00
Henrik Giesel
a685272e16
Add sync_will_start and sync_did_finish hook
2020-09-14 12:22:01 +02:00
Damien Elmes
130f99fe44
fix some lints
2020-09-01 10:24:38 +10:00
Damien Elmes
fcf63205b6
add a hook to support extending external .html files
2020-09-01 10:24:38 +10:00
Damien Elmes
2411e944e4
drop the old sass vars and define the properties directly
2020-09-01 10:24:38 +10:00
Damien Elmes
a6aaaf8691
move _vars to outer ts folder
...
First step in sharing styling with graphs + future .html files
2020-09-01 10:24:38 +10:00
Henrik Giesel
87bcc39a77
Some minor reformatting to satisfy black
2020-08-31 13:50:59 +02:00
Henrik Giesel
31b2d46247
Fix type signature: models is passed because it's a method
2020-08-31 13:35:18 +02:00
Henrik Giesel
2a4f0edfe7
Don't import models in gui_hooks to avoid circular import
2020-08-31 13:35:18 +02:00
Henrik Giesel
6ee503742f
Add compiled hook model_did_init_buttons
2020-08-31 13:35:18 +02:00
Henrik Giesel
6d2f2282d2
Add gui_hook models_did_init_buttons
2020-08-31 13:35:01 +02:00
Damien Elmes
8729edffbb
update to latest black
2020-08-31 13:29:28 +10:00
Damien Elmes
5adc3eff6f
Merge pull request #735 from brownbat/master
...
Add hook for initializing answer buttons
2020-08-21 12:34:14 +10:00
Thomas B
e7e67e0c87
Fix other docstring to match.
2020-08-20 10:33:46 -04:00
Thomas B
a54135c5ac
Fixing type hints
...
Matched all type hints, changed the original Sequence[] type hint for _answerButtonList() in reviewer.py on mypy's recommendation.
2020-08-19 16:15:49 -04:00
Thomas B
8b95ab5441
Bugfix proposed filter post-testing
...
Mirrored filter more closely on _ReviewerWillAnswerCardFilter, including taking and returning the value to be modified.
2020-08-18 10:37:45 -04:00
Henrik Giesel
1f4e604e2b
Rename to should_require_reset
2020-08-16 18:56:32 +02:00
Henrik Giesel
4f37e6196b
Update signature of main_window_will_require_reset hook
2020-08-16 18:56:32 +02:00
Henrik Giesel
28528fc3ec
Add main_window_will_require_reset hook
2020-08-16 18:56:32 +02:00
Thomas B
830ab9cedb
Add hook for initializing answer buttons
2020-08-14 13:52:20 -04:00
Arthur Milchior
110f4c664f
Any removed
2020-08-12 01:37:21 +02:00
Henrik Giesel
7d1d20cbf4
Add editor_will_munge_html hook
2020-08-08 23:27:58 +02:00
ANH
9a768fc198
fix typo
2020-07-31 04:41:49 +03:00
ANH
0eb48d3603
document hooks
2020-07-31 03:06:13 +03:00
ANH
23d0008a6f
add reviewer_will_play_question_sounds and reviewer_will_play_answer_sounds hooks
2020-07-30 22:20:19 +03:00
Glutanimate
7056765179
Fix type annotation for old stats dialog class
2020-07-17 03:08:09 +02:00
Glutanimate
b7c8374095
Add a couple of hooks to trigger add-on actions before showing stats
2020-07-16 21:48:46 +02:00
Glutanimate
ee8696cbf3
Add top_toolbar_did_redraw hook
...
Notifies add-ons of the top toolbar being redrawn
2020-07-10 17:38:40 +02:00
Arthur Milchior
f9b0f6e7b3
hook: history_line
...
I expect to use this hook to create an add-on which will simply remove
the ",,". By ignoring empty fields I expect to make this easier to
use.
2020-06-08 20:47:01 +02:00
evandrocoan
0ca8cd4e4d
Add missing quotes to typecheck-setup.sh for paths with spaces on
...
the name.
2020-06-02 21:37:58 -03:00
Damien Elmes
86689c5e77
more fixes for bundled Qt types
2020-06-03 09:55:30 +10:00
Damien Elmes
7716e3b17e
Switch to PyQt 5.15's (slightly broken) built-in stubs
2020-06-02 17:52:18 +10:00
Glutanimate
96b3b29a6f
Add main_window_did_init hook and clarify difference to profile_did_open
2020-05-28 13:30:22 +02:00
Henrik Giesel
91d7cd29b2
Satisfy black reformatter
2020-05-23 11:14:52 +02:00
Henrik Giesel
ae57c6fbeb
Add three deck config hooks
...
- gui_hooks.deck_conf_did_add_config
- gui_hooks.deck_conf_will_remove_config
- gui_hooks.deck_conf_will_rename_config
2020-05-22 21:24:05 +02:00
Damien Elmes
d31f2d8c23
move deck/notetype update hooks to gui
...
We need to migrate away from firing hooks in libanki, since libanki
methods may be running on a background thread, and hook consumers
typically expect the code to run in the main thread. We could document
it, but it would frequently be forgotten about, and could lead to
crashes.
https://anki.tenderapp.com/discussions/ankidesktop/41748-qobject-cannot-create-children-for-a-parent-that-is-in-a-different-thread-when-hitting-the-save-button-on-clayoutpy-window
2020-05-22 10:47:14 +10:00
Damien Elmes
b3e8c63d65
update missed storage._Collection references
2020-05-20 19:45:46 +10:00
Damien Elmes
1e3080ebdc
update empty cards hook
...
Closes #515
2020-05-20 13:41:09 +10:00
Arthur Milchior
952d943440
hook add_card_did_init
2020-04-03 11:03:08 +02:00
Damien Elmes
0359a6ae38
tweak hook name
2020-04-01 17:13:08 +10:00
Arthur Milchior
102670a5a6
hook tag_editor_received_a_key
...
I expect it to be useful for add-ons such as
https://github.com/fonol/anki-search-inside-add-card which interact
with the tag line
2020-03-31 15:05:41 +02:00
Damien Elmes
2fdca03043
Merge pull request #531 from Arthur-Milchior/browser_will_show_context_menu
...
hook browser_header_will_show_context_menu
2020-03-28 14:50:02 +10:00