Commit graph

4326 commits

Author SHA1 Message Date
Damien Elmes
7eff75f5f3 hook expected an int, not a str 2020-05-22 11:27:40 +10:00
Damien Elmes
b90d20a3c1 fix custom study not saving 2020-05-22 11:25:11 +10:00
Damien Elmes
7676748e6c fix deletion of decks; allow deleting cards from default
https://anki.tenderapp.com/discussions/beta-testing/1967-2126-189-g7384df8f-crash-at-note-types-fields-save#comment_48353232
2020-05-22 11:24:56 +10:00
Damien Elmes
d31f2d8c23 move deck/notetype update hooks to gui
We need to migrate away from firing hooks in libanki, since libanki
methods may be running on a background thread, and hook consumers
typically expect the code to run in the main thread. We could document
it, but it would frequently be forgotten about, and could lead to
crashes.

https://anki.tenderapp.com/discussions/ankidesktop/41748-qobject-cannot-create-children-for-a-parent-that-is-in-a-different-thread-when-hitting-the-save-button-on-clayoutpy-window
2020-05-22 10:47:14 +10:00
Damien Elmes
59d3473149 show 'changes saved' in parent window 2020-05-22 10:43:41 +10:00
Damien Elmes
dcbfa23eed show message when search fails 2020-05-22 10:43:28 +10:00
Damien Elmes
d3557f380d can't use _card.note_type() in clayout 2020-05-22 09:58:58 +10:00
Damien Elmes
40dc633d7f monospace font in clayout 2020-05-22 09:58:20 +10:00
Damien Elmes
ede0bb5420 add back most of .fields() to avoid breaking add-ons 2020-05-21 12:08:51 +10:00
Damien Elmes
e5f32e2f4e use context manager in retrieveURL 2020-05-21 10:58:42 +10:00
Damien Elmes
2b46d4c73c use longer delay in test_timing()
was intermittently failing in slow Windows CI
2020-05-21 09:33:49 +10:00
Damien Elmes
238ec0e4cb clearer variable names in retrieveURL 2020-05-21 09:22:34 +10:00
Damien Elmes
32016bc02b Merge pull request #630 from evandroforks/close_http_client_connections
Fixed HttpClient session not being closed
2020-05-21 09:17:07 +10:00
Damien Elmes
537cfb042b Merge pull request #628 from evandroforks/add_missing_anki_icon_to_debug_window
Added missing Anki icon to debug window
2020-05-21 09:06:26 +10:00
Damien Elmes
d31502161d Merge pull request #629 from evandroforks/fix_misspelling_of_rsync_on_checks_yml
Fix misspelling of rsync variable name on checks.yml
2020-05-21 09:04:13 +10:00
evandrocoan
fbfe611f03 Added missing Anki icon to debug window 2020-05-20 19:21:31 -03:00
evandrocoan
04dc65ef78 Fixed HttpClient session not being closed 2020-05-20 19:20:41 -03:00
evandrocoan
0b58d9b0e9 Fix misspelling of rsync variable name on checks.yml 2020-05-20 19:19:36 -03:00
Damien Elmes
0b04658920 fix shortcut keys in clayout 2020-05-21 07:51:35 +10:00
Damien Elmes
75570683db left-align radio buttons in clayout 2020-05-20 19:56:53 +10:00
Damien Elmes
99462e39b8 fix deck age being used instead of collection
https://anki.tenderapp.com/discussions/ankidesktop/41637-bug-in-statistics
2020-05-20 19:46:01 +10:00
Damien Elmes
b3e8c63d65 update missed storage._Collection references 2020-05-20 19:45:46 +10:00
Damien Elmes
068cc43095 storage->collection 2020-05-20 17:58:28 +10:00
Damien Elmes
4f5fc9a63d 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
bac4232829 fix progress bar getting stuck on image paste 2020-05-20 16:12:41 +10:00
Damien Elmes
883d9a8851 deprecate removeTempNote() 2020-05-20 15:01:05 +10:00
Damien Elmes
1376c829db fix HTML editor in add screen 2020-05-20 14:59:22 +10:00
Damien Elmes
3f8a3afb78 fix extending limits in custom study
https://anki.tenderapp.com/discussions/beta-testing/1967-2126-189-g7384df8f-crash-at-note-types-fields-save
2020-05-20 14:13:40 +10:00
Damien Elmes
96a4b65cb0 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
1e3080ebdc update empty cards hook
Closes #515
2020-05-20 13:41:09 +10:00
Damien Elmes
7f011bd26f tidy up Qt import 2020-05-20 13:38:55 +10:00
Damien Elmes
f27128418c 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
bb9da63433 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
Damien Elmes
020572f9d9 Merge pull request #627 from evandroforks/add_missing_anki_icon_to_preview_window
Added missing Anki icon to qt/aqt/previewer.py
2020-05-20 12:47:33 +10:00
evandrocoan
0292bea4d1 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
1261266a4b Added missing Anki icon to qt/aqt/previewer.py 2020-05-19 19:43:18 -03:00
evandrocoan
b690a51a5c 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
Damien Elmes
390b358e3f Merge pull request #613 from evandroforks/add_missing_file_descriptors_close
Add missing close file descriptors using context managers
2020-05-19 14:39:07 +10:00
Damien Elmes
3c2a791800 Merge pull request #624 from evandroforks/deprecate_pacman
Deprecated pacman usage because its is failing out of nowhere,
2020-05-19 13:15:37 +10:00
Damien Elmes
1cbb1bdbd0 catch protobuf error as well
Sad that we can't exhaustively match protobuf oneofs in
Python :-(
2020-05-19 13:10:20 +10:00
evandrocoan
b8b1bb5c64 Deprecated pacman usage because its is failing out of nowhere,
probably a server is down. Anyways, directly unziping rsync is
faster. And soo, we will have builtin support for msys2:
https://github.com/actions/virtual-environments/pull 632
2020-05-18 23:49:28 -03:00
Damien Elmes
c78e8425aa automatically omit notes or cards table when possible 2020-05-19 11:27:02 +10:00
evandrocoan
c1c2e4d4e0 Simplified csvfile.py super call __del__ call 2020-05-18 16:20:33 -03:00
evandrocoan
1faf7450e4 Explicitly close the importer file descriptor
https://github.com/ankitects/anki/pull 613
2020-05-18 15:54:20 -03:00
evandrocoan
4fe92bfc6b Add missing close file descriptors using context managers 2020-05-18 15:54:20 -03:00
Damien Elmes
e8f0fd4d3b 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
bcb71bbf2d 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
b7489cdb75 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
349c5b378d 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
5e1583df59 fix unit test bug triggered by low resolution win32 timer
We don't yet have a remove_note(), so just remove all cards for now.
2020-05-18 19:02:54 +10:00