Damien Elmes
d5d5ca9c3d
clearer variable names in retrieveURL
2020-05-21 09:22:34 +10:00
Damien Elmes
8300d8d85c
Merge pull request #630 from evandroforks/close_http_client_connections
...
Fixed HttpClient session not being closed
2020-05-21 09:17:07 +10:00
evandrocoan
14692fb345
Added missing Anki icon to debug window
2020-05-20 19:21:31 -03:00
evandrocoan
b388c43454
Fixed HttpClient session not being closed
2020-05-20 19:20:41 -03:00
Damien Elmes
300fba156e
fix shortcut keys in clayout
2020-05-21 07:51:35 +10:00
Damien Elmes
12b9a7e368
left-align radio buttons in clayout
2020-05-20 19:56:53 +10:00
Damien Elmes
e2bb5cd14a
update missed storage._Collection references
2020-05-20 19:45:46 +10:00
Damien Elmes
50fdf9b03d
storage->collection
2020-05-20 17:58:28 +10:00
Damien Elmes
c49c378296
move storage logic into collection.py; fix export bug
...
https://anki.tenderapp.com/discussions/ankidesktop/41495-using-file-export-closes-the-collection-on-mwcoldb-if-the-browser-window-is-open
2020-05-20 17:43:34 +10:00
Damien Elmes
eb0c9f6e0a
fix progress bar getting stuck on image paste
2020-05-20 16:12:41 +10:00
Damien Elmes
6ae55a7a77
deprecate removeTempNote()
2020-05-20 15:01:05 +10:00
Damien Elmes
8da69c5d39
fix HTML editor in add screen
2020-05-20 14:59:22 +10:00
Damien Elmes
8f207cc900
drop mw.weakref usage in models.py for now
...
https://anki.tenderapp.com/discussions/beta-testing/1967-2126-189-g7384df8f-crash-at-note-types-fields-save
2020-05-20 13:53:34 +10:00
Damien Elmes
4fd8a4cf2d
update empty cards hook
...
Closes #515
2020-05-20 13:41:09 +10:00
Damien Elmes
9876c30d89
tidy up Qt import
2020-05-20 13:38:55 +10:00
Damien Elmes
e564a47504
Merge pull request #625 from evandroforks/fixed_check_box_called_twice
...
Fixed clayout.py rendering the contents twice when clicked
2020-05-20 12:48:48 +10:00
Damien Elmes
1d4fd50d8b
Merge pull request #626 from evandroforks/fix_previewer_button
...
Fixed previewer button not resetting the state when the preview
2020-05-20 12:48:17 +10:00
evandrocoan
64a90a457c
Fixed clayout.py rendering the contents twice when clicked
...
https://stackoverflow.com/questions/36808257/pyqt-radiobutton-ischecked-is-executed-twice
2020-05-19 20:17:20 -03:00
evandrocoan
3ea6f685b2
Added missing Anki icon to qt/aqt/previewer.py
2020-05-19 19:43:18 -03:00
evandrocoan
3dcfd57b07
Fixed previewer button not resetting the state when the preview
...
window is closed by its X button
2020-05-19 19:24:54 -03: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
31ceb5d730
simplify the migration popup
...
Avoid presenting the user with a wall of text they may not understand,
default to proceeding, and quit if the user cancels.
2020-05-18 20:15:59 +10:00
Damien Elmes
a53aac40f8
Merge pull request #610 from evandroforks/ask_confirmation_before_moving_anki_collection
...
Ask user confirmation before moving the Anki directory
2020-05-18 19:44:27 +10:00
Damien Elmes
e323a8f902
Merge pull request #619 from evandroforks/fix_empty_sound_tags
...
Also fix legacy.py::anki.sound._soundReg accepting empty tags
2020-05-18 19:31:22 +10:00
Damien Elmes
fe196bc1df
Merge pull request #620 from evandroforks/remove_unused_var
...
Remove unused t = time.time() variable on qt/aqt/browser.py
2020-05-18 19:20:08 +10:00
Damien Elmes
1fc951471c
fix python3.7 lint issue
2020-05-18 18:08:57 +10:00
Damien Elmes
8bd5d756e2
bump version
2020-05-18 12:50:20 +10:00
Damien Elmes
252eb3a444
fix shared deck conf warning
2020-05-17 14:37:59 +10:00
Damien Elmes
8b57a61746
use deck tree for new/review count calculation
...
- wins back the performance lost by the decks and dconf not being
in memory, and the overhead of serializing data for DB calls
- card counts are no longer capped to 1000
- learn counts are currently still calculated separately - can't merge
v1 counts without changing the existing behaviour
- partially rendering the tree may yield more savings
2020-05-16 20:28:03 +10:00
Damien Elmes
8eada2b57d
add find_deck_in_tree()
2020-05-16 13:05:20 +10:00
Damien Elmes
578b60c104
save profile stats to file instead of generating report
...
Can use an external tool like snakeviz to query them after a run.
2020-05-16 12:53:01 +10:00
Damien Elmes
f6767d1cff
fix lint issues
2020-05-16 12:20:20 +10:00
Damien Elmes
0c340eba64
fix+speed up deck list from Filters button
...
I don't think it makes much sense to keep these lists that largely
duplicate the sidebar functionality, but they remain for now.
2020-05-16 11:54:08 +10:00
Damien Elmes
f2086fc2e3
switch to new deck tree in deck browser
...
Saves us having to look up collapsed/filtered as we render, and gives
us type completion.
2020-05-16 10:52:14 +10:00
Damien Elmes
75d3eebafe
drop usage of nameMap in deckbrowser
...
It was unnecessary, and being called multiple times as we recursed
downwards, slowing things down.
2020-05-16 10:02:08 +10:00
Damien Elmes
83adfb60cf
avoid duplicate reset in overview
2020-05-15 21:54:56 +10:00
Damien Elmes
964a69e54e
handle default deck and filtered deck suppression in the backend
2020-05-15 21:21:10 +10:00
Damien Elmes
2ac33500eb
fetch stock notetypes from backend
2020-05-15 17:08:24 +10:00
Damien Elmes
f650e5557f
add back card deletion count
...
cheaper to look up now that there's an index on notes.mid
2020-05-15 15:28:07 +10:00
Damien Elmes
00db72e365
show (Deck) when card hasn't been added
2020-05-15 15:01:28 +10:00
Damien Elmes
ed52a4dc3f
when previewing cards, use the default deck for now
...
Replay code needs to be able to retrieve deck options. We should
probably use the current deck or pass it in in the future.
2020-05-15 14:50:57 +10:00
Damien Elmes
68e1303880
update replay suppression in clayout
2020-05-15 14:26:00 +10:00
Damien Elmes
46c363d4aa
track changes in fields dialog as well
...
And avoid bumping schema until user actually saves, but warn at
start.
2020-05-15 13:59:44 +10:00
Damien Elmes
f1c5c88c10
no longer need to check addNote's return value
2020-05-14 21:59:42 +10:00
Damien Elmes
24ffb6ab76
check for empty cloze cards when rendering as well
2020-05-14 21:56:45 +10:00
Damien Elmes
782911471b
add "fill empty" checkbox
2020-05-14 20:58:45 +10:00
Damien Elmes
9a222e620a
update Add Field button
2020-05-14 18:01:15 +10:00
Damien Elmes
c5d574e9f4
use group box instead of tabs in card layout screen
2020-05-14 17:26:40 +10:00
Damien Elmes
5167bb57be
start reworking card layout screen
...
- front/back/css shown in tabs
- front/back preview switchable; only one webview needs to be loaded
- dropdown to select cloze number in preview
- search box to search in front/back/css
2020-05-14 15:24:29 +10:00
Damien Elmes
f23eb350e4
drop availOrds(), and use backend for getting cloze numbers
2020-05-14 12:14:00 +10:00
Damien Elmes
c601dcef24
remove obsolete preview code
2020-05-14 09:22:53 +10:00
Damien Elmes
6680cdf1d3
update the card layout screen
...
- changes are now committed in bulk when closing the dialog,
and can be canceled
- it's not necessary to save the note to the database to preview it
- duplicate fields are now shown as duplicates in the top list
- redraw preview more quickly
- use + instead of _ when deduplicating names, as the latter is a
glob character
2020-05-13 17:24:49 +10:00
Damien Elmes
12b8fe6147
don't hide static template text when card is empty
2020-05-13 11:17:44 +10:00
evandrocoan
3f517c71e4
Remove unused t = time.time() variable on qt/aqt/browser.py
2020-05-12 15:09:22 -03:00
evandrocoan
f8c6300e27
Also fix legacy.py::anki.sound._soundReg accepting empty tags
2020-05-12 12:43:35 -03:00
Damien Elmes
9317cee9ba
handle scheduling preferences in the backend
2020-05-12 21:13:34 +10:00
Damien Elmes
70cc1699a6
rewrite DB check
...
- notes with wrong field count are now recovered instead of
being deleted
- notes with missing note types are now recovered
- notes with missing cards are now recovered
- recover_missing_deck() still needs implementing
- checks required
2020-05-12 21:13:34 +10:00
Damien Elmes
2413f286b1
bulk tag add/remove/update; canonify on note save
...
also remove the tag list updated hook - we'll need a better solution in
the future than having the library code call back into the GUI code
2020-05-12 21:13:34 +10:00
Damien Elmes
7bab99d873
support disabling unicode normalization in notes
2020-05-12 21:13:34 +10:00
Damien Elmes
05ca797ee6
add pep8 name for findReplace
2020-05-12 21:13:34 +10:00
Damien Elmes
29379a9a50
update extract-po-string to handle plurals again
2020-05-12 21:13:34 +10:00
Damien Elmes
1852e32183
update find&replace in browser
...
sadly the UI still stutters on large selections - the calls
to get the selected rows from Qt are really slow.
2020-05-12 21:13:34 +10:00
Damien Elmes
c51ca666c3
catch schema mod in background
...
If the schema confirmation dialog is shown on a background thread it
will crash the app, so we convert this to an assertion error that gets
caught by the error handler. Code still needs to be updated to modify
the schema prior to moving to the background, but at least this way
it doesn't crash.
2020-05-12 21:13:34 +10:00
Damien Elmes
6e6d9ee1a3
check untyped in clayout
2020-05-12 21:13:34 +10:00
Damien Elmes
9f585d4d38
remove an unused import
2020-05-12 21:13:34 +10:00
Damien Elmes
25f122bf5c
update fields and models diags
...
- field changes are now applied when user closes dialog with save
button, in bulk
- models diag now fetches note type and saves it as required, instead
of holding on top a copy that can grow stale as changes are made in
subdialogs
- both dialogs now perform operations in the backend
- note.model() now fetches the note type on the fly, instead of
holding on to a copy that may become stale
2020-05-12 21:13:34 +10:00
Damien Elmes
f6931197d2
add helper to run background task with progress
2020-05-12 21:13:34 +10:00
Damien Elmes
36c1d1cf8c
reuse existing use count in note types screen
2020-05-12 21:13:33 +10:00
Damien Elmes
ce104d16a3
mypy/isort fixes
2020-05-12 21:13:33 +10:00
Damien Elmes
238441f2d9
use the backend for the deck due tree
...
- approx 3x faster on a large test deck
- counts are no longer capped to 1000 in the tree
2020-05-12 21:13:33 +10:00
Damien Elmes
67421e02ec
add browserCollapsed as part of tree build
2020-05-12 21:13:33 +10:00
Damien Elmes
a0160d7f1e
fix mypy issues
2020-05-12 21:13:33 +10:00
Damien Elmes
a88bc1e836
speed up browser load by rendering deck tree in Rust and skipping counts
2020-05-12 21:13:33 +10:00
Damien Elmes
0bb80329e8
ensure collection doesn't get stuck open if loading fails
2020-05-12 21:13:33 +10:00
Damien Elmes
23586ffe90
catch template errors, and start on discarding changes to fields/cards
...
This is only a first step - all the current methods that implicitly
save need to be updated.
2020-05-12 21:13:33 +10:00
Damien Elmes
6e8860cafa
hook the empty cards code up to the GUI
2020-05-12 21:13:33 +10:00
Damien Elmes
f637ac957d
hook up new note and note type handling
...
- notetypes are fetched from the DB as needed, and cached in Python
- handle note type changes in the backend. Multiple operations can now
be performed in one go, but this is not currently exposed in the GUI.
- extra methods to grab sorted note type names quickly, and fetch by
name
- col.models.save() without a provided notetype is now a no-op
- note loading/saving handled in the backend
- notes with no valid cards can now be added
- templates can now be deleted even if they would previously
orphan notes
a number of fixmes have been left in notes.py and models.py
2020-05-12 21:13:33 +10:00
Damien Elmes
1ca7fb4a80
use quick check instead of full integrity check on collection close
2020-05-12 21:13:33 +10:00
Damien Elmes
85b28f13d2
avoid installing pyaudio on every run
2020-05-12 21:10:21 +10:00
Damien Elmes
436bdd6970
Merge pull request #611 from evandroforks/automatically_install_pyaudio_on_make_check
...
Automatically install pyaudio when running make check
2020-05-12 20:44:25 +10:00
Damien Elmes
74c97ad6d3
bump version
2020-05-11 19:28:17 +10:00
Damien Elmes
4e44694136
Revert "use isolation characters instead of direction markers in cloze handling"
...
This reverts commit e838769d02
.
Caused a regression:
https://anki.tenderapp.com/discussions/ankidesktop/41384-cloze-deletions-in-2125-and-2126
2020-05-11 19:25:49 +10:00
evandrocoan
5f9dbf9b7d
Set to restart Anki application after profile directory migration
...
Ask user confirmation before moving the Anki directory
https://github.com/ankitects/anki/pull 610
2020-05-10 18:30:58 -03:00
evandrocoan
4cf64519fb
Automatically install pyaudio when running make check
2020-05-09 13:26:42 -03:00
Damien Elmes
7078415405
avoid renaming completer_, as add-ons depend on it
2020-05-08 18:17:57 +10:00
Damien Elmes
c02716ccd8
python formatting+lints
2020-05-08 17:30:27 +10:00
Damien Elmes
2a0d40e15d
stats area grouping box fix
...
https://anki.tenderapp.com/discussions/beta-testing/1928-cosmetic-issue
2020-05-08 16:03:29 +10:00
Damien Elmes
4a26e2ba77
bundle socks
...
https://anki.tenderapp.com/discussions/ankidesktop/39801-sync-error
2020-05-08 15:26:19 +10:00
evandrocoan
9f5c69ee94
Keep an window open showing the migration is in progress
2020-05-07 15:03:43 -03:00
evandrocoan
453da45c99
Ask user confirmation before moving the Anki directory
...
https://anki.tenderapp.com/discussions/ankidesktop/41245-unwanted-file-movingdeleting-behavior
2020-05-07 14:59:19 -03:00
Damien Elmes
961833a137
avoid mention of pip
2020-05-05 16:30:22 +10:00
Damien Elmes
2f57c646e0
benchmark->profile, and remove from error branches
2020-05-05 16:28:49 +10:00
Damien Elmes
e7ebcc7c75
Merge pull request #605 from evandroforks/benchmark_option
...
Created the --benchmark command line option
2020-05-05 16:23:00 +10:00
Damien Elmes
16d0bf24b4
Merge pull request #608 from evandroforks/fix_missing_pyaudio_import
...
Fix missing pyaudio blocking Anki from running
2020-05-05 16:22:34 +10:00
evandrocoan
0006269c01
Used showWarning asking the user to install pyaudio
2020-05-05 00:00:48 -03:00
evandrocoan
338e904bd4
Created the ANKI_RUN_BENCHMARK environment variable replacing
...
the command line argument.
2020-05-04 23:46:13 -03:00
evandrocoan
2e11a596aa
Fixed profiler word misspelling and stopped trimming the output
2020-05-04 23:15:23 -03:00
Damien Elmes
08f894735a
Merge pull request #607 from Arthur-Milchior/remove_a_try
...
Simplify the copying of field contents when resetting
2020-05-05 11:36:17 +10:00
Damien Elmes
b932333246
fix card layout screen on qt 5.9 regression ( #592 )
2020-05-05 11:26:13 +10:00