Henrik Giesel
44fb7e3dc2
Open AddonsDialog via dialog manager
2020-12-26 18:07:37 +01:00
Damien Elmes
0b848eae56
update remaining python format strings to Fluent
2020-11-22 14:57:53 +10:00
Damien Elmes
ffa26fe4bc
fix remaining _() references; remove unused imports
2020-11-18 12:43:46 +10:00
Damien Elmes
ba336d5de3
update multi-line _() references
2020-11-18 11:32:22 +10:00
Damien Elmes
e527d31dfc
begin plural string migration
2020-11-17 23:29:08 +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
a517accee3
update to latest black
2020-08-31 13:29:28 +10:00
ANH
9eb11b53d5
remove unicode isolation markers from add-on config editor title
2020-08-31 00:35:17 +03:00
Fabian Wood
d27e33a206
Fixed runtime error from changes in qt addons.py
...
Changes to meet returning of Iterable (rather than List), meant
returning a different variable, but that may not have been created.
Reverted, changing to return List.
2020-08-01 17:50:37 +10:00
Fabian Wood
3da0737a57
Updated qt addons with more extensive typehints
2020-08-01 15:50:27 +10:00
Matt Krump
7d8f856060
Turn on check_untyped_defs for aqt.addons
2020-07-30 18:43:57 -06: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
5e5dc517ca
work around yet another qt bug
...
https://anki.tenderapp.com/discussions/beta-testing/2017-httpsforumsankiwebnettrestore-defaults-config-not-visually-updated420
2020-06-24 11:12:45 +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
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
Damien Elmes
ce589fb975
Revert "Merge pull request #562 from ijgnd/master"
...
This reverts commit 4fb9dc734b
, reversing
changes made to c8fb409a49
.
https://anki.tenderapp.com/discussions/beta-testing/1920-config-can-copy-paste-but-cant-click-links-now
2020-04-21 09:10:45 +10:00
ijgnd
e745677145
make help text selectable
...
This allows the user to copy e.g. values so that they don't have to retype them which might introduce typos.
2020-04-15 18:59:04 +02:00
Damien Elmes
a552abe688
update if a compatible branch is found, even if mtime is wrong
...
https://anki.tenderapp.com/discussions/ankiweb/4668-addon-auto-update-problems
2020-04-15 18:47:04 +10:00
Arthur Milchior
5482cafef2
Allow add-on dev to show personalized message.
...
The error should be in "error_msg"
They can show:
* the original error message with {problem}
* the path of the error with {path},
* the value which does not match against the subchema with {error}
* the subschema against which the error occurs with {schema}
Thanks to Glutanimate for the idea https://github.com/ankitects/anki/pull/495#issuecomment-596685227
2020-03-11 01:39:39 +01:00
Arthur Milchior
0b04da6419
snake case for addon_schema
2020-03-11 00:56:14 +01:00
Arthur Milchior
74b2b18966
hook single_addon_selected
2020-03-09 12:45:10 +01:00
Arthur Milchior
4e1838bba8
hook addons_dialog_will_show
2020-03-09 12:45:10 +01:00
Arthur Milchior
c9b89c5394
More precise schema failure message
...
While creating schema for the add-on I used, I realized that my error
message was not precise enough.
For a big configuration such as in "Enhance main window", the message
"None is not of type 'string'" is almost useless.
So I added a path in the json config, to indicate where the error
is. And also which subschema is currently being used.
2020-03-08 16:38:06 +01:00
Damien Elmes
5f4839a901
Merge pull request #495 from Arthur-Milchior/check_schema_before_accepting
...
add-on config check schema of user config
2020-03-06 21:14:47 +10:00
Arthur Milchior
01c74bc015
add-on config check schema of user config
2020-03-05 16:31:17 +01:00
Damien Elmes
6bc3462700
fix regression introduced by PR #492
2020-03-05 09:24:26 +10:00
Damien Elmes
78e9959e78
Merge pull request #492 from Arthur-Milchior/print_json_decode_error
...
print json decode error message
2020-03-05 07:26:17 +10:00
Arthur Milchior
85966f42dc
print json decode error message
...
The main point is to allow add-on dev' to debug their own json
2020-03-04 15:29:48 +01:00
Arthur Milchior
bc67268d82
config_unprettify_json
2020-03-04 08:25:14 +01:00
Arthur Milchior
e4986c7784
hook prettify_json
2020-03-04 08:25:14 +01:00
Glutanimate
d22ad11224
Display add-on name in add-on configuration window title
2020-02-29 20:15:23 +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
Damien Elmes
3ea272989b
fix negative number in compat message
2020-02-18 08:27:47 +10:00
Arthur Milchior
fc5c1fd16a
correct missing french translation
2020-02-05 20:48:30 -08:00
Damien Elmes
8dd75edaa9
default human_version to None
2020-02-04 17:03:21 +10:00
ijgnd
de9331a03e
add human_version to manifest.json
...
edit 7586c67 add human_version to manifest.json
2020-02-04 04:16:12 +01:00
Damien Elmes
7f2109cf04
tolerate branch idx out of range
...
Branches can't be deleted at the moment, but this may change in the
future.
2020-01-27 17:59:40 +10:00
Damien Elmes
b76f153ffd
rework update checks to match latest AnkiWeb API
2020-01-27 17:01:09 +10:00
Damien Elmes
45e8a9a364
fix +ve max versions being marked as disabled
2020-01-27 16:58:12 +10:00
Damien Elmes
b4c8eaf4bb
support min/max add-on versions in download and ankiaddon manifest
2020-01-24 17:25:52 +10:00
Damien Elmes
be3393fcb4
simplify taskman, and add .run_on_main()
2020-01-22 14:09:51 +10:00
Damien Elmes
b6ed84998d
fix download log newlines
2020-01-19 16:46:24 +10:00
Damien Elmes
766321d746
avoid setting provided_name if not in the json
2020-01-19 14:10:48 +10:00
Damien Elmes
5d9661cee5
update add-ons even if they're disabled
...
If a user enables an old add-on and restarts immediately, it won't have
had a chance to update, and may raise errors that could have been
prevented if the user was running the latest version.
2020-01-19 14:04:57 +10:00
Damien Elmes
6fe6a9e597
send point version when downloading
...
AnkiWeb will return a 404 if add-on does not support that version
2020-01-19 13:43:16 +10:00
Damien Elmes
66714260a3
automatically disable add-ons that have been marked as incompatible
2020-01-19 13:37:55 +10:00
Damien Elmes
a619130e5e
add write_addon_meta(); use methods for derived values
2020-01-19 13:06:53 +10:00
Damien Elmes
54ca4efb8e
use an object for add-on metadata instead of reading the dict directly
...
also, sort disabled add-ons to the end
2020-01-19 12:44:53 +10:00
Damien Elmes
ef8bb61fc3
AnkiRequestsClient -> HttpClient
2020-01-19 11:33:27 +10:00
Damien Elmes
6134ae9ec6
refactor add-on downloading/installing/updating
...
- web requests done on a background thread
- easier to use outside of the addon dialog
- gets max point version info from AnkiWeb, which we can use in
the future
2020-01-19 10:37:15 +10:00
Damien Elmes
49bba16f24
fix display errors on macOS after updating add-ons
2020-01-19 10:33:51 +10:00
Damien Elmes
0d1a25eb5b
move AnkiRequestsClient into its own file
...
It should still be accessible via anki.sync as well.
2020-01-18 15:45:14 +10:00
Glutanimate
a2124e2ee8
Use add-on name rather than package name when reporting on conflicts
...
Brings _installationSuccessReport more in line with messaging in
AddonManager.toggleEnabled
2020-01-04 04:49:36 +01:00
Glutanimate
7348e9c69e
Further tweak messaging depending on Anki's state at installation time
2020-01-04 04:45:43 +01:00
Glutanimate
6a7f11b172
When possible, install add-on before add-ons are loaded
...
Removes the need to restart Anki if it is not running when
user launches .ankiaddon file
2020-01-04 04:34:16 +01:00
Glutanimate
d9e56e22f9
Fix type hints and remove obsolete argument
2020-01-04 04:31:33 +01:00
Glutanimate
392938f20c
Adjust type annotations, format string, and remove tooltip on cancel
...
Other areas of Anki don't confirm cancelling actions with tooltips,
so after further consideration, the tooltip felt out of the place and
might have actually confused users into thinking some action was
being performed.
2020-01-04 01:30:20 +01:00
Glutanimate
1b236acb3d
Fix mypy and black checks
2020-01-03 18:23:28 +01:00
Glutanimate
e3b7096db5
Extend CLI with the ability to install .ankiaddon packages
...
Allows Anki to register a mime-type handler for .ankiaddon files
Other small collateral changes:
+ fix positioning issues with some prompts and progress dialog
+ add prompt titles where they were missing
+ add type annotations for AddonManager installation methods
+ explicitly import os in main (used to be imported via aqt.qt)
2020-01-03 17:57:33 +01:00
Glutanimate
ce1853167b
Refactor add-on installation error handling
...
Allows extending the installation pathways more easily.
In preparation of .ankiaddon file type handling.
2020-01-03 16:32:20 +01:00
Damien Elmes
5876866565
tweaking the folder names again
...
hopefully that's the last of it
2020-01-03 07:48:38 +10:00