Commit Graph

991 Commits

Author SHA1 Message Date
Matt Krump
b0dd85f87e Add type hints to aqt.models
* Add type hints to aqt.models
* Turn on type checking for aqt.models
2020-07-24 10:59:45 -06:00
Damien Elmes
61e8611b7b fix lint issue in previewer, and drop unused code
No add-ons appear to be using the removed code, and Anki wasn't
using it either.
2020-07-24 12:18:37 +10:00
Damien Elmes
2cba721702 formatting and debug statement tweak 2020-07-24 11:57:37 +10:00
Damien Elmes
26426cb11e fix preview not updating on edit
https://forums.ankiweb.net/t/modification-and-preview/1331
2020-07-24 11:57:22 +10:00
Damien Elmes
c3266ea060 enable AltGr workaround by default
5.15.1 may still be another month away
2020-07-24 10:32:50 +10:00
Damien Elmes
80a2bfa642 ask user to check db when graphs fail to load 2020-07-24 09:56:28 +10:00
Damien Elmes
ad628d0f36
Merge pull request #702 from mkrump/help-wanted-4-add-type-hints
Add type hints for apt.dyndeckconf
2020-07-24 09:01:07 +10:00
Matt Krump
4bc98cd0ca Add type hints for apt.dyndeckconf
* Add type hints for apt.dyndeckconf
* Turn on check_untyped_defs for apt.dyndeckconf
2020-07-23 16:04:46 -06:00
kelciour
f2027cca96 Add --no-autoload-files option to mpv 2020-07-23 14:28:47 +03:00
Damien Elmes
2ff1a27b04 fix misaligned deck heading in RTL languages
https://forums.ankiweb.net/t/anki-2-1-29-beta/1220/2?u=dae
2020-07-22 11:00:39 +10:00
Damien Elmes
1b441f5050 fix pylint failing in CI 2020-07-21 16:16:34 +10:00
Damien Elmes
86fc7446b0 protect against exception on initial recording wait 2020-07-21 16:07:58 +10:00
Damien Elmes
412f1777bd bump version 2020-07-21 15:54:14 +10:00
Damien Elmes
3337c96fdb trigger recording permission on newer macOS SDKs 2020-07-21 15:54:04 +10:00
Damien Elmes
1e6a37e0e6 formatting 2020-07-21 14:17:56 +10:00
Damien Elmes
01ff6ab55d apply rtl dir to webviews
https://forums.ankiweb.net/t/gui-problems-with-right-to-left-languages/1205
2020-07-21 11:52:25 +10:00
Damien Elmes
b5cbfe3bbb full sync terminates media sync; start it again afterwards
https://forums.ankiweb.net/t/media-files-not-downloaded-in-first-full-sync-v2-1-28/1198/3
2020-07-21 11:26:41 +10: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
c203410307 split add-ons window title from menu bar action
https://anki.tenderapp.com/discussions/private/4781-print-mistake
2020-07-19 09:49:36 +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
f741b05f56
Merge pull request #690 from glutanimate/stats-will-show-hooks
Add a couple of hooks to trigger add-on actions before showing stats
2020-07-17 14:38:41 +10:00
Glutanimate
0fedf5c825 Fix type annotation for old stats dialog class 2020-07-17 03:08:09 +02:00
Glutanimate
b89811bfba Add a couple of hooks to trigger add-on actions before showing stats 2020-07-16 21:48:46 +02:00
Glutanimate
fe81da9b8a Make sure to set domDone to False before loading URLs
Fixes an issue where JS would be evaluated prematurely in views
directly loaded from URLs.
2020-07-16 19:56:57 +02:00
Damien Elmes
2824be25f0 formatting 2020-07-16 13:55:53 +10:00
Damien Elmes
fa239be124 add platform version back into sync metadata 2020-07-16 10:12:41 +10:00
Damien Elmes
320b56ae43 can't rely on stdout to handle unicode 2020-07-15 09:36:29 +10:00
Damien Elmes
eb91ff7421
Revert "Added parameter/return types, fixed possible logic error and typo" 2020-07-13 21:25:44 +10:00
Damien Elmes
5c6ca55e42
Merge pull request #686 from zerrs/master
Added parameter/return types, fixed possible logic error and typo
2020-07-13 21:25:16 +10:00
Damien Elmes
2af1d68b05
Update customstudy.py 2020-07-13 21:24:18 +10:00
Damien Elmes
c3800b6f9a
Merge pull request #684 from flagist0/select-note-type-with-ctrl-plus-digit-key
Allow to choose note type from list by pressing ctrl + row number
2020-07-13 21:23:35 +10:00
Alexander Presnyakov
364725a528 Don't call setCurrentRow if row didn't change 2020-07-13 12:33:36 +03:00
zzzz
d6d952d0fd Added some return and parameter types in customstudy.py, also fixed a possible logic error in plus function and a small typo 2020-07-13 01:32:08 -04:00
kelciour
ef1d61e35c Scroll media sync log to the last line 2020-07-13 03:06:44 +03:00
Alexander Presnyakov
e092dadc9a Allow to choose note type from list by pressing ctrl + row number 2020-07-12 22:15:58 +03:00
Damien Elmes
bc5b6dfb63 mediasrv symlink fix
https://forums.ankiweb.net/t/anki-2-1-28-beta/629/39
2020-07-11 10:53:41 +10:00
Glutanimate
15fd3a4856 Add top_toolbar_did_redraw hook
Notifies add-ons of the top toolbar being redrawn
2020-07-10 17:38:40 +02:00
Damien Elmes
93425be839 formatting 2020-07-07 13:28:30 +10:00
Damien Elmes
85cbd263da tidy up logging 2020-07-07 10:50:12 +10:00
Damien Elmes
4ab9d04c95 if webexports does not match, return 403 2020-07-07 10:50:03 +10:00
evandrocoan
121725390d Fix _addons/ URL prefix not being removed on Windows systems
Anki 2.1.28 Beta
https://forums.ankiweb.net/t/anki-2-1-28-beta/629/26

> Did the requirements on how to expose resources on the internal server change? Because scripts, css files and the like, registered with setWebExports, do not work anymore with beta2.
> A look at the console shows the following for all resources:
> Failed to load resource: the server responded with a status of 500 (INTERNAL SERVER ERROR)

**\Anki2\addons21\someaddon\__init__.py**
```py
from aqt import mw
import aqt

# assuming add-on folder is named "test"
# and assuming a 'test.js' is in the same folder
addon_id = "someaddon"
port = mw.mediaServer.getPort()
mw.addonManager.setWebExports(addon_id, ".*\\.js$")

print("Hello")

aqt.editor._html += f"""
<script>
    var script = document.createElement('script');
    script.type = 'text/javascript';
    script.src = 'http://127.0.0.1:{port}/_addons/{addon_id}/test.js';
    document.body.appendChild(script);
</script>"""
```
2020-07-06 13:51:37 -03:00
Andreas Reis
e8ddd17fec Always use standard QT color dialog on Linux
On Linux only Gnome uses its own color dialog, and it's inferior to QT's own: See the same issue @ https://github.com/OpenShot/openshot-qt/pull/2425

(This is/was visible only on some distributions' packaged versions of Anki, not via ./run.)

isLin check since QT on Windows already uses the default, whereas Mac's own picker seems superior (from what I can judge by screenshots).
2020-07-05 13:21:38 +02:00
Damien Elmes
4033f00988 don't stuff mw into function objects
Using the global is preferable to fighting against mypy to insert mw
into a function object.
2020-07-03 10:55:29 +10:00
Damien Elmes
14602be0ca port previous css workaround to flask 2020-07-03 10:40:23 +10:00
Damien Elmes
e45c939649
Merge pull request #554 from evandroforks/fix_html5_media_support
Fixed HTML5 media tags
2020-07-03 10:25:43 +10:00
evandrocoan
476b881987 Replaced flask.Response by flask.make_response to simplify the
implementation and because make_response is preferred over Response
as it respects the server defined Response type.
2020-07-02 20:39:03 -03:00
evandrocoan
a99e455414 Removed duplicated mediasrv.py security check and fixed invalid
command/path error message.
2020-07-02 20:39:03 -03:00
evandrocoan
1218d109e8 Fix jest unit tests after merge
# Conflicts:
#	qt/aqt/mediasrv.py
#	qt/ts/src/ankimedia.ts
#	qt/ts/src/reviewer-exceptions.test.ts
#	qt/ts/src/reviewer.test.ts
#	ts/package.json
2020-07-02 14:30:43 -03:00