Damien Elmes
be823c39f0
tweak getFile() arguments in editor to be more readable
2021-02-19 10:18:40 +10:00
Damien Elmes
28a9ba473d
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
42a44875ab
convert qt strings to f-strings with flynt
...
Also revealed an incorrect type def in editor.py that mypy wasn't
noticing before :-(
2021-02-11 10:09:06 +10:00
Damien Elmes
bf7528d90a
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
23ed8578a5
add opus to supported audio list and sort
2021-02-06 15:11:24 +10:00
Damien Elmes
b44cc23b66
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
b21d1dcbc0
Merge branch 'master' into dyn-deckconf
2021-02-01 23:33:41 +01:00
RumovZ
b76632eb62
Add button in dynDeckConf to search in browser
2021-02-01 13:55:03 +01:00
RumovZ
d57d0f977b
Make browser accept optional args and add reopen
...
That way, the caller doesn't have to hold a reference to the browser and
explicitly call it again, if it wants to search for something specific.
Also, if the browser was closed and opened for a single-card-search, it
now won't perform a redundant current-deck-search first.
2021-02-01 11:54:28 +01:00
Damien Elmes
8dc5ea8bb6
add types to utils.py
...
The function signatures for things like getFile() are awful, but
sadly are used by a bunch of add-ons.
2021-02-01 20:23:48 +10:00
Damien Elmes
34935bf478
add types to editor.py
2021-02-01 17:28:35 +10:00
Damien Elmes
9a697fd843
Merge branch 'more-backend-search' into main
2021-01-31 14:21:51 +10:00
RumovZ
540338cea3
Import SearchTerm from collection in aqt
2021-01-30 12:51:24 +01:00
Damien Elmes
f6f537e89f
simplify Dupe message and ditch helper function
...
Calling code doesn't need to know about the existence of such helpers;
it can just rely on code completion to discover the required arguments.
2021-01-30 11:10:26 +10:00
Henrik Giesel
9771b5394c
Add semicolon in js message
2021-01-29 19:48:17 +01:00
RumovZ
c7365abc9e
Refactor search_string() and FilterToSearchIn
...
See #955 .
2021-01-29 18:27:33 +01:00
Henrik Giesel
1f5793e9e7
Remove user styling in editor again for now
2021-01-29 14:54:59 +01:00
Henrik Giesel
49c3723647
Allow stylesheet of note type take effect on editor fields
2021-01-29 14:54:58 +01:00
Henrik Giesel
b423c372d5
Fix dupes, but also make sticky, and centered to draw more attention
2021-01-29 14:54:58 +01:00
Damien Elmes
c0e0cabd73
drop potentially slow regex usage in cloze check
...
Closes #956 , thanks to Henrik.
2021-01-29 11:15:33 +10:00
RumovZ
e629e32c12
Add browser_search helper in mw
2021-01-28 20:51:32 +01:00
Arthur Milchior
cb2df4fc1a
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
Henrik Giesel
f462f54e55
Space items by using margins instead of spaces
...
* also changed name of topbutton container back to topbutsOuter as it is clearer
* starting with Chromium 83, `row-gap` would be better suited for this
2021-01-22 12:17:10 +01:00
Henrik Giesel
e1979ef9a0
Switch from floating windows and clearfix to flex and justify-content: space-between
2021-01-22 11:37:11 +01:00
Henrik Giesel
431b2fde63
Adjust the positioning of the editor toolarea via CSS
2021-01-21 21:36:33 +01:00
Henrik Giesel
ba7252b664
Explicitly execute code deactivating button focus from editor.py
2021-01-20 17:06:08 +01:00
RumovZ
895b3a0b6f
Use backend to set dupe filter
2021-01-14 10:42:37 +10:00
Henrik Giesel
cd09db2abe
Make keys parameter requiring func parameter in _addButton explicit
2021-01-10 13:42:23 +01:00
Henrik Giesel
961de57ed9
Fix formatting, use shortcut on preview before displaying
2021-01-10 01:50:00 +01:00
Henrik Giesel
1940c90f62
Activate toggle on hotkey invocation
2021-01-10 01:10:23 +01:00
Damien Elmes
2b5ef0b9a8
fix qt/ pylints
2021-01-07 16:21:50 +10:00
Damien Elmes
8075d46011
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
9a29d1b97a
remove context help button
2021-01-06 22:15:48 +09:00
Damien Elmes
c3ff88ab88
fix media attachment
...
insertHtmlRemovingInitialBR() was removed in a previous PR
2020-12-30 19:30:23 +10:00
Henrik Giesel
b9dfab79dd
Avoid building jquery to its own directory
2020-12-28 14:18:07 +01:00
Henrik Giesel
0b5ee75861
Rename references from vendor/jquery.js to vendor/jquery/jquery.min.js
2020-12-28 13:16:12 +01:00
Damien Elmes
9f3659a1d3
use QtMultimedia for recording instead of PyAudio
...
The unmute-on-first-duration-change approach is to try to prevent
clicks/pops that can happen at the start of recordings. If it doesn't
solve the problem, we may need to drop down to the lower-level
QAudioInput().
Closes https://github.com/ankitects/help-wanted/issues/23
May fix https://forums.ankiweb.net/t/anki-crashes-periodically-after-clicking-record-audio-button/5824 ,
which I suspect was caused by processEvents()
2020-12-16 19:33:25 +10:00
Damien Elmes
7e655614b2
fix remaining _() references; remove unused imports
2020-11-18 12:43:46 +10:00
Damien Elmes
b02badb224
update multi-line _() references
2020-11-18 11:32:22 +10:00
Damien Elmes
2feddb3d70
update temporary val="%s" references to standard ftl
2020-11-17 22:00:44 +10:00
Damien Elmes
066b1498ae
merge bulk of qt/ - designer files still to do
2020-11-17 17:42:43 +10:00
abdo
35bfd20240
Make dupe search operate on non-stripped text
...
See https://github.com/ankitects/anki/pull/822/
2020-11-16 04:01:04 +03:00
Damien Elmes
8147c9996a
Merge pull request #793 from nwwt/object-audio-tags-support
...
Audio & object tag support
2020-11-11 10:33:31 +10:00
Andreas Reis
81d6d21ae3
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
Damien Elmes
ce3b08ac58
initial Bazel conversion
...
Running and testing should be working on the three platforms, but
there's still a fair bit that needs to be done:
- Wheel building + testing in a venv still needs to be implemented.
- Python requirements still need to be compiled with piptool and pinned;
need to compile on all platforms then merge
- Cargo deps in cargo/ and rslib/ need to be cleaned up, and ideally
unified into one place
- Currently using rustls to work around openssl compilation issues
on Linux, but this will break corporate proxies with custom SSL
authorities; need to conditionally use openssl or use
https://github.com/seanmonstar/reqwest/pull/1058
- Makefiles and docs still need cleaning up
- It may make sense to reparent ts/* to the top level, as we don't
nest the other modules under a specific language.
- rspy and pylib must always be updated in lock-step, so merging
rspy into pylib as a private module would simplify things.
- Merging desktop-ftl and mobile-ftl into the core ftl would make
managing and updating translations easier.
- Obsolete scripts need removing.
- And probably more.
2020-11-01 14:26:58 +10:00
Damien Elmes
b182c07a99
Merge pull request #789 from abdnh/editor-decode-urls
...
Decode pasted URLs for nicer display
2020-10-12 12:33:52 +10:00
abdo
9140c3597f
Decode pasted URLs
2020-10-11 16:46:46 +03:00
johan456789
0ebe5d14eb
fix help url paths
2020-10-10 00:38:07 +08:00
Damien Elmes
0ed130b133
Merge pull request #781 from hgiesel/leftbtns
...
Refactor Buttons in editor and add editor_did_init_left_buttons gui_hook
2020-10-05 13:14:52 +10:00
Henrik Giesel
90572d1b7c
Turn _class into rightside boolean flag
2020-10-04 23:03:37 +02:00