Commit graph

3281 commits

Author SHA1 Message Date
Abdo
6ca5a8db77 Change default font in code editors (#2985)
* Change default font in code editors

* Fall back to system font
2024-02-02 17:03:29 +10:00
Abdo
0f72287b7d Fix Image field not hidden until user selects an image (#2960) 2024-01-23 14:24:12 +10:00
Abdo
f4ab4ec7aa Fix flicker when hovering over deck list (#2958)
* Remove backdrop-filter from deck browser

* Remove transition
2024-01-23 14:20:32 +10:00
Viktor Ricci
d19a535309 Don't urllib.unquote when using requests (#2943) 2024-01-19 16:09:13 +10:00
Abdo
c183b758bd Default to 'Bury Card' action consistently (#2950) 2024-01-19 15:49:16 +10:00
mjuhanne
9a72411516 Fix crash in Reviewer (#2945) 2024-01-19 15:36:11 +10:00
Damien Elmes
c6af3f0020 Update Python
Closes #2923
2024-01-19 15:11:17 +10:00
Damien Elmes
d744e1ede7 Apply workaround for wasyncore error 2024-01-16 16:01:40 +10:00
Damien Elmes
e2e4cfaabd Shift the default network timeout back to 60 seconds
There have been a number of reports from people that were having trouble
with 30 seconds
2024-01-11 14:31:30 +10:00
Damien Elmes
eb45f8a76c Fix update suppression
The check got lost in the recent refactor.

https://forums.ankiweb.net/t/bug-report-anki-23-10-1-linux-flatpak-ignore-this-update-does-not-work/39408
2024-01-09 14:12:26 +10:00
BlueGreenMagick
69f201d43c Fix toolbar button shifting on hover (#2928) 2024-01-03 16:53:37 +10:00
Abdo
6cbb50659e Initialize Browser.aspect_ratio earlier to fix AttributeError (#2924) 2024-01-03 15:59:16 +10:00
Abdo
f807ac2a81 Use our translation of 'Discard' (#2920)
* Use our translation of 'Discard'

* Update qt/aqt/utils.py (dae)
2024-01-01 14:20:31 +10:00
Damien Elmes
c4115bdff2 Select cancel button by default
Consistent with 'keep editing' in add screen
2023-12-25 09:40:24 +10:00
Abdo
549f6f55a9 Improve confirmation message in Add screen (#2903) 2023-12-24 15:22:59 +10:00
msisovic
e852372c20 Fix macOS clipboard issues (#2900)
* Added double-check of clipboard change when pasting.

* Added comment explaining changes, updated CONTRIBUTORS and about.py
2023-12-22 14:18:19 +10:00
Abdo
bfac98d622 Offer to save changes when card layouts screen is closed (#2899) 2023-12-22 14:12:33 +10:00
Abdo
f4cc9c0308 Do not close web pages when Esc is pressed and a modal is open (#2894)
* Prefer key over keyCode

* Do not close TS pages on Esc when floating elements are open

* Close pop-up when Escape is pressed regardless of keepOnKeyup

* Close help modals when Escape is pressed

* Avoid duplicate handling of Esc in WithFloating

* Formatting

* Handle closing of preset management modals

* Reset text input modal to initial value
2023-12-21 13:59:52 +10:00
Akash Reddy
37d0165fcc Fix opening card info window closes it when already open (#2896) 2023-12-21 13:57:32 +10:00
Damien Elmes
e5fa4791a7 Use seconds instead of minutes for preview delay
Since this is not compatible with older clients, preview_delay has been
brought back so the configured value will still sync.
2023-12-21 11:02:29 +10:00
Damien Elmes
f7a653a76c Defer page cleanup to prevent API access warning 2023-12-16 09:45:58 +10:00
Damien Elmes
ec8415f8f7 Preserve _renderStats() signature to avoid add-on breakage 2023-12-14 10:57:50 +10:00
Abdo
87f29c335e More fixes for auto advance state (#2879)
* Disable auto advance on review cleanup

* Fix auto advance state resetting on card flip when bottom bar is focused

* Move focus handling to reviewer

* Simplify destruction of previous timers

* Fix auto advance firing early

* Fix handling of 'wait for audio'

* Remove unused import

* When focus is lost, disable auto advance (dae)

Otherwise it will resume when the user answers a card, which is
surprising.
2023-12-13 09:23:11 +10:00
Gustaf-C
507f2c8ccf Add hint for zero minutes in filtered deck (#2887) 2023-12-13 09:07:09 +10:00
Damien Elmes
60f2b23ae7 Show tooltip when auto-advance enabled/disabled 2023-12-11 14:43:12 +10:00
Damien Elmes
7e27f8a72a Invert seconds to show question/answer; tweak wording
The previous wording could be interpreted as 'time until showing question'
or 'time that question should be shown'. I'd intended the latter, and
I didn't notice that the original implementation was doing the former.
2023-12-11 13:40:44 +10:00
Damien Elmes
9107084f4a Catch another invalid-timestamp error
https://forums.ankiweb.net/t/anki-23-12-beta/37771/88
2023-12-11 12:39:20 +10:00
Damien Elmes
dbf9460e06 Revert "Prefer image pastes over HTML in the editor (#2856)"
This reverts commit 6e6dab3993.

Rolling this back for now, as it's caused a couple of regressions:

- In the old path, we returned (html, internal=False); in the new path,
it's returned as internal=True, which prevents formatting from being
stripped. This requires night mode to reproduce, as we don't strip text
colors in day mode.
- It can result in lost alt tags and filenames, as after right clicking on an
image in Chrome and choosing 'copy image', Chrome puts both the HTML and
the image on the clipboard

Related discussion: https://forums.ankiweb.net/t/anki-23-12-beta/37771/90
2023-12-11 12:27:41 +10:00
Damien Elmes
d9ed327f13 Another fix for unfocused input box in Qt 6.6.1 2023-12-11 11:54:47 +10:00
Damien Elmes
88f3ac0422 Rework rollover check
- Avoid waking up frequently
- Ensure collection access happens before sync begins, as otherwise
it may block the UI
2023-12-10 12:37:01 +10:00
Damien Elmes
cc8d110612 Ensure deck browser fetches collection data in the background 2023-12-10 12:37:01 +10:00
Damien Elmes
1f8f7fd79b Fix sync status check blocking collection access 2023-12-10 12:37:01 +10:00
Damien Elmes
129216fe23 Ensure progress windows get cleaned up
Closes #2872
2023-12-08 13:54:32 +10:00
Damien Elmes
3222f68bd1 Fix non-local .html testing 2023-12-08 12:43:09 +10:00
Damien Elmes
629ff330a2 Allow user to configure hard/good buttons when rescheduling off
Closes #2858
2023-12-08 11:04:34 +10:00
Damien Elmes
07017a4a8e Fix filter area not starting focused on Qt 6.6.1
https://forums.ankiweb.net/t/dialog-windows-no-longer-focus-inputbox/37880
2023-12-06 14:30:46 +10:00
Abdo
574f6a696d Fix TTS not working properly with auto advance (#2874)
* Fix TTS not working properly with auto advance

* Restore cb() call in error path (dae)
2023-12-06 11:45:33 +10:00
Damien Elmes
7675ddf80d Fix mpv idle notification not using main thread
Message arrived on a background non-Qt thread, and called run_in_background(),
which assumes it's running on the GUI thread. This resulted in single_shot()
failing to run in reviewer's on_av_player_did_end_playing on Linux/macOS.
2023-12-06 11:40:05 +10:00
Damien Elmes
c4edc5cc5e Handle invalid install timestamps in add-ons
https://forums.ankiweb.net/t/anki-23-12-beta/37771/57
2023-12-06 09:20:42 +10:00
Akash Reddy
9aa381775a Fix Mathjax can only be pasted once (#2869)
* Fix mathjax can be pasted only once

* Update about.py

* Update CONTRIBUTORS

* fix formatting
2023-12-05 10:01:25 +10:00
Abdo
1f4bd9b357 Clear editor's internal copied text on cut/copy (#2866) 2023-12-04 15:04:49 +10:00
Abdo
509b96e0a3 Fix auto advance state not being restored after focus change in some (#2860)
cases
2023-12-04 14:54:25 +10:00
Abdo
6e6dab3993 Prefer image pastes over HTML in the editor (#2856) 2023-12-01 15:23:07 +10:00
Abdo
b4f37b1aa5 Replace css_browser_selector with our own implementation (#2854)
* Replace css_browser_selector

* Add classes to root element instead of body

* Export addBrowserClasses() in reviewer_extras for mobile clients (dae)

* Avoid setting .mac on iOS devices (dae)
2023-11-30 10:57:33 +10:00
gustavosmendes1
68ac08c5df Added contributors and edit about (#2855) 2023-11-30 10:15:05 +10:00
Damien Elmes
9537646604 Rework error dialog
- Hide traceback
- Include full add-on info in 'copy debug info' button, like about
screen
- Link to troubleshooting page
- Use non-modal pop-up in the common case, to avoid potential conflicts
with other modals.

Closes #2830
2023-11-29 10:25:32 +10:00
Damien Elmes
1021502377 Add option to calculate all weights at once 2023-11-27 11:24:31 +10:00
Abdo
febaa524ab Load MathJax's text-chtml-full component in reviewer/previewer (#2836)
* Load MathJax's text-chtml-full in review screens

* Remove no longer needed MathJax extensions
2023-11-20 16:50:55 +10:00
Akash Reddy
a7e54e4050 Fix switching of add & history buttons when selecting IO notetype (#2833)
* Fix switching of add & history buttons when selecting IO notetype

* Update CONTRIBUTORS
2023-11-20 16:36:25 +10:00
Damien Elmes
60cfa254e8 Fix broken bundling on Windows 11
When Windows notices "install" in the filename it triggers a UAC elevation,
causing 'cargo run' to fail.
2023-11-20 12:01:34 +10:00