Commit Graph

1278 Commits

Author SHA1 Message Date
Damien Elmes
0543a4533b add devMode flag to utils
also remove the extra toolbar call in loadProfile(), as we require a
restart to update the translations anyway
2017-08-01 14:28:13 +10:00
Damien Elmes
83c96770c8 fix latex tests 2017-08-01 14:25:49 +10:00
Damien Elmes
a5997e400b fix focus setting in resume screen 2017-08-01 13:57:15 +10:00
Damien Elmes
d2507899c2 bump version 2017-07-31 16:35:18 +10:00
Damien Elmes
d6c8c6e272 focus type answer area after it's appeared 2017-07-31 16:34:30 +10:00
Damien Elmes
412d37fc13 another workaround for the KDE accelerator issue 2017-07-31 15:48:34 +10:00
Damien Elmes
96c737f24f fix translations on Mac 2017-07-31 13:59:10 +10:00
Damien Elmes
8503ab29ab fix literal '\n' being inserted into card 2017-07-31 13:22:35 +10:00
Damien Elmes
b81a64272e allow browser override font to be unset 2017-07-29 16:09:00 +10:00
Damien Elmes
7405c1e7f1 don't force browser column font unless overriden 2017-07-29 16:00:02 +10:00
Damien Elmes
49e2d82aae fade next card in
- to minimize pop-in of images and mathjax, fade the previous card
out and fade the next card in
- render the answer at the same time as the question so it can be
shown immediately
- move reviewer css to separate file
- remove image preloading code that should no longer be necessary
2017-07-29 14:24:45 +10:00
Damien Elmes
d6a7cc0a51 bump version 2017-07-28 18:38:42 +10:00
Damien Elmes
8cd20f3352 turn latex svg into a note type option
needed until the other clients support svgs
2017-07-28 18:38:31 +10:00
Damien Elmes
608a5662a9 fix ampersands appearing in deck names
https://bugs.kde.org/show_bug.cgi?id=345023
2017-07-28 17:40:26 +10:00
Damien Elmes
44d0766cc5 fix some js lint 2017-07-28 16:48:49 +10:00
Damien Elmes
b8e306062b improve cloze and latex tag display in RTL environment
https://anki.tenderapp.com/discussions/ankidesktop/24292-mixed-arabic-and-english-words
2017-07-28 16:39:32 +10:00
Damien Elmes
7ad6966943 split js code out into separate files, mathjax improvements
- js code that was previously bundled in .py files is now in the
web folder
- add helpers to create links to bundled files, and update
stdHtml() to accept a list of javascript files to include
instead of text
- render MathJax in card layout and preview screens - these should be
updated in the future to update the document dynamically like the
reviewer does
- start media server earlier so it can be used to serve content for
the toolbar, etc
- work around a bug in WebEngine on Windows that could cause the
media server to hang
2017-07-28 16:35:45 +10:00
Damien Elmes
5ef1692c78 fix duplicate constructor call in editcurrent 2017-07-27 16:25:15 +10:00
Damien Elmes
fa3461e20b mathjax support 2017-07-27 14:18:10 +10:00
Damien Elmes
3d9d792dd4 bundle web folder 2017-07-27 12:28:44 +10:00
Damien Elmes
e7abd9f4ed fix crash when syncing media on windows
update() was being called when processing events, leading to
recursion until the stack was exhausted

https://anki.tenderapp.com/discussions/beta-testing/639-anki-210-beta4-crashing-during-syncing
2017-07-26 15:21:27 +10:00
Damien Elmes
94b1768ba8 use ctrl+delete for delete shortcut in both reviewer and browser 2017-07-26 10:52:04 +10:00
Damien Elmes
b1959e5c83 latex fixes
- fix the missing replacement tmp.%s
- use a zoom factor of 2 by default
- look for both png and svg files before creating
2017-07-22 12:36:31 +10:00
Damien Elmes
9cda9334d3 Merge pull request #112 from sigkell/master
Output SVG instead of PNG for LaTeX
2017-07-22 11:00:13 +10:00
Damien Elmes
cc71a542a4 fix qt version in readme.development 2017-07-22 10:54:55 +10:00
Damien Elmes
630cddc786 fix superscript shortcut
https://anki.tenderapp.com/discussions/beta-testing/627-anki-210-beta-1#comment_43048185
2017-07-22 10:54:45 +10:00
Damien Elmes
8a85471374 bump version 2017-07-20 12:17:59 +10:00
Damien Elmes
17bb179d06 experimental prewrap support
- add option to wrap html in implicit pre-wrap environment during
editing and review - defaults to off
- update paste filter to convert divs/Ps to newlines and non-breaking
spaces to normal ones
- catch enter key and write \n instead of creating a new div

also:

- remove extra caretToEnd() call that is no longer required
- add dd/dt/dl to allowed tags
2017-07-20 12:16:47 +10:00
Damien Elmes
f7b3457ff0 fix drawLinks reference 2017-07-17 14:54:12 +10:00
Damien Elmes
9df1947e41 require decorator 2017-07-17 13:18:56 +10:00
Damien Elmes
dffab1376f Merge branch 'master' of github.com:dae/anki 2017-07-17 13:16:06 +10:00
Damien Elmes
896889ad82 Merge pull request #191 from dequis/signature-preserving-decorator
Make hooks.wrap preserve signatures, fixes hooking some pyqt5 callbacks
2017-07-17 13:15:56 +10:00
Damien Elmes
7d351346ab Merge pull request #190 from ankitest/patch-12
Let users extend their bottom buttons functions
2017-07-17 13:14:03 +10:00
Damien Elmes
d99dcaafdc don't open separate browser window on iframe load
https://anki.tenderapp.com/discussions/beta-testing/627-anki-210-beta-1#comment_43008395
2017-07-17 12:40:38 +10:00
dequis
37ba8832f8 Make hooks.wrap preserve signatures, fixes hooking some pyqt5 callbacks
It looks like pyqt5 is playing dirty and checking the number of args of
functions before calling them. When using hooks.wrap, pyqt5 thinks it
can pass any amount of arguments (because *args) and you get exceptions
like this inside the wrap function, when calling the 'old' function:

>TypeError: onFindDupes() takes 1 positional argument but 2 were given

This commit fixes it by preserving the signature of the wrapped method,
by adding an optional dependency on the "decorator" module.

Making it an optional dependency is probably not the wisest idea but
since this is a small edge case it might be smoother to start like this.

I also added functools.wraps() as a fallback, which won't help much but
is slightly more correct.

See this article for details: https://hynek.me/articles/decorators/
2017-07-16 23:25:34 -03:00
Dmitry Mikheev
5bfd93842c Let users extend their bottom buttons functions
Like this:
```
aqt.deckbrowser.DeckBrowser.drawLinks.extend([
            ["", "rebuildAll", _("Rebuild All")],
            ["", "emptyAll", _("Empty All")],
])
```
2017-07-15 18:39:01 +05:00
Damien Elmes
4eb3902759 bump version 2017-07-12 11:26:26 +10:00
Damien Elmes
7ecd889d8f preserve newlines and indents when pasting text
https://anki.tenderapp.com/discussions/ankidesktop/24123-paragraphsnew-lines-not-preserved-when-copypasting-into-anki
2017-07-12 10:57:01 +10:00
Damien Elmes
14597bd888 if a non-media link pasted, paste the url text directly 2017-07-11 14:58:22 +10:00
Damien Elmes
e8777e8630 bump version 2017-07-10 15:22:47 +10:00
Damien Elmes
7d71170a33 catch windows firewall issue 2017-07-09 13:26:50 +10:00
Damien Elmes
15ca733f14 fix base folder location on windows 2017-07-09 13:22:01 +10:00
Damien Elmes
2d25069936 run garbage collector after webengine window
we GC on autosave, but doing an explicit GC prevents excess memory
consumption when rapidly opening and closing windows using
webengine
2017-07-08 12:28:11 +10:00
Damien Elmes
d1f05907be update addon docs 2017-07-05 12:41:05 +10:00
Damien Elmes
36ed23e103 fix python version check 2017-07-05 12:28:03 +10:00
Damien Elmes
c392418ba7 bump version 2017-07-05 10:54:27 +10:00
Damien Elmes
2b8987f654 fix browse add-ons command failing to load on linux 2017-06-27 12:04:42 +10:00
Damien Elmes
1fe86e1bde about tweaks
- fix sort order
- treat as a collection window so it's only opened once, and is
closed on quit
- use our standard font
2017-06-26 13:05:11 +10:00
Damien Elmes
90f7038109 fix exit code 120 when quitting in python 3.6 2017-06-26 13:03:05 +10:00
Damien Elmes
294813f4fd switch undo shortcut
on windows webengine seems to install a permanent ctrl+z handler that is
active even when an editing area is not selected, so our shortcut is
never triggered when the webengineview is focused.
2017-06-24 19:24:43 +10:00