David Bailey
4b83ba50f5
Show latest data under History in the Add dialog
2017-01-08 13:48:58 +00:00
Simone Gaiarin
a5c24aaca0
Add option to make button toggleable
2017-01-08 14:34:18 +01:00
Simone Gaiarin
67246f8c80
Add method to convert resource to data uri, add button image with this
2017-01-08 13:52:47 +01:00
Simone Gaiarin
81ed10faee
Add id param name and fix typo on duperscript id
2017-01-08 13:52:47 +01:00
Damien Elmes
fe0954beba
make it clear to use why anki's suggesting a download
...
avoid showing the upload button to prevent accidental data loss; user
can add a card if they want to upload
2017-01-08 22:21:58 +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
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
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
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
5b71b720c2
Merge branch 'master' of github.com:dae/anki
2016-12-26 13:04:32 +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
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
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
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
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
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
54ea891564
another fix for add-on downloading
2016-08-02 11:51:44 +10:00
Damien Elmes
6377dd161f
fix mesa driver being loaded on nvidia driver machines
2016-08-01 12:16:06 +10:00
Damien Elmes
f465dbd8ad
use helvetica on mac
2016-07-26 10:34:16 +10:00
Damien Elmes
adda80fc33
refuse to run on qt5.7.0
2016-07-18 13:59:45 +10:00
Damien Elmes
6a109caa7c
dialogs.open() needs to un-minimize as well
2016-07-18 13:02:21 +10:00
Damien Elmes
7c76a23cce
we can revert to fix#1 for the modSchema issue now
...
as we save at start of change note type screen, instead of in
beginReset()
2016-07-14 21:49:40 +10:00
Damien Elmes
3be25cf900
fix nautilus failing to load in linux build
2016-07-14 21:06:33 +10:00
Damien Elmes
8e71554ac4
saveNow() now requires a callback
...
the current code was freezing when clicking on 'cards' in the
browser - it looks like like the javascript callback was never
being called despite calling processEvents(). so we need to
refactor the code to call saveNow() with a callback that does the
subsequent processing.
a lot of the browser code was implicitly calling saveNow() via
beginReset(), so we've had to change all that code to save
immediately before it begins any processing. found a probable bug in
the process - it doesn't look like onRowChange() was saving before
overwriting the note, so theoretically edits could be lost if the
user switched to another card very quickly after typing something.
onSearch() has been split into a GUI-activated onSearchActivated()
that takes care of saving, and a lower level search() that refreshes
the current search. it keeps track of the last search via an instance
variable so that it refreshes properly if a user accidentally adds
some characters to their search without activating the search, then
does something like reverse the sort order.
2016-07-14 20:23:44 +10:00
Damien Elmes
37bac3979c
select all shortcut in fields
2016-07-14 11:56:18 +10:00
Damien Elmes
8fdda2bb9c
tweak win button size
2016-07-12 16:40:13 +10:00
Damien Elmes
74de1face7
specify font size again on osx
...
we lose the native button appearance, but the text is too small to
read on OSX otherwise
2016-07-12 16:28:14 +10:00
Damien Elmes
85215018a5
another approach to fixing modSchema bug
...
start the progress dialog immediately so that askUser()
becomes part of the progress dialog's modality
the problem with the previous approach was that beginReset() attempts
to save the note again, leading to schema mismatches
2016-07-12 13:53:59 +10:00
Damien Elmes
166c6f4b3c
remove debug statement
2016-07-12 13:43:21 +10:00
Damien Elmes
3fa597ed1a
wait until saveNow() is done
...
fixes content missing if typed right before save, and add window
complaining that fields aren't empty when they appear so
2016-07-12 13:30:10 +10:00
Damien Elmes
44457e78d2
fix import of media
2016-07-11 14:56:58 +10:00
Damien Elmes
5b10d7c45b
fix change note type getting stuck
...
thanks to stvad for the report
2016-07-11 11:34:12 +10:00
Damien Elmes
46dae2507b
tweaks to UI font on win/lin
2016-07-08 16:17:06 +10:00
Damien Elmes
53f7457d4c
swallow http server errors
2016-07-08 13:22:36 +10:00
Damien Elmes
00111e4182
re-enable add-on downloading
2016-07-08 13:17:33 +10:00
Damien Elmes
3afef3edb0
fix edit & delete bugs in add-ons section
2016-07-08 13:10:19 +10:00
Damien Elmes
807b7382cb
add missing runHook to deck options
2016-07-08 12:59:10 +10:00
Damien Elmes
d0fcf6a2ff
debug webengine dll problems
2016-07-08 12:34:30 +10:00
Damien Elmes
a8e2f992c8
image support
2016-07-07 23:39:48 +10:00
Damien Elmes
7d0eb6dd39
ignore copy/paste shortcuts except on mac
2016-07-07 23:34:19 +10:00
Damien Elmes
eddef71f75
prevent field from collapsing
2016-07-07 17:41:47 +10:00
Damien Elmes
9c569ac35c
fix onHeight error by not reloading toolbar each note
2016-07-07 17:29:53 +10:00
Damien Elmes
258a10edc7
add titles to various webviews to make them easy to locate
2016-07-07 17:23:13 +10:00
Damien Elmes
d94c011c88
fix clayout preview, js errors
...
.exec_() and webengineview don't seem to play nicely together
2016-07-07 12:32:27 +10:00
Damien Elmes
39a2ddac51
fix 'loading' message by removing old type answer code
2016-07-07 11:08:32 +10:00
Damien Elmes
d831bbee5f
fix exporting & one bug in stats image export
2016-07-05 19:52:26 +10:00
Damien Elmes
06169de6cd
fix type answer
2016-07-05 13:14:45 +10:00
Damien Elmes
2d5affd3f2
Revert "hack around broken qwebchannel behaviour"
...
This reverts commit 447718c605
.
2016-07-05 12:26:08 +10:00
Damien Elmes
44bf02d872
quieten beautifulsoup warning
2016-07-04 18:06:08 +10:00
Damien Elmes
d025fddfb4
Merge pull request #109 from subfusc/master
...
[Addons] Make it possible to distribute addons in a directory.
2016-07-04 16:35:49 +10:00
Damien Elmes
058fc373bd
Merge branch 'master' of github.com:dae/anki
2016-07-04 16:33:03 +10:00
Damien Elmes
dfa479607c
hook for showDeckOptions
2016-07-04 16:32:30 +10:00
Damien Elmes
d824f178cc
Merge pull request #133 from hssm/browser-recenter
...
Fix automatic horizontal scrolling in browser
2016-07-04 16:29:45 +10:00
Damien Elmes
447718c605
hack around broken qwebchannel behaviour
...
https://bugreports.qt.io/browse/QTBUG-53411
2016-07-04 16:25:24 +10:00
Damien Elmes
704610ef8f
remove button styling
...
qt5.7 loses system styling when zoom applied
2016-07-04 16:24:43 +10:00
Damien Elmes
94463991bc
basic sync support
...
currently no progress shown on large uploads/downloads
2016-07-04 15:45:53 +10:00
Damien Elmes
a1caa93054
fix mem leaks in dialogs
...
- ensure we're cleaning them up after they're rejected
- run the garbage collector afterwards so the qwebengineprocess
instances get cleaned up
2016-07-04 13:22:35 +10:00
Damien Elmes
eb3208e1e7
QKeySequence.Cancel is not in 5.5
2016-06-28 15:52:13 +10:00
Damien Elmes
a4cab1d8f2
remove setupFonts(), disable syncing
2016-06-23 12:06:16 +10:00
Damien Elmes
a001553f66
move the editor buttons into the webview
...
use new icons, which scale with dpi changes
2016-06-22 14:52:17 +10:00
Damien Elmes
8a7107ad8e
tweak button appearance on osx
2016-06-22 14:43:59 +10:00
Damien Elmes
34b95514b5
import anki earlier so we can catch invalid python version
2016-06-22 14:42:41 +10:00
Houssam Salem
7a60482269
Fix automatic horizontal scrolling in browser
2016-06-07 16:32:19 +10:00
Damien Elmes
4e2bd3f739
resize toolbars to fit content
2016-06-07 14:27:33 +10:00
Damien Elmes
d7339d9a27
update editor, key handling in webview
...
keyPressEvent/etc no longer work with qwebengineview, so we need to
install an event filter to catch things like ctrl+c. drag & drop
doesn't seem to be supported until 5.7
2016-06-06 17:54:39 +10:00
Damien Elmes
9abc9fde9f
use a channel for bridge
...
acceptNavRequest was not being called for rapid updates, so it's not
usable
2016-06-06 15:50:03 +10:00
Damien Elmes
de7e40537d
port majority of code to qt5.5+
...
- a few issues to work out still, and editor changes not done yet
- for communication between webengine and python code, we set window
.location to 'http://anki/ <something>' - the leading http is
necessary for qt to call the link handler, which was introduced
in qt5.5
- the designer files now use a promoted qobject to create instances
of AnkiWebView
- we use the css zoom property to alter webengine font size based on
system dpi
- prefs and addons folder stored in new location (at least for now)
2016-05-31 18:51:40 +10:00
Damien Elmes
15b349e3a8
start port to python 3
...
unit tests pass and main screens of GUI load
2016-05-12 14:45:35 +10:00
Damien Elmes
1dce3eaaff
drop anki1 upgrade code
2016-05-12 14:20:59 +10:00
Damien Elmes
89a5777585
store profiles as blobs
...
the cPickle data may not be valid utf8, and even with
text_factory=str this seems to cause problems sometimes
2016-05-12 14:19:16 +10:00
Dmitry Mikheev
74e28058f7
sorry, a typo crept in
2016-05-05 03:26:13 +05:00
Dmitry Mikheev
692dcfd4e7
2 tooltips in Preview window and support Enter
...
Let's give the users tips over the arrow buttons
and provide passing Back Side / Next Card
by pressing Enter key.
2016-05-05 03:21:04 +05:00
Damien Elmes
640d906230
fix bug in contributed patch
2016-05-01 13:32:17 +10:00
Dmitry Mikheev
75e574cb9f
parameters to specify a desired title and size
...
Let's give authors of add-ons the ability to specify a desired title and minimum width and height of the message window.
2016-04-30 10:44:41 +05:00
Damien Elmes
80e45fee85
Revert "Deal with Internationalized Domain Name in URI"
...
This reverts commit a68af5f199
.
Patch does not fix the issue on my machine, so reverting for now.
2016-04-27 20:43:11 +10:00
Roman Franchuk
a68af5f199
Deal with Internationalized Domain Name in URI
...
This fixes https://anki.tenderapp.com/discussions/ankidesktop/17132-anki-reports-an-error-when-pasting-an-image-from-non-ascii-url
The problem is that urllib2 can't work with IDN. However, it's perfectly valid
to have such URIs in HTML, and Firefox, when copying image, generates exactly
this kind of HTML.
2016-04-17 15:49:28 +03:00
Glutanimate
df4b74f7bb
Preserve identical fields when switching note types
2016-04-10 13:11:25 +02:00
Damien Elmes
864a9135dc
allow language changing in prefs
...
avoided adding this in the past as on a multi user system it allows
one profile user to annoys others by changing the interface language,
but it comes at the expense of easily changing the language for users
who choose the wrong one on first startup
2016-04-05 11:02:01 +10:00
Damien Elmes
9baccec002
update credits
2016-03-23 09:07:33 +10:00
Damien Elmes
781e592339
don't set current dir in file selector if it doesn't exist
...
some users were reporting hangs
2016-03-21 09:57:45 +10:00