Damien Elmes
7fc32db0c9
fix: slowdowns after import; hard to read popup
...
QTextEdit() will pin the CPU at 100% for seconds to minutes when
fed a large string to display - work around it by switching to
QPlainTextEdit().
Also strip HTML before showing the user - easier to read, and less
text to display. And turn off word wrap, as it makes it easier to skim,
and further reduces the work the widget needs to do.
https://forums.ankiweb.net/t/big-issue-where-anki-gets-slow-when-you-import-this-deck/7050
2021-02-02 15:49:47 +10:00
Damien Elmes
a56b09b987
add a bunch of return types
2021-02-01 23:53:23 +10:00
Damien Elmes
f15715fb07
add types to various other files
...
Mainly automated with MonkeyType
2021-02-01 22:08:56 +10:00
Arthur Milchior
e0a2d90a68
NF: HelpPage in an enum
...
Hopefully, this can help with updating on next manual update and maybe even linking to manual translation
2021-01-26 02:16:37 +01:00
Damien Elmes
94064b8230
convert setWindowFlags call into helper, and fix invalid variables
...
"type: ignore" was masking the invalid references to self in places
like showText()
2021-01-07 14:24:49 +10:00
BlueGreenMagick
6224658c0d
remove context help button
2021-01-06 22:15:48 +09:00
Damien Elmes
ba336d5de3
update multi-line _() references
2020-11-18 11:32:22 +10:00
Damien Elmes
b49805fef5
more ngettext references
2020-11-18 10:52:13 +10:00
Damien Elmes
2453e5c488
update temporary val="%s" references to standard ftl
2020-11-17 22:00:44 +10:00
Damien Elmes
6418993840
merge bulk of qt/ - designer files still to do
2020-11-17 17:42:43 +10:00
Damien Elmes
81b9a3194e
fix some unwanted leading space in i18n keys
2020-11-12 08:55:26 +10:00
abdo
d91f2a27b2
Remove unused code
2020-10-15 16:14:14 +03:00
abdo
236a6071d4
Save importing model in any case
...
https://forums.ankiweb.net/t/bug-notes-are-imported-to-the-wrong-deck-in-certain-cases/4318
2020-10-15 15:14:55 +03:00
Damien Elmes
727ddd74b6
fixes for latest mypy
2020-10-10 19:02:59 +10:00
Matt Krump
a844a8b0c5
Add type hints to importing
...
* Add type hints to importing
* Turn on type checking for aqt.importing
2020-07-24 12:38:34 -06:00
Damien Elmes
a8ad4abf37
add "immediate" progress back
...
on ops which we know are going to take time, it makes the interface
look more responsive to pop up the progress more quickly
2020-06-01 13:57:10 +10:00
Damien Elmes
f3a8bb28d5
fix progress window not disappearing when importing csv
2020-05-29 08:40:25 +10:00
evandrocoan
200bad3714
Explicitly close the importer file descriptor
...
https://github.com/ankitects/anki/pull 613
2020-05-18 15:54:20 -03:00
evandrocoan
efb62b9528
Add missing close file descriptors using context managers
2020-05-18 15:54:20 -03:00
Damien Elmes
eec3fcf87a
use qconnect everywhere, and fix some typing issues
...
a step towards check_untyped_defs in aqt, but there's still 100+
issues to resolve
2020-05-04 13:23:08 +10:00
Damien Elmes
8d429cd192
import .colpkg in a background thread
2020-03-20 21:15:23 +10:00
Damien Elmes
ad9dad8748
import .apkg files in a background thread
2020-03-20 21:15:23 +10:00
Damien Elmes
231fa30a86
import mapped files like csv in a background thread
2020-03-20 21:15:23 +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
Damien Elmes
43f5d13ed6
migrate strings with trailing newlines to fluent
2020-02-27 20:36:40 +10:00
Damien Elmes
8310cb7a0e
add qconnect helper and some type hints
...
The type hints allow mypy to check the gui_hook calls, revealing a
bunch of places that are broken as they expect no arguments like the
legacy hooks.
To make mypy happy about PyQt's signal.connect(func), a qconnect()
helper has been added.
2020-01-16 07:41:23 +10:00
Damien Elmes
967b8a038d
Merge pull request #421 from ErezVolk/tag-changed-grooming
...
Tag modified grooming
2020-01-15 20:25:51 +10:00
Erez Volk
bd9aaa9296
Small fixes and tweaks to "Tag Modified":
...
- No need for the checkbox, as an unchecked box is equal to an empty
`QLineEdit`.
- The value was saved to the profile but not loaded.
- And the real pièce de résistance: I've figured out how to "Promote"
the `QLineEdit` to a `TagEdit`.
Hope you like it! :)
2020-01-15 10:46:05 +02:00
Damien Elmes
cab572b63c
remove _hook/_filter suffix
2020-01-15 16:53:24 +10:00
Damien Elmes
89fce1f6b7
migrate addHook/remHook calls
2020-01-15 13:49:26 +10:00
Erez Volk
b4facdf650
BUGFIX: QLineEdit doesn't have .toPlainText()
2020-01-05 07:54:45 +02:00
Erez Volk
46a24812ce
Enable Tag Modified iff importMode is Update
2020-01-03 08:32:44 +02:00
Erez Volk
e481cce816
Merge remote-tracking branch 'upstream/master' into add-tags-on-update
2020-01-03 08:13:04 +02:00
Damien Elmes
5876866565
tweaking the folder names again
...
hopefully that's the last of it
2020-01-03 07:48:38 +10:00