Commit Graph

1063 Commits

Author SHA1 Message Date
Damien Elmes
fb349a0a16 Merge pull request #150 from techdavid/fix-history
Show latest data under History in the Add dialog
2017-01-09 14:35:02 +10:00
David Bailey
4b83ba50f5 Show latest data under History in the Add dialog 2017-01-08 13:48:58 +00:00
Damien Elmes
c653e39dbe bump version 2017-01-08 21:20:45 +10:00
Damien Elmes
0dc08bbacc fix error appearing when undo shortcut pressed when nothing to undo 2017-01-08 20:47:26 +10:00
Damien Elmes
70e751f6ec disable the delete card shortcut
is being triggered when user has focus in text input due to webengine
 bug
2017-01-08 20:45:27 +10:00
Damien Elmes
e2573d6a1a fix error when writing to deleted.txt 2017-01-08 20:44:52 +10:00
Damien Elmes
9fbdca26a4 hack to preload images
this doesn't always work, presumably due to sibling burying
2017-01-08 20:37:20 +10:00
Damien Elmes
7ac1f6d3fe fix DEBUG=1
the errors.py code was overwriting the excepthook installed in qt.py
2017-01-08 20:30:34 +10:00
Damien Elmes
a172af11a1 use in-memory cache for webengine
no need to persist things to disk, as we have a local copy in most
cases anyway
2017-01-08 20:02:49 +10:00
Damien Elmes
f104044a09 adjust user agent name 2017-01-08 19:57:04 +10:00
Damien Elmes
1609ffc92a increase deck conf default size 2017-01-08 19:41:12 +10:00
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