Damien Elmes
fee486aaa1
PEP8 notes.py
...
An example of how we can start migrating the codebase to PEP8:
- enable invalid-name at the top
- use bazel run pylib:pylint to identify names that need renaming
- use PyCharm or similar to rename the functions/variables
- in the cases where the conversion is not just snake_case, use
.register_deprecated_aliases()
+ removed the __repr__() definition, it dumps all the note content
and obscures the error message
2021-06-26 11:38:59 +10:00
Damien Elmes
7e358707e5
Merge pull request #1254 from RumovZ/sidebar-menu-hook
...
Add hook "browser_sidebar_will_show_context_menu"
2021-06-26 08:42:59 +10:00
Damien Elmes
7099b6ea49
revert to % format string to avoid breaking add-on
...
partially reverts d8c3e71105
https://forums.ankiweb.net/t/anki-2-1-45-beta/10664/50
2021-06-26 08:39:16 +10:00
Damien Elmes
fb5e8d5f3b
fix error when user confirms adding cloze to basic type
2021-06-26 08:35:24 +10:00
RumovZ
17009638c1
Add hook "browser_sidebar_will_show_context_menu"
2021-06-25 17:01:17 +02:00
hikaru-y
ac47ef54a2
Set background-color of body to var(--window-bg)
...
required to emulate day mode in clayout
if background-color is not set in .card styling
2021-06-24 23:47:14 +09:00
hikaru-y
342f75f0f6
Toggle night-mode class of documentElement when action triggered
2021-06-24 23:47:06 +09:00
hikaru-y
4bff3f4854
Set --window-bg of day/night mode to proper colors
...
including the following changes:
- rename "_getWindowColor" to "get_window_bg_color" to follow PEP8
- add "night_mode" argument to "get_window_bg_color"
- make it possible to get the correct colors regardless of the current theme
2021-06-24 23:46:48 +09:00
hikaru-y
fa0e3540eb
Store default palette before "fusion" QStyle is applied
...
Once a QStyle different from the system default is applied, the system default palette can no longer be retrieved with standardPalette().
2021-06-24 23:46:11 +09:00
Damien Elmes
0e3ada4fcf
fix pin toggle causing saved tags to get lost
2021-06-24 20:16:21 +10:00
Damien Elmes
a190697fd7
v3 scheduler: experimental -> beta
2021-06-24 14:46:09 +10:00
Damien Elmes
8e5e277ee4
don't wait for images before revealing
...
Currently there's a nasty blink when revealing the answer if the answer
has images on it, as the entire card is hidden, and not shown again until
the images have loaded. This patch removes the wait, so text should appear
more quickly, but it will mean the images may pop in.
We still wait for images before scrolling, to avoid a scroll to the wrong
location.
There's plenty of scope to improve this further - preloading images,
rendering MathJax in advance, etc, but those changes will need to wait
for now. #1120 has some related discussion.
2021-06-24 12:22:25 +10:00
Damien Elmes
114eec6585
allow customization of default search text
...
https://forums.ankiweb.net/t/whats-the-default-search-when-browsing-now-also-how-do-i-choose-to-browse-current-deck/8922
2021-06-24 11:24:30 +10:00
Damien Elmes
d85f978b72
drop crash.log support
...
I don't recall it ever helping to resolve a bug, and presumably we can
still use it in the future via the PYTHONFAULTHANDLER env var if
necessary.
2021-06-24 10:08:31 +10:00
Henrik Giesel
d5b44654b0
Call update_notetype_legacy after toggling sticky
2021-06-21 15:48:22 +02:00
Damien Elmes
c79f8ba88f
in/out -> request/response
...
The saved characters weren't worth the increased difficulty when
reading, and the fact that we were deviating from protobuf norms.
2021-06-20 15:49:20 +10:00
Damien Elmes
2e53dc63c8
Merge pull request #1230 from RumovZ/fields-check
...
Check for misplaced or missing clozes when adding and in the editor
2021-06-17 21:26:16 +10:00
Damien Elmes
d0ca61a608
show correct card count when removing multiple templates
...
https://forums.ankiweb.net/t/error-in-card-type-deletion/10868
2021-06-17 15:51:21 +10:00
Henrik Giesel
3aebae9f13
Allow inclusion of external icons into aqt/forms/icons
...
+ Replace old tag icon with mdi tag and tag-off icon
2021-06-16 17:19:21 +10:00
Henrik Giesel
c5faf39d7c
Make Browser root nodes use "_*" uniformly
2021-06-16 17:19:21 +10:00
RumovZ
0f549d2b82
Merge cloze hint divs into one
2021-06-15 08:43:18 +02:00
RumovZ
5574cb1cfe
Make missing cloze a warning again
2021-06-15 08:43:00 +02:00
Thore
066a2e8e1d
Add hook to onDelete in AddonsDialog ( #1232 )
...
* add hook
* add me to CONTRIBUTORS
* adjust hook to comments
* Update CONTRIBUTORS
2021-06-15 10:01:29 +10:00
RumovZ
0033d49646
Fix filtered deck from browser
...
https://forums.ankiweb.net/t/anki-2-1-45-beta/10664/14
2021-06-13 08:59:23 +02:00
RumovZ
d8c3e71105
Add editor hints for cloze errors
2021-06-12 17:35:40 +02:00
RumovZ
9acc03773a
Check for out-of-place/missing clozes when adding
2021-06-12 10:05:42 +02:00
Damien Elmes
d448bd9cb6
prevent cmd+c in webview with empty selection from crashing on macOS
...
https://forums.ankiweb.net/t/command-c-on-crashes-anki-2-1-41-on-mac/10684
2021-06-11 19:58:20 +10:00
Damien Elmes
75917f452b
Merge pull request #1224 from kelciour/mpv-playlist-fix
...
Keep the internal mpv playlist from growing on
2021-06-10 22:28:24 +10:00
Damien Elmes
61e86cc29d
new change notetype implementation for the frontend
...
- changes can now be undone
- the same field can now be mapped to multiple target fields, allowing
fields to be cloned
- the old Qt dialog has been removed
- the old col.models.change() API calls the new code, to avoid
breaking existing consumers. It requires the field map to always
be passed in, but that appears to have been the common case.
- closes #1175
2021-06-10 22:19:24 +10:00
kelciour
c950745ab4
keep the internal mpv playlist from growing on
...
https://forums.ankiweb.net/t/audio-tracks-get-clipped-at-the-end/10289/5
2021-06-10 11:28:57 +03:00
Damien Elmes
2b8bbda55f
when focusing current card, position at top
...
trying out the changes mentioned on
https://github.com/ankitects/anki/pull/1222#discussion_r648051997
2021-06-09 21:01:29 +10:00
Damien Elmes
c5e56a5fe8
ensure current card centered even if it was already visible
...
Otherwise if a user reviews a card while keeping Browse open, the
card may not be centered if it was already in view.
2021-06-08 16:22:56 +10:00
Damien Elmes
5bd2dc65ed
add card info action to reviewer; move note actions together
2021-06-08 14:23:23 +10:00
Damien Elmes
afaaa763ec
don't wait before scrolling to current card
...
https://github.com/ankitects/anki/pull/1222#discussion_r647017566
2021-06-08 12:54:05 +10:00
Damien Elmes
6878d4ca24
fix preferences screen indiscriminately triggering queue rebuild
2021-06-08 12:11:31 +10:00
Damien Elmes
1479957538
fix note changes triggering a queue rebuild
2021-06-08 12:09:35 +10:00
Damien Elmes
df600c094a
Merge pull request #1222 from RumovZ/browser-card
...
Change handling of browser's card parameter
2021-06-08 09:32:43 +10:00
Damien Elmes
0c69854b71
Merge pull request #1221 from kelciour/audio-pause-fix
...
Audio pause fix
2021-06-08 09:23:11 +10:00
RumovZ
8a9c9829e8
Change handling of browser's card parameter
...
If a search is provided execute it, else search for current deck.
Then try to select and scroll to the provided card.
2021-06-07 16:42:17 +02:00
kelciour
63dc301ef0
use 'cycle' command to toggle pause
2021-06-07 01:54:07 +03:00
kelciour
f1d1301fe6
workaround for audio tracks get clipped at the end
2021-06-07 01:45:59 +03:00
kelciour
c352314ed8
fix audio is paused unusual
...
closes #1164
2021-06-07 01:09:44 +03:00
Damien Elmes
e3ce9d05c7
add Rescheduled to Today section of sidebar
...
https://forums.ankiweb.net/t/anki-2-1-45-alpha/10061/105
2021-06-05 12:55:07 +10:00
Damien Elmes
f5fbad2c20
fix CSV import ignoring selected deck
...
This is a stop-gap - once the importing code is refactored, we
should pass in the desired deck directly.
https://forums.ankiweb.net/t/anki-2-1-45-alpha/10061/102
2021-06-04 20:37:45 +10:00
Damien Elmes
8555a977cb
Merge pull request #1218 from cherryblossom000/help-links
...
fix documentation links
2021-06-04 15:44:16 +10:00
Damien Elmes
5d477d7e11
another workaround for timeboxing issue
2021-06-04 15:25:30 +10:00
Damien Elmes
cff8069ef9
remove 'flag ' prefix from flag names
2021-06-04 15:03:17 +10:00
cherryblossom
92fe68abfe
fix documentation links
2021-06-03 16:51:03 +10:00
Damien Elmes
be9bbf2157
catch all recording errors; mention permission
...
https://forums.ankiweb.net/t/i-have-an-error-when-i-try-to-record-of-audio/10483
2021-06-02 12:20:40 +10:00
Damien Elmes
578b1b0552
Merge pull request #1213 from RumovZ/new-flags
...
Add pink, turquoise and purple flags
2021-06-02 11:22:26 +10:00