Damien Elmes
37d3996be0
move height resizing to webview; remove onLoaded from toolbar/reviewer
2017-08-02 16:22:54 +10:00
Damien Elmes
538678a7a9
remove old comment
2017-08-02 16:18:09 +10:00
Damien Elmes
7d14a96889
automatically defer eval() calls until DOM loaded
2017-08-02 16:17:08 +10:00
Damien Elmes
321c4d7ff8
no longer need to hack around webengine stealing focus
2017-08-02 15:38:35 +10:00
Damien Elmes
9958dd57a4
remove superfluous lambda arg
2017-08-02 11:34:49 +10:00
Damien Elmes
61654ff70a
skip useless focus preservation when navigating via preview screen
2017-08-01 17:46:08 +10:00
Damien Elmes
9ec9274011
fix fields being overwritten when dropping
...
remove the unneeded setFocus() call which was causing the blur event
to fire with the wrong data
2017-08-01 17:40:51 +10:00
Damien Elmes
66500f5262
move webview js into separate file
2017-08-01 17:04:55 +10:00
Damien Elmes
cd76281695
avoid errors caused by calling setHtml() before previous page loaded
2017-08-01 14:30:04 +10:00
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
a5997e400b
fix focus setting in resume screen
2017-08-01 13:57:15 +10:00
Damien Elmes
412d37fc13
another workaround for the KDE accelerator issue
2017-07-31 15:48:34 +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
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
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
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
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
dffab1376f
Merge branch 'master' of github.com:dae/anki
2017-07-17 13:16:06 +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
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
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
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
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
ea5f2bb0ef
don't need to set bgcol when the window is transparent
2017-06-24 19:15:14 +10:00
Damien Elmes
7bd33242cf
disable pinch to zoom gesture
2017-06-23 14:34:56 +10:00
Damien Elmes
e635157ee4
move stats and sync buttons to the center
2017-06-23 14:03:18 +10:00
Damien Elmes
a3bdd04d42
set bgcol in ankiwebview
2017-06-23 13:07:59 +10:00
Damien Elmes
7af591cfd7
add cancel button to recording window
2017-06-23 13:04:32 +10:00
Damien Elmes
1b41e68f05
remove gradients from toolbars in favour of system colour
2017-06-22 18:06:40 +10:00
Damien Elmes
a3fa2ff5ba
remove duplicate <html> in editor, set bg on page creation
2017-06-22 18:01:47 +10:00
Damien Elmes
59f877737e
start webview as transparent to reduce flicker
2017-06-22 18:01:01 +10:00
Damien Elmes
7d86984a12
turn off webview cache to reduce memory footprint
2017-06-22 17:06:33 +10:00
Damien Elmes
aa77df0805
give toolbars an approx height to reduce flashing at startup
2017-06-22 16:56:29 +10:00
Damien Elmes
aeaf9df32f
ensure only one copy of stats shown, and close with collection
2017-06-22 16:51:54 +10:00
Damien Elmes
34dcf64d76
another attempt at fixing key handling
...
we can't use an event filter on the top level webview, because it
ignores the return value of the filter and leads to Anki thinking
keys have been pressed twice
and if we use an event filter on the focusProxy(), the
keypress/release events are sent even when a text field is currently
focused, leading to shortcuts being triggered when typing in the answer
to solve this, we move away from handling the key press events
directly, and instead install shortcuts for the events we want to
trigger. in addition to the global shortcuts, each state can install
its own shortcuts, which we remove when transitioning to a new state
also remove the unused canFocus argument to ankiwebview, and accept a parent
argument as required by the code in forms/
2017-06-22 16:39:31 +10:00
Damien Elmes
22f2fdf7d6
fix esc key in type answer field
...
without the change, the selection disappears but typed characters
still go to the input area
2017-06-22 15:10:47 +10:00
Damien Elmes
ac81fefc14
add note about being an alpha
2017-06-14 11:59:58 +10:00
Damien Elmes
e93f4abcab
fix deck expanded state being reset
...
the setExpanded() call was triggering the callback, turning off
expanded state
https://anki.tenderapp.com/discussions/ankidesktop/23841-bug-when-editing-card-fields-decks-automatically-collapse
2017-06-14 11:43:47 +10:00
Damien Elmes
25cc3eceb5
make sure stats window starts focused on osx
2017-06-07 11:50:29 +10:00
Damien Elmes
017984c15c
fix crash when opening profile from profile manager
2017-06-06 16:09:15 +10:00
Damien Elmes
76e508e25d
various key handling fixes
...
- key presses while a webview is focused no longer make it to the
main window's keyPressEvent() routine, so AnkiWebView now uses its
event filter to pass the key events to the main window
- move the shared key handling out of keyPressEvent into
globalKeyHandler()
- make sure all key handling routines return true or false to
indicate if an event was handled or not
- remove focus when esc hit in the main window, to retain old
behaviour of allowing esc to clear focus from the type answer box
2017-06-06 15:56:21 +10:00
Damien Elmes
c24f122d6e
require qt 5.9
2017-06-06 14:33:53 +10:00
Damien Elmes
ca08b742fa
Revert "work around https://bugreports.qt.io/browse/QTBUG-54755 "
...
This reverts commit 0bd79abe11 .
2017-06-05 16:52:22 +10:00
Damien Elmes
476aedbd6b
fix issues with 'lots of decks' msg
...
https://anki.tenderapp.com/discussions/beta-testing/460-anki-210-alpha-13#comment_42641183
2017-05-28 11:13:16 +10:00
Damien Elmes
e9104de197
add Guillem to about
2017-05-09 12:40:34 +10:00
Damien Elmes
22ca4c24de
Merge pull request #186 from wetriner/master
...
'QDialogButtonBox' object has no attribute 'finished'
2017-05-04 11:59:49 +10:00
wetriner
80418c0fb7
'QDialogButtonBox' object has no attribute 'finished'
2017-05-02 23:22:01 -10:00
Dmitry Mikheev
50736ecf1d
What about this one?
2017-05-03 13:55:24 +05:00
Damien Elmes
3991603bf4
Merge branch 'master' of github.com:dae/anki
2017-04-28 13:31:55 +10:00
Damien Elmes
8a2b1889aa
suggest users start with add-ons disabled to diagnose problem
2017-04-28 13:31:40 +10:00
Dmitry Mikheev
b5fac33cc4
Otherwise showText never saves Geometry
2017-04-27 01:25:16 +05:00
Damien Elmes
5bf0040838
fix errors when closing the main window with browser still open
...
onClose() was calling closeAllWindows(), which sends a close signal
to dialogs without force=True, causing them to fire an asynchronous
save event that calls back after the collection has been closed
instead we just rely on the fact that unloadCollection() closes all
collection windows
2017-04-26 11:22:17 +10:00
Dmitry Mikheev
69fd37a5c4
2make top webview accessable
...
as well as main and bottom
2017-04-21 22:21:05 +05:00
Damien Elmes
43a662a250
hack around the browser not closing on sync
...
saveNow() must run asynchronously, but unloadCollection() was not
designed to. fix the issue by skipping the save, as it's unlikely
the user can move the cursor from the editor to the
main window and start a sync before the timer has automatically saved
the contents.
2017-04-12 18:40:37 +10:00
Damien Elmes
783767be0d
Merge pull request #181 from Glutanimate/fix-previewer-navigation
...
Improve previewer navigation
2017-03-26 15:49:34 +10:00
Damien Elmes
bcdfeaa9c6
Merge pull request #180 from Glutanimate/preserve-tag-focus-in-browser
...
Preserve tag field focus when switching between cards in the browser
2017-03-26 15:49:03 +10:00
Glutanimate
a70e751238
Tweak previewer navigation behaviour
2017-03-24 17:09:16 +01:00
Glutanimate
0bcf60fea6
Tweak previewer navigation button display
2017-03-24 17:05:33 +01:00
Glutanimate
8f7f7db861
Preserve tag field focus when switching between cards
2017-03-24 16:23:48 +01:00
Damien Elmes
bb50976ce2
remove modeltest
2017-03-18 08:08:21 +09:00
Damien Elmes
17d68cc957
use a clearer name for fmtQA()
2017-03-14 15:48:40 +09:00
Henrik Enggaard Hansen
857733c8e9
Use the same formatting for the browser and card history
2017-03-13 15:52:27 +01:00
Henrik Enggaard Hansen
1dfc4466f1
Move card formatting to anki.utils
2017-03-13 15:52:02 +01:00
Damien Elmes
07f175cec8
add m4a to attachable media formats
2017-03-02 12:10:13 +10:00
Damien Elmes
b06133a2e4
Merge pull request #174 from henrikh/master
...
Add name to about screen
2017-02-27 14:32:35 +10:00
Damien Elmes
9009703f0e
Merge branch 'master' of github.com:dae/anki
2017-02-27 14:29:54 +10:00
Henrik Enggaard Hansen
e7ecb9c6a9
Add name to about screen
2017-02-26 15:19:34 +01:00
Damien Elmes
c2f7b48a29
use QStandardPaths instead of the env var
2017-02-25 18:07:01 +10:00
Damien Elmes
97f280923c
Merge pull request #172 from Glutanimate/master
...
Add another name to about screen
2017-02-25 13:48:21 +10:00
Damien Elmes
90167b139a
Merge pull request #171 from luoliyan/master
...
Add name to about screen
2017-02-25 13:47:59 +10:00
Glutanimate
96a252bebb
Add another name to about screen
2017-02-25 02:41:26 +01:00
luoliyan
bf8fddfabc
Add name to about screen
2017-02-24 21:41:47 +09:30
Damien Elmes
bcaf5762ec
fix errors when previewing
2017-02-23 16:21:00 +10:00
Damien Elmes
d1ebc8d805
add dmitry to about.py
...
Anyone else who's contributed anything to Anki - however small - is most
welcome to be listed in the about screen. Sending me a pull request that
adds your name or alias would be easiest, but if that is difficult
please let us know on the support site and we'll do it for you.
2017-02-23 14:41:07 +10:00
Damien Elmes
8085f8bc04
refuse to load on qt5.8.0 due to lack of IME support, etc
2017-02-22 18:36:46 +10:00
Damien Elmes
9c2c590de9
Merge pull request #170 from illia-v/super-no-arguments
...
Use `super()` without arguments
2017-02-22 18:34:08 +10:00
Damien Elmes
57c8e43327
change profile folder on windows and linux
...
onedrive seems to frequently screw up the permissions on the documents
folder. since we're stuck with more difficult to find folders on
mac/win, we may as well migrate linux as well, to a more
standards-compliant path.
2017-02-22 18:16:19 +10:00
Illia Volochii
ddc4c6a7e3
Use super() without arguments
2017-02-21 23:08:41 +02:00
Damien Elmes
0f04744f7e
fix embedded fonts
2017-02-21 13:27:29 +10:00
Damien Elmes
745108bffd
make sure we close all windows prior to unloading the collection
2017-02-19 15:13:58 +10:00
Damien Elmes
7ebd66a1c8
add modeltest to browser; fix an issue with rowCount()/columnCount()
2017-02-19 14:30:35 +10:00
Damien Elmes
6335dcb90e
canonicalize to NFC form on edit/import
2017-02-19 12:49:52 +10:00
Glutanimate
d530d5fdef
Remove temporary note when switching note model
2017-02-16 05:00:49 +01:00
Damien Elmes
082448744d
Merge pull request #165 from luoliyan/fix-tooltip-import
...
Fix NameError caused by missing import
2017-02-16 12:57:19 +10:00
luoliyan
c7e5a618a5
Fix NameError caused by missing import
2017-02-15 23:08:37 +09:30