abdo
f67e319f1f
Strip isolation characters from more strings
2020-11-18 18:03:04 +03:00
Damien Elmes
ba336d5de3
update multi-line _() references
2020-11-18 11:32:22 +10:00
Damien Elmes
1255e7530c
update some qt ngettext references
2020-11-18 09:22:27 +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
9feccc785f
ignore incorrect clock in dev mode
2020-11-15 18:29:16 +10:00
Damien Elmes
e99c0dbe15
Merge pull request #793 from nwwt/object-audio-tags-support
...
Audio & object tag support
2020-11-11 10:33:31 +10:00
Andreas Reis
e68a40f13e
cleanup / renames
...
・ soundRegexps → sound_regexps
・ htmlRegexps → html_media_regexps
・ HTML_TAGS → HTML_MEDIA_TAGS
・ escapeImages → escape_media_filenames + alias
・ strip_html_preserving_image_filenames → strip_html_preserving_media_filenames
2020-11-10 14:53:04 +01:00
ianki
c2901e4859
Add hooks for filtering media.
2020-11-09 02:12:23 -08:00
Andreas Reis
21f072a666
Add command-line argument to skip addons
...
Shift doesn't work for me occasionally, for whatever reason. So just add an -s to skip it that way.
(Also, update my github nick)
2020-10-14 01:31:07 +02:00
Henrik Giesel
f147e90146
Move sync_did_finish before reset
2020-09-15 13:06:11 +02:00
Henrik Giesel
6e5a826993
Put sync_did_finish hook before after_sync because it might unload collection
2020-09-14 13:06:20 +02:00
Henrik Giesel
8dcd84e7c0
Add sync_will_start and sync_did_finish hook
2020-09-14 12:22:01 +02:00
Damien Elmes
ade7f438ce
rebuild_filtered_deck() and new_filtered()
2020-09-03 18:02:47 +10:00
Damien Elmes
603210149c
update to latest isort, pylint and pytest
2020-08-31 12:05:36 +10:00
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
Damien Elmes
a6b676039b
work around full sync on start closing the app
...
This is just a temporary solution until the syncing code can be
reworked.
https://anki.tenderapp.com/discussions/ankidesktop/39761-anki-crashing-after-sync-and-download
2020-04-16 08:10:17 +10:00
Damien Elmes
16be20e2fa
don't write log files when exporting
2020-04-15 21:45:32 +10:00
Damien Elmes
698bf9c780
Merge pull request #550 from BlueGreenMagick/debugDiag-contextMenu
...
add clear actions to context menu in debug console
2020-04-11 14:19:46 +10:00
Damien Elmes
a068fcdc9f
Update main.py
2020-04-11 14:19:27 +10:00
BlueGreenMagick
653f5765b8
add clear actions to context menu in debug console
2020-04-10 15:45:25 +09:00
Damien Elmes
8f7ef6ed2c
make sure progress stops when collection corrupt message shown
2020-04-09 14:19:20 +10:00
Damien Elmes
55b99511c0
print exception on close
2020-04-08 10:05:33 +10:00
Damien Elmes
7375a0389a
add flag to skip downgrade on collection close
...
Disabled for now; when enabled it will allow faster collection
open and close in the normal case, while continuing to downgrade
when exporting or doing a full sync.
Also, when downgrading is disabled, the journal mode is no longer
changed back to delete.
2020-04-04 17:21:45 +10:00
Damien Elmes
fe327e32ca
fix progress dialog preventing schema mod
...
https://anki.tenderapp.com/discussions/beta-testing/1868-anki-2124-beta#comment_48183062
This is an ugly hack - in the future the calling code should be updated
to perform the check prior to starting the operation instead.
2020-03-26 21:07:53 +10:00
Damien Elmes
65b8988817
reduce the chances of add-ons preventing collections from loading
...
https://anki.tenderapp.com/discussions/ankidesktop/39953-sync-fail-with-images#comment_48182205
2020-03-26 09:53:15 +10:00
evandrocoan
b1b3e5b87c
Merge remote-tracking branch 'danielelmes/master' into fix_tests_on_windows
...
# Conflicts:
# .github/scripts/trailing-newlines.sh
2020-03-23 18:44:11 -03:00
Damien Elmes
f429986246
fix collection_did_load() not being called, and remove dead code
...
https://anki.tenderapp.com/discussions/ankidesktop/39765-_colloadingstate-is-never-run-thus-collection_did_load-hook-is-never-triggered
2020-03-23 18:57:23 +10:00
Damien Elmes
7a4f3d0318
dump more info in card()/bcard()
2020-03-23 18:39:00 +10:00
Damien Elmes
55c9f5dbeb
wait for media sync to complete before unloading collection
2020-03-20 21:15:23 +10:00
Damien Elmes
d03e13a1bd
reuse the existing backend instead of creating a new one
2020-03-20 21:15:23 +10:00
Damien Elmes
ba17567617
drop the separate i18n backend
2020-03-20 21:15:23 +10:00
Damien Elmes
fa12213e98
move .reopen() to mw; fix exporting
2020-03-20 21:15:23 +10:00
Damien Elmes
0f38514ad7
drop the DB progress handler code
...
This code was an awful hack to provide some semblance of UI
responsiveness while executing DB statements on the main thread.
Instead, we can just run DB statements in a background thread now,
keeping the UI responsive.
2020-03-20 21:15:23 +10:00
Damien Elmes
32555b2857
run Check DB in a background thread
...
Since the DB is now stored behind a mutex, we're no longer limited
to accessing the database on the main thread.
2020-03-20 21:15:23 +10:00
Damien Elmes
6db4418f05
drop log= argument from Collection
2020-03-20 21:15:23 +10:00
Damien Elmes
f4d4078537
drop named sql arguments
2020-03-20 21:15:23 +10:00
Damien Elmes
0d43e9dca3
tweak add-on wording
2020-03-20 21:00:21 +10:00
Arthur Milchior
bfc305fa26
hook backup_is_done
...
I expect to use this hook in add-on 529955533. It'll serve me to
create long term backup at the same time than your backup
2020-03-19 13:21:00 +01:00
evandrocoan
1ade1a1a0f
Fixed moved comment line on qt/aqt/main.py, long variables names on
...
pylib/Makefile and qt/Makefile, and rg --version not going to /dev/null
on .github/scripts/trailing-newlines.sh
2020-03-18 11:36:50 -03:00
evandrocoan
034ac10cf4
Fixed error: Incompatible types in assignment on qt/aqt/main.py
...
aqt\main.py:1437: error: Incompatible types in assignment (expression has type Module, variable has type "LibraryLoader[WinDLL]") [assignment]
_dummy = wintypes
^
2020-03-17 19:48:16 -03:00
Arthur Milchior
5adbc33d4c
hook debug_ran_hook
2020-03-06 15:01:22 +01:00
Arthur Milchior
3319b114de
hook debug_will_show_hook
2020-03-06 15:01:02 +01:00
Damien Elmes
43f5d13ed6
migrate strings with trailing newlines to fluent
2020-02-27 20:36:40 +10:00
Alan Du
a63c9e5a9a
Apply mypy improvements to aqt
2020-02-26 22:27:58 -05:00
Arthur Milchior
5ff1f3890f
Add a hook to change empty cards to delete
2020-02-26 10:59:34 -08:00
Damien Elmes
49cda5ffbb
rename aqt/media.py to mediacheck.py
2020-02-17 08:40:17 +10:00
Damien Elmes
6f158c8555
plug new media check in
2020-02-17 08:40:17 +10:00
Damien Elmes
d38c2c12d5
autosync media every ~15 minutes
2020-02-17 08:40:17 +10:00
Damien Elmes
12d009e503
autosync media on close
2020-02-17 08:40:17 +10:00
Damien Elmes
59a7993011
autosync media on startup
2020-02-17 08:40:17 +10:00