Commit Graph

1252 Commits

Author SHA1 Message Date
Damien Elmes
1405cddc6e require qt5.7.1+ 2017-01-08 19:34:31 +10:00
Damien Elmes
259023f369 write backups in thread; remove strip html & compress options
we do the backup compression/writing in a separate thread so it
doesn't slow down profile switching/syncing, and remove the option
to write uncompressed backups

the strip html option is no longer used, so remove it from preferences
2017-01-08 19:29:57 +10:00
Damien Elmes
f6245cdfd1 use requests for http; add progress info back
- wrap request in AnkiRequestsClient so we can keep track of
upload/download bytes without having to monkey patch anything
- force a 64kB buffer size instead of the default 8kB
- show one decimal point in up/down so small requests still give
visual feedback
- update add-on downloading and update check to use requests
- remove the update throttling in aqt/sync.py, as it's not really
necessary anymore
2017-01-08 19:06:32 +10:00
Damien Elmes
147e09a6cb run the gc only in the main thread
if it fires in the mediasrv/sync thread it could cause a crash
2017-01-08 14:42:50 +10:00
Damien Elmes
9f28d5a638 set up fault handler 2017-01-08 13:39:57 +10:00
Damien Elmes
c17b0650b0 Merge pull request #149 from simgunz/editor-buttons
Editor buttons
2017-01-08 12:32:31 +10:00
Simone Gaiarin
42ea7c53dd Add optional id in parameters 2017-01-06 16:43:05 +01:00
Simone Gaiarin
1c8c34b443 Add padding among buttons
For some reason after using the new _addButton method the padding among the buttons is not there any more. So I add it manually.
2017-01-06 16:43:05 +01:00
Simone Gaiarin
abc3224fe3 Remove old tooltips 2017-01-06 16:43:05 +01:00
Simone Gaiarin
4e4947bd92 Run filter on right buttons list 2017-01-06 16:43:05 +01:00
Simone Gaiarin
5051dcedb6 Add anki buttons using the new method
The html of each anki button is stored in a list that is joined in a string at the end. This make it easier to run the filter.

Drawback: Only buttons on the right side of the editor can be added using the filter.
2017-01-06 15:57:02 +01:00
Simone Gaiarin
37e345ffe8 Replace _addButton method with HTML based one
Support loading icon from anki qrc resource file or using the absolute path
2017-01-06 15:57:02 +01:00
Damien Elmes
0e298b7873 Merge pull request #148 from simgunz/editor-buttons-hook
Editor buttons hook
2017-01-06 14:50:37 +10:00
Simone Gaiarin
5775c3f92e Add filter on topbuts to allow addons to add buttons 2017-01-05 12:42:19 +01:00
Simone Gaiarin
81b60c6dc4 Add css id to editor buttons div
This facilitate the processing with beutifulsoup or similar parser
2017-01-05 12:42:19 +01:00
Damien Elmes
e8423f0874 fix a bug that caused media data not to be uploaded 2017-01-02 20:53:15 +10:00
Damien Elmes
5b71b720c2 Merge branch 'master' of github.com:dae/anki 2016-12-26 13:04:32 +10:00
Damien Elmes
03b2ad37d9 add (currently unused) abort command 2016-12-25 12:54:47 +10:00
Damien Elmes
4fbe091c3b don't reload data on close 2016-12-24 15:33:46 +10:00
Damien Elmes
d181133ac0 some sync fixes
- fix an extra \r\n being included at the end of the last form var
- req()s in the middle of a sync should throw an exception if they
receive a 403, as the calling code does not check for an empty return
2016-12-21 10:42:13 +10:00
Damien Elmes
668ca5ac8f Merge pull request #146 from marciomazza/remove_dependency_on_es6
Remove editor dependency on ECMAScript 6
2016-12-20 13:05:22 +10:00
Marcio Mazza
a1f29c2bd2 Remove editor dependency on ECMAScript 6
It seems that ES6 is not available on Qt 5.5.
2016-12-19 12:59:20 -02:00
Damien Elmes
7871949a6a fix window not resizing properly
#12 of https://anki.tenderapp.com/discussions/beta-testing/203-anki-210-alpha-5#comment_41542208
2016-12-19 10:18:47 +10:00
Damien Elmes
7e34dc47dd bump version 2016-12-17 13:51:00 +10:00
Damien Elmes
f9385572df fix audio not stopping or overlapping
make sure we always send bytes
2016-12-17 13:47:07 +10:00
Damien Elmes
9c04ac6a8e fix opening of explorer folders on windows 2016-12-17 13:23:05 +10:00
Damien Elmes
b56ca60d2f remove mac setLibraryPaths() call 2016-12-16 21:20:08 +10:00
Damien Elmes
98485621b6 bump version 2016-12-15 21:14:55 +10:00
Damien Elmes
0bd79abe11 work around https://bugreports.qt.io/browse/QTBUG-54755 2016-12-15 21:12:51 +10:00
Damien Elmes
fb81f63fe3 work around broken debug console shortcut
this will likely break the shortcut on keyboards where : is not a
shifted ;. can revert when qt fixes the issue
2016-12-15 21:00:59 +10:00
Damien Elmes
9b6a21126d drag&drop support, and paste refactor
- insert resulting html directly into fields instead of relying on
fragile clipboard rewriting
- catch paste events in js and send them back to python so we cover
all possible ways of pasting
- use checksum in pasted image filenames instead of .cacheKey(),
which was not unique across runs
- try each _processX() in turn instead of having special cases inside
them
- rewrite the HTML filtering:
 - img rewriting and stripping of certain tags handled in bs4; other
 processing handled in js for easier sharing with other clients
 - use a whitelist of HTML tags and properties instead of focusing
 mainly on webkit cruft
 - don't run filter when focus lost, as it no longer seems to
 be necessary
 - the "strip html" option is currently ignored
2016-12-15 18:14:47 +10:00
Damien Elmes
3859d8706b Merge pull request #145 from marciomazza/fix_open_addon_folder
Fix open addon folder
2016-11-29 11:09:28 +10:00
Damien Elmes
e7c3859303 Merge branch 'master' of github.com:dae/anki 2016-11-29 11:09:17 +10:00
Marcio Mazza
e7eaf5f378 Fix open addon folder
The open folder operation would break if the environment variable
LD_LIBRARY_PATH was not set
2016-11-28 18:02:30 -02:00
Damien Elmes
27c23c01d6 some html regexps should be case insensitive 2016-10-24 19:42:03 +10:00
Damien Elmes
6131b149da Merge pull request #142 from goapunk/master
Fix the lambda function for changing the mapping of the fields
2016-10-20 17:16:09 +10:00
Damien Elmes
85588e9206 Merge pull request #143 from goapunk/bs4-warning-filename
Suppress the BeautifulSoup filename warning
2016-10-20 17:15:47 +10:00
noobie
1a665cc185 Suppress the BeautifulSoup filename warning
Bs4 will raise a warning if the markup (field input) starts with '/'. Suppressing the warning is probably the easiest solution, as Bs4 will still process it (no disadvantages?).
2016-10-20 04:00:34 +02:00
noobie
90128cf2d5 Fix the lambda function for changing the mapping of the fields
The connect signal passes a bool to the given function by default, we need to ignore it.

use underscore for the sake of idiomology
2016-10-19 22:45:46 +02:00
Damien Elmes
24b451b0e4 aand remove coveralls tag 2016-09-05 19:04:31 +10:00
Damien Elmes
ca7d39e7bd remove coveralls due to the "changes unknown" issue 2016-09-05 19:03:53 +10:00
Damien Elmes
2b8d2c9d74 Merge pull request #139 from Self-Perfection/compress_exported_svg_files
Restore compression of SVG files on export
2016-09-05 18:57:09 +10:00
Damien Elmes
5cea6b8a7a Merge branch 'master' of github.com:dae/anki 2016-09-05 18:34:29 +10:00
Damien Elmes
45e2d197dd Merge pull request #140 from cdpm/make-sync-download-request-well-formed
Add missing boundary at end of multipart/form-data request body generated in Syncer.req()
2016-09-05 18:34:12 +10:00
Damien Elmes
e3efe8e10e fix intermittently failing tags test 2016-09-05 18:25:44 +10:00
Christoph Mack
079d551782 Add missing boundary at end of multipart/form-data request body for requests that include no application/octet-stream data
This makes the sync request sent to the /download endpoint valid multipart/form-data according to RFC 2046, 5.1
2016-09-03 14:15:09 +02:00
Self-Perfection
a5b0852360 Restore compression of SVG files on export 2016-09-02 14:27:24 +03:00
Damien Elmes
ddbf634dd5 longer ivl limit in db check
https://anki.tenderapp.com/discussions/ankidesktop/19394-strange-behavior-with-year-long-intervals
2016-08-24 14:38:04 +10:00
Damien Elmes
72f128156e add README.contributing 2016-08-16 15:07:29 +10:00
Damien Elmes
54ea891564 another fix for add-on downloading 2016-08-02 11:51:44 +10:00