Commit Graph

47 Commits

Author SHA1 Message Date
RumovZ
e29bd4479b Make clickable dyndeck labels fixed in size 2021-03-01 11:26:52 +01:00
Damien Elmes
5564fd9e13
Merge pull request #1040 from RumovZ/deck-name-err
Catch deck rename errors and localise warnings
2021-03-01 09:40:55 +10:00
RumovZ
92cbf168f6 Catch DeckIsFilteredError directly on frontend 2021-02-26 11:32:40 +01:00
RumovZ
8e43b29816 Localise RenameDeckError 2021-02-24 13:57:44 +01:00
RumovZ
e95c2fa6ce Fix type hints in dyndeckconf 2021-02-24 11:24:27 +01:00
RumovZ
234ca4d496 Refactor dyndeckconf/on_hint_button 2021-02-24 11:14:33 +01:00
RumovZ
d6b1c0cf3a Give dyndeck hint unique styling 2021-02-23 23:34:05 +01:00
RumovZ
ae88f7e593 Add clickable hint to dyndeckconf 2021-02-23 23:14:11 +01:00
RumovZ
5a37b8e2af Add direct col reference to dyndeckconf 2021-02-23 22:31:04 +01:00
Damien Elmes
35840221bb tweak search wording and tidy up API
- SearchTerm -> SearchNode
- Operator -> Joiner; share between messages
- build_search_string() supports specifying AND/OR as a convenience
- group_searches() makes it easier to negate
2021-02-11 19:57:19 +10:00
Damien Elmes
bb29ce88f3 minor code cleanups with pyupgrade
- pyupgrade --py38-plus --keep-runtime-typing --keep-percent-format
- third-party mpv and winpaths excluded
2021-02-11 09:43:40 +10:00
Damien Elmes
bb30e8f7bc use constants for other color references
str_color/qcolor() doesn't appear to have been used by any add-ons
except one of mine, so changing the signature should be safe
2021-02-05 18:58:22 +10:00
RumovZ
2499f2ae34 Remove standard button translations 2021-02-02 11:57:35 +01:00
RumovZ
b450c8d45c Add remaining type hints to dyndeckconf etc. 2021-02-01 23:46:56 +01:00
RumovZ
c18af2a0a9 Merge branch 'master' into dyn-deckconf 2021-02-01 23:33:41 +01:00
RumovZ
2ddb4edbb0 Rename standard buttons to have transaltions 2021-02-01 23:20:57 +01:00
RumovZ
4666ba8b70 Enable renaming from dyndeck dialogue 2021-02-01 21:02:22 +01:00
RumovZ
8065e73ef8 Add cross links for second dyndeck filter 2021-02-01 19:10:05 +01:00
RumovZ
0d37254238 Style browser-from-filtered-deck button
Use theme color and add hover effect.
2021-02-01 18:01:57 +01:00
Damien Elmes
a56b09b987 add a bunch of return types 2021-02-01 23:53:23 +10:00
RumovZ
4d097b995d Add button in dynDeckConf to search in browser 2021-02-01 13:55:03 +01:00
Damien Elmes
f15715fb07 add types to various other files
Mainly automated with MonkeyType
2021-02-01 22:08:56 +10:00
RumovZ
d2024d1d1e Fix pylints and type annotations in dyndeckconf
Also fix int representation of learning steps.
2021-02-01 09:56:10 +01:00
RumovZ
52867dfa6c Make dyndeckconf a registered dialogue 2021-01-31 22:37:08 +01:00
RumovZ
0960ea6ece Rework dynndeckconf
- Handle deck building inside class. New deck is built unless caller
  passes filtered deck.
- If no deck is passed and current deck is filtered, copy settings.
- Remove exec_().
2021-01-31 18:20:47 +01:00
Damien Elmes
9d853bbb03 start work on more clearly defining backend/protobuf boundaries
- anki._backend stores the protobuf files and rsbackend.py code
- pylib modules import protobuf messages directly from the
_pb2 files, and explicitly export any will be returned or consumed
by public pylib functions, so that calling code can import from pylib
- the "rsbackend" no longer imports and re-exports protobuf messages
- pylib can just consume them directly.
- move errors to errors.py

Still todo:

- rsbridge
- finishing the work on rsbackend, and check what we need to add
back to the original file location to avoid breaking add-ons
2021-01-31 18:55:45 +10:00
RumovZ
b0890b0e47 Manually namespace enum variants in SearchTerm
In protobuf "...enum values use C++ scoping rules, meaning that
enum values are siblings of their type, not children of it.
Therefore, [an enum variant] must be unique within [a message],
not just within [the enum.]"
So we must prefix enum variants with their enum's name, but can
also call them directly from the message namespace.
The protobuf crate is smart, though, and strips the prefixes.

(Simultaneously change some SearchTerm variant names.)
2021-01-30 17:56:29 +01:00
Damien Elmes
52bac7a7a1 use a separate enum for the is:* searches 2021-01-30 10:49:00 +10:00
RumovZ
c299e271e8 Refactor search_string() and FilterToSearchIn
See #955.
2021-01-29 18:27:33 +01:00
RumovZ
77765d4896 Replace remaining literal searches in aqt 2021-01-28 11:19:07 +01:00
RumovZ
ea46e24662 Use col instead of backend in aqt for search strs 2021-01-28 11:17:24 +01:00
Damien Elmes
e324f06348
Merge pull request #944 from Arthur-Milchior/help
NF: HelpPage in an enum
2021-01-26 11:33:39 +10:00
Arthur Milchior
e0a2d90a68 NF: HelpPage in an enum
Hopefully, this can help with updating on next manual update and maybe even linking to manual translation
2021-01-26 02:16:37 +01:00
RumovZ
52c27e7b99 Normalize dyndeck search and handle exception 2021-01-25 23:21:32 +01:00
Damien Elmes
94064b8230 convert setWindowFlags call into helper, and fix invalid variables
"type: ignore" was masking the invalid references to self in places
like showText()
2021-01-07 14:24:49 +10:00
BlueGreenMagick
6224658c0d remove context help button 2021-01-06 22:15:48 +09:00
abdo
f67e319f1f Strip isolation characters from more strings 2020-11-18 18:03:04 +03: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
2453e5c488 update temporary val="%s" references to standard ftl 2020-11-17 22:00:44 +10:00
Damien Elmes
9d1b6231d7 merge pylib references 2020-11-17 19:23:06 +10:00
Damien Elmes
6418993840 merge bulk of qt/ - designer files still to do 2020-11-17 17:42:43 +10:00
johan456789
06f1aeb052 fix help url paths 2020-10-10 00:38:07 +08:00
Damien Elmes
ade7f438ce rebuild_filtered_deck() and new_filtered() 2020-09-03 18:02:47 +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
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
5876866565 tweaking the folder names again
hopefully that's the last of it
2020-01-03 07:48:38 +10:00