Commit Graph

115 Commits

Author SHA1 Message Date
Damien Elmes
b30b7c3073 fix qt/ pylints 2021-01-07 16:21:50 +10: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
Damien Elmes
eea6bf963b fix media attachment
insertHtmlRemovingInitialBR() was removed in a previous PR
2020-12-30 19:30:23 +10:00
Henrik Giesel
98407c3fea Avoid building jquery to its own directory 2020-12-28 14:18:07 +01:00
Henrik Giesel
37dcdcc4c0 Rename references from vendor/jquery.js to vendor/jquery/jquery.min.js 2020-12-28 13:16:12 +01:00
Damien Elmes
ecb7c1482f 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
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
6418993840 merge bulk of qt/ - designer files still to do 2020-11-17 17:42:43 +10:00
abdo
358d0f957e 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
e99c0dbe15
Merge pull request #793 from nwwt/object-audio-tags-support
Audio & object tag support
2020-11-11 10:33:31 +10:00
Andreas Reis
e68a40f13e 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
aea0a6fcc6 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
1aa29f2e79
Merge pull request #789 from abdnh/editor-decode-urls
Decode pasted URLs for nicer display
2020-10-12 12:33:52 +10:00
abdo
709e789ade Decode pasted URLs 2020-10-11 16:46:46 +03:00
johan456789
06f1aeb052 fix help url paths 2020-10-10 00:38:07 +08:00
Damien Elmes
8fa865e8f4
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
e9ca17b1b3 Turn _class into rightside boolean flag 2020-10-04 23:03:37 +02:00
Henrik Giesel
e8c80174eb Refactor out theclass assignment 2020-10-04 22:51:34 +02:00
Henrik Giesel
4c255b0289 Add editor_did_init_left_buttons gui_hook 2020-10-04 22:50:02 +02:00
Henrik Giesel
bf29fb8e83 Make icon Optional explicitly in function signature 2020-10-04 22:42:28 +02:00
Henrik Giesel
30d1d57c78 Rewrite so all editor toolbar buttons use _addButton 2020-10-04 22:41:18 +02:00
abdo
dbc820ba6f Paste links as plain text in basic mode 2020-10-03 19:46:05 +03:00
abdo
8c0bfd7d1d Recognize ico files
Local icons were being pasted as normal links previously instead of
being enclosed in img tags.
2020-10-03 00:17:38 +03:00
abdo
151f854fa2 Support extended drag & drop 2020-09-14 17:07:31 +03:00
Damien Elmes
0455e760c6 another showDupes fix from ANH
https://forums.ankiweb.net/t/show-duplicates-not-working/2883/10
2020-09-04 10:13:30 +10:00
Damien Elmes
21749a3b0c sound tags need filename html escaped
https://forums.ankiweb.net/t/unable-to-play-longer-audio-on-cards/1313/30
2020-09-04 09:36:38 +10:00
Damien Elmes
dc1f489d3e Revert "Merge pull request #749 from ANH25/editor-media-autoplay"
This reverts commit 9aa3d7867e, reversing
changes made to c3a1acb524.

https://github.com/ankitects/anki/pull/749#issuecomment-686385112
2020-09-04 08:34:26 +10:00
Damien Elmes
a517accee3 update to latest black 2020-08-31 13:29:28 +10:00
ANH
28d86ab8d1 editor: only autoplay added media when recording 2020-08-26 14:49:19 +03:00
ANH
cc17b4db62 fix drag & drop issue when dropping things over existing content 2020-08-25 17:28:13 +03:00
ANH
680b5e4b50 work around editor freeze issue after external drag & drop 2020-08-19 18:14:07 +10:00
Henrik Giesel
dcf82fb403
Merge branch 'master' into resethook 2020-08-17 12:39:09 +02:00
Damien Elmes
3d0d21e4bc fix duplicates not escaping html
https://forums.ankiweb.net/t/bug-report-showdupes-not-html-escaping-field-content/2167
2020-08-17 17:50:27 +10:00
Henrik Giesel
7f503895d7 Create ResetReason enum 2020-08-16 18:56:32 +02:00
Henrik Giesel
db0a18106f Reorder + make all parameters optional 2020-08-16 18:56:32 +02:00
Henrik Giesel
ccc56d4355 Satisfy formatter 2020-08-16 18:56:32 +02:00
Henrik Giesel
dd515e65e7 Add new use of requireReset 2020-08-16 18:56:32 +02:00
Arthur Milchior
c4db4bd291 Any removed 2020-08-12 01:37:21 +02:00
Henrik Giesel
17f23221e4 Add newlines 2020-08-09 11:16:19 +02:00
Henrik Giesel
ee3d4f5ad8 Avoid extra assignment 2020-08-09 10:38:31 +02:00
Henrik Giesel
f5479edacc Move reverse url quoting functionality to editor_will_munge_html hook 2020-08-09 10:37:38 +02:00
Henrik Giesel
1b9bd70bb1 Move remove null bytes functionality to editor_will_munge_html hook 2020-08-09 10:35:52 +02:00
Henrik Giesel
4720645d1c Replace functionality of mungeHTML with call to new gui_hook 2020-08-08 23:59:01 +02:00
Adam Plaice
d6fb4acd38 Re-add previously supported file extensions for media
(They had been removed in 2ae342592c).
2020-07-29 15:08:33 +02:00
Damien Elmes
93ada5d374
Merge pull request #703 from ANH25/master
fix help-wanted#13
2020-07-29 14:14:57 +10:00
Matt Krump
24e7156991 Turn on check_untyped_defs for aqt.editor
* Turn on check_untyped_defs for aqt.browser
* Add type hints
2020-07-28 18:42:22 -06:00
ANH
fd0c3cf57e add missing string r flag 2020-07-24 09:18:05 +03:00