Commit Graph

123 Commits

Author SHA1 Message Date
Damien Elmes
290efb9e92 need to invalidate notetype cache on sync completion
basicCheck() was populating it on startup sync, leading to
https://forums.ankiweb.net/t/error-when-adding-a-new-note/1664
2020-08-20 15:35:23 +10:00
Henrik Giesel
4e43d27fb8 Remove ResetReason.BrowserDeleteNote 2020-08-17 12:50:40 +02:00
Henrik Giesel
dcf82fb403
Merge branch 'master' into resethook 2020-08-17 12:39:09 +02:00
Damien Elmes
177ced7a31 clear undo queue on sync
https://forums.ankiweb.net/t/ios-ipad-sync-failure-with-filtered-decks/1617/34
2020-08-17 20:09:07 +10:00
Henrik Giesel
7f503895d7 Create ResetReason enum 2020-08-16 18:56:32 +02:00
Henrik Giesel
97a4a0ef34 Rename to should_require_reset 2020-08-16 18:56:32 +02:00
Henrik Giesel
db0a18106f Reorder + make all parameters optional 2020-08-16 18:56:32 +02:00
Henrik Giesel
ccc56d4355 Satisfy formatter 2020-08-16 18:56:32 +02:00
Henrik Giesel
dd515e65e7 Add new use of requireReset 2020-08-16 18:56:32 +02:00
Henrik Giesel
31323719bc Insert gui_hook main_window_will_require_reset
* into AnkiQt.requireReset method
2020-08-16 18:56:32 +02:00
Arthur Milchior
c4db4bd291 Any removed 2020-08-12 01:37:21 +02:00
Matt Krump
83449e35ad Turn on check_untyped_defs for aqt.main 2020-07-31 20:34:14 -06:00
Damien Elmes
67abb98993
Merge pull request #692 from Arthur-Milchior/remove_useles_variables
Remove useless variables
2020-07-20 11:35:40 +10:00
Damien Elmes
f22aa4c199 catch SIGTERM, and respond more quickly 2020-07-18 11:26:04 +10:00
Arthur Milchior
452daf8d80 Remove useless variables 2020-07-17 08:38:48 +02:00
Damien Elmes
bfbab8b498 i18n downgrade&quit button 2020-07-17 15:06:14 +10:00
Damien Elmes
04b1ca7559 defer top toolbar drawing until after add-ons loaded
https://forums.ankiweb.net/t/anki-2-1-28-beta/629/13
2020-07-02 10:23:14 +10:00
Damien Elmes
bedd9dadb1 add option to disable media syncing
https://forums.ankiweb.net/t/error-when-adding-audio-file/495/2
2020-07-01 11:35:24 +10:00
Damien Elmes
40f270c386 shift+click on the graphs button to access old graphs for now 2020-06-30 20:07:46 +10:00
Damien Elmes
7c444b4d35 add progress to db check 2020-06-08 21:07:36 +10:00
Damien Elmes
26330da119
Merge pull request #657 from BlueGreenMagick/prof-name
don't allow addons21 as profile name
2020-06-08 11:30:27 +10:00
BlueGreenMagick
7df3c9f0b1 don't allow addons21 as profile name
because addons21 and profiles directory are stored in same directory
2020-06-05 22:44:59 +09:00
Damien Elmes
4a69b55a90 add note/card removal to backend 2020-06-04 18:21:04 +10:00
Damien Elmes
b3752e8618 fix initial login 2020-06-02 15:10:58 +10:00
Damien Elmes
49971d0235 fix media sync progress not updating, and issues closing profile 2020-06-01 13:57:10 +10:00
Damien Elmes
6bf9f5bc6c lint fixes 2020-06-01 13:57:10 +10: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
7e221f0acf update auto-sync code 2020-06-01 13:57:10 +10:00
Damien Elmes
0e5b7da62a login/full up/full down plugged in 2020-06-01 13:57:10 +10:00
evandrocoan
9257e75762 Save and restore the debug console window geometry and splitter 2020-05-30 20:58:55 -03:00
Glutanimate
6147356330 Add main_window_did_init hook and clarify difference to profile_did_open 2020-05-28 13:30:22 +02: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
evandrocoan
efb62b9528 Add missing close file descriptors using context managers 2020-05-18 15:54:20 -03: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
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
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
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
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
0bb80329e8 ensure collection doesn't get stuck open if loading fails 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
1ca7fb4a80 use quick check instead of full integrity check on collection close 2020-05-12 21:13:33 +10:00
Damien Elmes
5236e20a7a
Merge pull request #580 from Arthur-Milchior/debug_diag
mw.debug_diag is the dialog and not the window
2020-05-04 14:07:15 +10: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
Arthur Milchior
e86817305a mw.debug_diag is the dialog and not the window
This will allow, for example, for add-ons to do self.debugDiag.text
and access the debugger text. I see very little reason to have a
direct access to the dialog window.

I should note that self.debugDiag is never used anywhere in the code,
so I think it should be deleted; unless you've heard of some add-on
using it.
2020-04-27 11:55:33 +02:00
Damien Elmes
a7d5d27778 catch and report issues when downgrading 2020-04-16 10:11:16 +10:00
Damien Elmes
07343f6c9f show a clearer error if the schema is too new
will hold off on making it translatable for now
2020-04-16 09:47:34 +10:00
Damien Elmes
d24cb66be9 downgrade manually
- A regular collection open/close no longer goes through the
upgrade/downgrade steps each time. This avoids wasted cycles, and will
become more important in the future when decks and note types are
split into separate tables.
- Added a downgrade button to the profiles screen to downgrade all
profiles and close the app.
- Downgrading is still automatic when exporting/doing a full sync.
2020-04-16 09:00:49 +10:00