Commit Graph

1349 Commits

Author SHA1 Message Date
Damien Elmes
3014839d29 browser -> browse 2017-08-11 22:04:06 +10:00
Damien Elmes
c831c4539e browser -> browse 2017-08-11 22:02:32 +10:00
Damien Elmes
03b0ff4565 tidy up card name list 2017-08-11 21:44:05 +10:00
Damien Elmes
72fdffed8b add some more padding to browser 2017-08-11 21:43:31 +10:00
Damien Elmes
a882937dd3 fix cloze in mathjax workaround 2017-08-11 21:09:47 +10:00
Damien Elmes
1fb2c96d07 use a full window on non-Mac platforms as well 2017-08-11 21:06:15 +10:00
Damien Elmes
75f58b86d6 disable rather than hide drop down in clayout cloze case 2017-08-11 21:04:17 +10:00
Damien Elmes
ba16b8714b remove images and move away from qt resources
- the bulk of image use is in webviews, so we move almost all used
images to web/imgs, as it's easier to manage
- change AnkiWebView to always use the local media server as a base, as
much of the UI has come to depend on it
- remove images from a few areas, as they felt dated
- delete a bunch of unused images
- href=# links were being opened in a browser window, so the code now
ignores them - the HTML should really be updated to return false in the
onclick handler
- update a few icons
2017-08-11 20:59:43 +10:00
Damien Elmes
3be43c2309 use ip for loopback, as localhost is wrong on some machines 2017-08-11 20:37:04 +10:00
Damien Elmes
2415611450 remove sidebar in browser
use a pop-up menu instead, which saves a lot of screen real estate and
should be more intuitive for new users

also:

- add options to manage note types and clear unused tags in the relevant
submenus
- shuffle a few shortcut keys
- remove the old favourites code - saving and removing now done via the
menu
- individual card templates now searchable
2017-08-11 19:10:39 +10:00
Damien Elmes
0c3565228d remove icon from add-on submenu 2017-08-11 14:41:41 +10:00
Damien Elmes
6c765d7302 remove toolbar in browser in favour of menu items 2017-08-11 14:40:51 +10:00
Damien Elmes
1c88315e86 bump version 2017-08-10 21:51:46 +10:00
Damien Elmes
55b782581d global reviewer override, fix fading in previewer/clayout
you can use the debug console to define custom html/css/js to be added
to the bottom of the reviewer on all note types, so to increase the fade
time on the question you'd use

mw.col.conf["reviewExtra"]="<script>qFade=500;</script>"
mw.col.setMod()

also make sure the fading for question/answer is used correctly in
previewer, and use answer fading in clayout to speed it up
2017-08-10 21:39:04 +10:00
Damien Elmes
85d4511766 hide sound tags in preview screen 2017-08-10 21:11:38 +10:00
Damien Elmes
94cf132918 make sure exporting ignores subfolders 2017-08-10 21:06:41 +10:00
Damien Elmes
c3415028b0 mathjax and fade improvements
- remove the unnecessary processing delays mathjax defaults to
- use a separate fade time for question and answer
2017-08-10 20:45:42 +10:00
Damien Elmes
9af28b7159 proper fix for preview window's 'please select 1 card' message
setting self.card to None caused the following:

https://anki.tenderapp.com/discussions/beta-testing/661-anki-210-beta-7#comment_43180378
2017-08-10 19:32:19 +10:00
Damien Elmes
06fcccaf44 remove border on bottom toolbar; fix hacky spacing of top elements 2017-08-10 19:17:28 +10:00
Damien Elmes
f3f90842dc move the inline css and some more js into separate files
- stdHtml() css= arg now takes a list of files like js=
- the files are loaded in the head of the document so that styling
that comes later in the document can easily override it

fixes:
https://anki.tenderapp.com/discussions/beta-testing/661-anki-210-beta-7/page/1#comment_43164447
https://anki.tenderapp.com/discussions/beta-testing/661-anki-210-beta-7#comment_43177130
2017-08-10 19:02:32 +10:00
Damien Elmes
c8e8225395 remove unused bodyClass arg 2017-08-10 18:10:50 +10:00
Damien Elmes
82aeb57318 Revert "experiment with displaying FrontSide under answer"
This reverts commit a1b0ddb00c.
2017-08-10 15:04:24 +10:00
Damien Elmes
c668efa4b4 work around adjustHeightToFit() crashing on Linux 2017-08-10 15:03:05 +10:00
Damien Elmes
a57b913450 opt in to qt's full hidpi support
doesn't seem to affect the webviews on Linux, so we need to keep the old
zoom code around for now
2017-08-10 15:02:46 +10:00
Damien Elmes
4dae8ef661 make sure we adjust browser toolbar height 2017-08-10 14:36:55 +10:00
Damien Elmes
3c5abe4af8 summarize used fields in card type list 2017-08-09 11:11:39 +10:00
Damien Elmes
2219736adc if focusTo provided, ensure webview is focused
fixes https://anki.tenderapp.com/discussions/beta-testing/661-anki-210-beta-7#comment_43155562
2017-08-08 20:25:42 +10:00
Damien Elmes
17693f1b63 bump version 2017-08-08 20:05:20 +10:00
Damien Elmes
016338fa07 delete preview timer ref 2017-08-08 20:02:37 +10:00
Damien Elmes
d55318d83f clayout refactor
- tabs became difficult to read when users had a lot of templates, so we
use a combobox instead
- move the More button to the top and integrate adding/removing
templates
- start with no focus to avoid accidental modifications
- display confirmation before adding template
- remove 'edit to customize' text that some users had trouble editing
2017-08-08 19:45:31 +10:00
Damien Elmes
23f8e15816 give the preview window the same treatment
different approach to timer handling so that it's more responsive when
the user clicks a navigation button
2017-08-08 16:28:53 +10:00
Damien Elmes
4d064e1cba wait for keystrokes and don't reload entire page 2017-08-08 16:07:18 +10:00
Damien Elmes
2c54139d3c move main clayout area out of tab widget
it was wasteful to use separate webviews for each tab; still to come is
avoiding setHtml() for each edit, and either moving to a tab bar or
combo box
2017-08-08 15:31:36 +10:00
Damien Elmes
c74cbf6108 fix media server port allocation
the old code was allowing the main thread to read .port before it had
been updated, and was binding to sockets that were already in use on
Windows. instead, we use a system-assigned free port and block the main
thread until it's been allocated
2017-08-08 14:56:34 +10:00
Damien Elmes
bee6931dc9 fix issues with media server not going away
- use a non-daemonized python thread
- shut the server down on exit, including from profile manager
- use a timeout on requests, or the connection that webengine holds open
will block the thread and prevent it from exiting when anki closes
2017-08-08 12:55:30 +10:00
Damien Elmes
cfb50fa03c add hook for overriding state shortcuts 2017-08-08 10:09:12 +10:00
Damien Elmes
7ad8d761d1 put search prompt in dropdown history so down key does right thing
https://anki.tenderapp.com/discussions/beta-testing/661-anki-210-beta-7#comment_43157037
2017-08-08 10:05:10 +10:00
Damien Elmes
d5aede7252 bump version 2017-08-07 18:39:29 +10:00
Damien Elmes
a1b0ddb00c experiment with displaying FrontSide under answer
- avoids having to move eyes to answer section
- the fade out/fade in step feels more natural when the
question section moves

feedback welcome
2017-08-07 18:38:35 +10:00
Damien Elmes
dc81af96ac fix autoplay on the answer side 2017-08-07 16:15:15 +10:00
Damien Elmes
538119201c ensure deferred js is executed on the correct page
setHtml() and deferred js now share a single queue, to ensure that js
calls are delivered to the correct page

also remove the onLoadFinished hook, which is no longer used
2017-08-07 16:01:35 +10:00
Damien Elmes
9c63714e80 delay setHtml() until previous page has fully loaded
based on 0241eb70dc
2017-08-07 15:15:31 +10:00
Damien Elmes
b0213b9fd7 ignore webchannel events received after webview deleted
thanks to David for the report
2017-08-07 14:51:42 +10:00
Damien Elmes
27f992c6b4 Merge pull request #193 from techdavid/fix-paste-url-with-hash
Fix error when dropping/pasting media file with a hash in its name
2017-08-07 12:19:30 +10:00
Damien Elmes
3bd6e18279 Merge pull request #192 from techdavid/fix-many-shortcut-key
Prevent "Shorcut key: " appearing multiple times in tooltips
2017-08-07 12:15:16 +10:00
David Bailey
d4cf870ff7 Fix error when dropping/pasting media file with a hash in its name 2017-08-06 18:03:00 +01:00
David Bailey
4c43fcfe4e Prevent "Shorcut key: " appearing multiple times in tooltips 2017-08-06 16:03:11 +01:00
Damien Elmes
e40445a9c4 bump version 2017-08-06 15:30:41 +10:00
Damien Elmes
a11035b2fa Revert "fix TypeError: channel.execCallbacks[message.id] is not a function"
This reverts commit 331239de05.

This commit caused the blur event from the editor to fire after the saveNow()
callback had run, which broke the reviewer when returning from editcurrent.
Reverting for now, as the actual error is harmless AFAICT.
2017-08-06 15:12:28 +10:00
Damien Elmes
4c286fa3f7 hack around clozes breaking mathjax 2017-08-06 14:48:30 +10:00