Commit graph

521 commits

Author SHA1 Message Date
evandrocoan
b376b78527 Deprecated eval usage on qt/tools/typecheck-setup.sh 2020-03-23 18:54:24 -03:00
evandrocoan
093af85c2e 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
8b3995c1fc formatting 2020-03-23 19:54:01 +10:00
Damien Elmes
c5fa0b130e reduce the chances of a race condition in mplayer code
Not perfect, it may still happen.

https://anki.tenderapp.com/discussions/ankidesktop/39832-an-error-occurred-audio
2020-03-23 19:15:32 +10:00
Damien Elmes
a34dcb709e don't pop up network errors for media sync
log them instead
2020-03-23 19:06:13 +10:00
Damien Elmes
6a9ed72269 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
0c4feaa800 cache dark mode value so UI doesn't break when it changes
https://anki.tenderapp.com/discussions/ankidesktop/39550-cant-deactivate-night-mode-on-2121-for-mac
2020-03-23 18:39:37 +10:00
Damien Elmes
1bd4d0db4e dump more info in card()/bcard() 2020-03-23 18:39:00 +10:00
Damien Elmes
1e9197a4d3 fix English being shown in prefs for fully qualified langs like zh-CN
https://anki.tenderapp.com/discussions/ankidesktop/39845-a-new-bug-has-been-found
2020-03-23 16:08:06 +10:00
Damien Elmes
ac78699d13 add back new_timezone_enabled(), as it's used in the prefs screen 2020-03-23 07:40:50 +10:00
Damien Elmes
28b0281972 allow customizing search order 2020-03-21 17:38:09 +10:00
Damien Elmes
6d7bf16b5a fix reversing sort order 2020-03-21 16:57:33 +10:00
Damien Elmes
eab7686d2f remove old finder code; add search hooks to browser & remove old one 2020-03-21 16:38:46 +10:00
Damien Elmes
67d1842691 enable sorting on the extra browser columns 2020-03-21 07:55:53 +10:00
Damien Elmes
cdb85ef72e disable word wrap in browser rows 2020-03-20 21:15:23 +10:00
Damien Elmes
f3296382ea ensure endReset() is called even if an exception is raised 2020-03-20 21:15:23 +10:00
Damien Elmes
c13056773b flush config on sort order change 2020-03-20 21:15:23 +10:00
Damien Elmes
2ea17d272c wait for media sync to complete before unloading collection 2020-03-20 21:15:23 +10:00
Damien Elmes
e980d20a40 reuse the existing backend instead of creating a new one 2020-03-20 21:15:23 +10:00
Damien Elmes
5aba5c3ab9 drop the separate i18n backend 2020-03-20 21:15:23 +10:00
Damien Elmes
fa527bca4f import .colpkg in a background thread 2020-03-20 21:15:23 +10:00
Damien Elmes
8c6e2cdb82 import .apkg files in a background thread 2020-03-20 21:15:23 +10:00
Damien Elmes
128b45aa40 import mapped files like csv in a background thread 2020-03-20 21:15:23 +10:00
Damien Elmes
37b24bf782 export in a background thread 2020-03-20 21:15:23 +10:00
Damien Elmes
258a8282d4 move .reopen() to mw; fix exporting 2020-03-20 21:15:23 +10:00
Damien Elmes
07381f74e6 fix mypy warning 2020-03-20 21:15:23 +10:00
Damien Elmes
a02c4ed994 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
cd78da24d9 use a timer to automatically show progress window
We were previously relying on the DB progress hook to cause the
progress window to display.

Qt's progress dialogs do have built in support for automatically
showing, but it's easier to add a timer than change the existing
code to use it.
2020-03-20 21:15:23 +10:00
Damien Elmes
df33b04be8 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
3f3a45e2ba add Collection struct, and get media check working again
- media check no longer needs collection to be closed
- use savepoints for operations initiated by Rust, so they are
atomic without forcing a commit
2020-03-20 21:15:23 +10:00
Damien Elmes
0147d9e470 drop log= argument from Collection 2020-03-20 21:15:23 +10:00
Damien Elmes
9e67ea736a drop named sql arguments 2020-03-20 21:15:23 +10:00
Damien Elmes
6d0c84a1e9 drop progress handler and timeout arg 2020-03-20 21:15:23 +10:00
Damien Elmes
f6472f7430 tweak add-on wording 2020-03-20 21:00:21 +10:00
Damien Elmes
1accffbd34 Merge pull request #517 from Arthur-Milchior/backup_is_done
hook backup_is_done
2020-03-20 20:56:33 +10:00
Damien Elmes
9a36800ddb Merge pull request #470 from Arthur-Milchior/accept_card
Hook to decide whether a note should be added.
2020-03-20 20:56:04 +10:00
Damien Elmes
9ea9bab3fa Merge pull request #514 from evandroforks/box-sizing_border-box
Added box-sizing: border-box; to typeans by default
2020-03-20 20:50:40 +10:00
Damien Elmes
44a704b27b Merge pull request #516 from Arthur-Milchior/hook_models_advanced_will_show
Hook models_advanced_will_show
2020-03-20 20:42:14 +10:00
Arthur Milchior
1993c0af70 Browser introduce method time_format
I expect to use this in my add-on 1243668133 (by monkey patching in
this case) where it would allow to show hours/minutes/seconds... in browser
2020-03-19 22:59:59 +01:00
Arthur Milchior
7192ee96ac 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
Arthur Milchior
6e85e8ccce Hook models_advanced_will_show
This will be useful for add-on 1863928230. I want to let users change
the LaTeX footer/header everywhere.
2020-03-19 12:03:09 +01:00
Arthur Milchior
339bbd88a8 Hook to decide whether a note should be added. 2020-03-19 03:39:53 +01:00
evandrocoan
00424fc404 Added box-sizing: border-box; to typeans by default
https://anki.tenderapp.com/discussions/beta-testing/1854-using-margin-auto-causes-horizontal-scrollbar-on-typesomething
2020-03-18 20:31:11 -03:00
evandrocoan
5d75a0c9f1 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
51477a4033 Fixed mypy and pylint not building on Windows
1. error: unused 'type: ignore' comment
2. Module 'pywintypes' has no 'error' member
3. Module 'win32pipe' has no 'SetNamedPipeHandleState' member,
   but source is unavailable. Consider adding this module to
   extension-pkg-whitelist if you want to perform analysis based on
   run-time introspection of living objects.
2020-03-17 19:48:16 -03:00
evandrocoan
1fe4860b56 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
evandrocoan
c4e94ddc20 Fixed typecheck-setup.sh: sudo: command not found on Windows 2020-03-17 19:48:16 -03:00
evandrocoan
105e2a2502 Fixed make check for pylint not working on Windows due
F:\Python\python.exe: can't open file '/cygdrive/f/anki/pyenv/Scripts/pylint': [Errno 2] No such file or directory
2020-03-17 19:48:16 -03:00
Damien Elmes
f3d718eba2 Merge pull request #509 from Arthur-Milchior/type_queue_in_browser
adding missing constants in browser file
2020-03-17 21:33:08 +10:00
Damien Elmes
77e6661517 Merge pull request #506 from Arthur-Milchior/editor_web_view_did_init
Hook editor_web_view_did_init
2020-03-17 20:53:20 +10:00