Commit Graph

3273 Commits

Author SHA1 Message Date
Damien Elmes
4ccb814fb3 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
cf5f716037 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
d5b57262fd
Fix toolbar button shifting on hover (#2928) 2024-01-03 16:53:37 +10:00
Abdo
cef7338b96
Initialize Browser.aspect_ratio earlier to fix AttributeError (#2924) 2024-01-03 15:59:16 +10:00
Abdo
dbfb46e6c8
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
37f55a381e Select cancel button by default
Consistent with 'keep editing' in add screen
2023-12-25 09:40:24 +10:00
Abdo
e33a2bcb17
Improve confirmation message in Add screen (#2903) 2023-12-24 15:22:59 +10:00
msisovic
7f976aaa56
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
31aba99641
Offer to save changes when card layouts screen is closed (#2899) 2023-12-22 14:12:33 +10:00
Abdo
f2e9c73b31
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
1ff55475b9
Fix opening card info window closes it when already open (#2896) 2023-12-21 13:57:32 +10:00
Damien Elmes
4678b0cc4a 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
aee272f0e2 Defer page cleanup to prevent API access warning 2023-12-16 09:45:58 +10:00
Damien Elmes
c253a142ef Preserve _renderStats() signature to avoid add-on breakage 2023-12-14 10:57:50 +10:00
Abdo
aa71313d12
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
eb58863a7c
Add hint for zero minutes in filtered deck (#2887) 2023-12-13 09:07:09 +10:00
Damien Elmes
5f0a74e01f Show tooltip when auto-advance enabled/disabled 2023-12-11 14:43:12 +10:00
Damien Elmes
8157d88038 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
c56efb4442 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
174a2e7bc5 Revert "Prefer image pastes over HTML in the editor (#2856)"
This reverts commit abd8759d50.

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
4e63e61b22 Another fix for unfocused input box in Qt 6.6.1 2023-12-11 11:54:47 +10:00
Damien Elmes
c09a46f857 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
e9a8b676a7 Ensure deck browser fetches collection data in the background 2023-12-10 12:37:01 +10:00
Damien Elmes
a7d7301d33 Fix sync status check blocking collection access 2023-12-10 12:37:01 +10:00
Damien Elmes
183d69be22 Ensure progress windows get cleaned up
Closes #2872
2023-12-08 13:54:32 +10:00
Damien Elmes
b103e09a5e Fix non-local .html testing 2023-12-08 12:43:09 +10:00
Damien Elmes
e778cba089 Allow user to configure hard/good buttons when rescheduling off
Closes #2858
2023-12-08 11:04:34 +10:00
Damien Elmes
9364dad49a 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
80d58728d5
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
5daafef5e6 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
25bc32b1e2 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
a5bdb28849
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
91335b834f
Clear editor's internal copied text on cut/copy (#2866) 2023-12-04 15:04:49 +10:00
Abdo
843c0417b0
Fix auto advance state not being restored after focus change in some (#2860)
cases
2023-12-04 14:54:25 +10:00
Abdo
abd8759d50
Prefer image pastes over HTML in the editor (#2856) 2023-12-01 15:23:07 +10:00
Abdo
dc3bd3efde
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
1bca45176a
Added contributors and edit about (#2855) 2023-11-30 10:15:05 +10:00
Damien Elmes
063b6f60fd 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
452e012c71 Add option to calculate all weights at once 2023-11-27 11:24:31 +10:00
Abdo
e88dfb68a5
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
9fd25a87ec
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
a5cd3f32f4 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
Hikaru Y
8de5cf9690
Fix misalignment of IO masks in Qt5 when image is vertically long (#2829)
* Revert "Fix I/O not showing in Qt5"

This reverts commit c478689e5a.

* Fix misalignment of IO masks in Qt5 when image is vertically long

Also, as in Qt6, constrain the IO image to fit in the viewport.
2023-11-16 10:30:54 +10:00
Damien Elmes
0754a50b5b Automatically disable sandbox on Qt5 PyPi/packaged builds 2023-11-16 10:28:58 +10:00
Damien Elmes
07909a54e2 Add ability for pages created by add-ons to opt in to API 2023-11-14 15:55:09 +10:00
Damien Elmes
9cd4f04677 Bump Apple Silicon build to macOS 12+
Latest Xcode has broken macOS 11 on ARM, and I can't find a workaround

https://forums.ankiweb.net/t/can-t-open-anki-after-download/36938/14
2023-11-14 11:19:11 +10:00
Damien Elmes
f2fba6f9e8 Don't restrict answer key shortcuts
Qt seems to handle invalid input gracefully, and the previous approach
prevented things like umlauts or keys with modifiers.

https://forums.ankiweb.net/t/bug-cannot-set-answer-key-to-german-umlaut/37091
2023-11-13 16:09:32 +10:00
Damien Elmes
c478689e5a Fix I/O not showing in Qt5
Images still gets stretched, because Qt5 doesn't support the aspect-ratio
CSS property, but it's better than nothing.

https://forums.ankiweb.net/t/possible-occulusion-issue-on-ver-23-10-and-the-solution/36894
2023-11-13 15:31:50 +10:00
RumovZ
f200d6248e
Allow im-/exporting with or without deck configs (#2804)
* Allow im-/exporting with or without deck configs

Closes #2777.

* Enable webengine remote debugging in launch.json

* Reset deck limits and counts based on scheduling

Also:
- Fix `deck.common` not being reset.
- Apply all logic only depending on the source collection in the
gathering stage.
- Skip checking for scheduling and only act based on whether the call
wants scheduling. Preservation of filtered decks also depends on all
original decks being included.
- Fix check_ids() not covering revlog.

* Fix importing legacy filtered decks w/o scheduling

* Disable 'include deck options' by default, and fix tab order (dae)

* deck options > deck presets (dae)
2023-11-13 13:54:41 +10:00
Abdo
ae7b14bf40
Add auto-advance options to deck preset (#2765)
* Move stop-timer-on-answer strings to correct section

* Add auto-advance options to deck preset

* Implement answer actions

* Fix error when last card is answered before timeout

* Fix deserialization of answerAction

* Add answerAction to reserved key list

* Fix inverted boolean

* Add option to wait for audio to finish

* Add auto-advance toggle

* Add shortcut

* Disable auto-advance when main window state changes

* Start auto-advance timer after option is toggled

* Disable auto-advance when main window loses focus

* Use existing translations

* Add Answer Hard and Show Reminder
2023-11-13 10:41:51 +10:00