Commit Graph

1935 Commits

Author SHA1 Message Date
Damien Elmes
09ff23dc70 filter font and background from all html elems in int. paste
https://anki.tenderapp.com/discussions/ankidesktop/30806-font-size-attribute-added-when-copying-text-inside-anki
2018-11-12 15:46:12 +10:00
Damien Elmes
d3c0ea46e2 normalize search text
https://anki.tenderapp.com/discussions/ankidesktop/30614-diacritics-changed-on-card-save-anki-21
2018-11-12 12:43:54 +10:00
Damien Elmes
fea23177e8 skip scroll if the number of cards has not changed
The scrolling behaviour is useful when cards are deleted, but
annoying in other cases such as when changing flags.
2018-11-12 12:26:23 +10:00
Damien Elmes
6609dfda7b prevent hiding of shortcuts in browser context menu 2018-11-12 12:13:58 +10:00
Damien Elmes
4acce5f96b checkmark on flags in browser 2018-11-12 12:10:50 +10:00
Damien Elmes
8ac5cc8dff prevent qt from hiding shortcuts in reviewer context 2018-11-12 12:02:51 +10:00
Damien Elmes
4b19e47b3f show checkmark on current flag in reviewer context menu 2018-11-12 12:01:54 +10:00
Damien Elmes
a3eb44d950 toggle flags in reviewer 2018-11-12 11:58:36 +10:00
Damien Elmes
d2765eadd5 toggle flags instead of using separate clear action in browser 2018-11-12 11:55:37 +10:00
Damien Elmes
997cc95fc7 use a semi transparent, neutral selection in browser
As the base colour of rows is now visible, actions like flagging
now provide immediate feedback about what they've changed.
2018-11-12 11:02:01 +10:00
Damien Elmes
9c85376b3e improve handling of invalid deck trees
- move checking code out of the schedulers and into the deck manager
- ensure we can fix the problem in one loop - the previous recursive
approach could lead to stack overflows if the top level of a large
deck tree was missing. this was also the cause of the sqlite
'interrupted' error that some users were seeing
2018-11-09 15:04:35 +10:00
Damien Elmes
5e5d35e9c1 change purple flag to orange 2018-11-01 14:58:41 +10:00
Damien Elmes
a9f9df5109 Revert "workaround bottom toolbar issue on macOS/qt5.12"
This reverts commit 5e3f35a32c.

underlying issue should be fixed in qt5.12beta3
2018-10-29 21:08:16 +10:00
Damien Elmes
3126611ecf display warning when profile corrupted 2018-10-29 21:06:33 +10:00
Damien Elmes
eef0b92374 correctly load prefs file modified in more recent qt 2018-10-29 21:06:11 +10:00
Damien Elmes
3c994ce257 Revert "increase db timeout"
This reverts commit 71053fcea9.

did not seem to help
2018-10-28 14:17:43 +10:00
Damien Elmes
e18bd4d67d work around existing instance not responding quickly
on a slow computer the first instance may have set up the local
server but not yet started the main loop, so when a user double clicks
on the icon twice, the second instance was timing out and opening
another window, then giving locked database errors

to work around this, increase the timeout, and tell the user the
existing instance is not responding instead of creating a new instance

https://anki.tenderapp.com/discussions/ankidesktop/30306-error
https://anki.tenderapp.com/discussions/ankidesktop/30550-im-sorry
2018-10-28 14:17:16 +10:00
Damien Elmes
2483e9c89e sidebar now visible by default 2018-10-28 12:24:54 +10:00
Damien Elmes
a4edc57dc5 run latex commands without bundled libs
https://anki.tenderapp.com/discussions/ankidesktop/30531-latex-wont-generate-svgs-automatically-but-will-generate-pngs
2018-10-28 11:41:43 +10:00
Damien Elmes
b4f4e65c55 simplify about sizing 2018-10-25 15:47:17 +10:00
Damien Elmes
1fd7c244be Revert "fix about dialog collapsed on qt 5.11/12"
This reverts commit edb3b176a8.

causes a lot of flickering on startup - will just move to
static sizing instead, as there is a scrollbar anyway
2018-10-25 15:43:17 +10:00
Damien Elmes
5e3f35a32c workaround bottom toolbar issue on macOS/qt5.12 2018-10-25 15:34:27 +10:00
Damien Elmes
edb3b176a8 fix about dialog collapsed on qt 5.11/12
the new approach doesn't seem to work properly on qt 5.9, so just
revert to a static size on that platform
2018-10-25 15:25:47 +10:00
Damien Elmes
1490dc7390 bump version 2018-10-25 14:52:49 +10:00
Damien Elmes
3cb073878a allow startup on qt5.12+
an intermittent issue with the webview on macOS, but otherwise
appears ok in initial tests
2018-10-25 14:48:08 +10:00
Damien Elmes
098434ff38 we can use the old undo shortcut on 5.11
webviews no longer propagate the captured shortcut
2018-10-23 18:40:58 +10:00
Damien Elmes
68a398f8d6 fix black flash on stats load on osx/qt5.11 2018-10-23 17:09:16 +10:00
Damien Elmes
0c1c7a1ca3 fix other clickable anchors 2018-10-23 17:05:47 +10:00
Damien Elmes
14f4107dfd deal with onclick handlers that don't return false
Because <base> is set to the media server URL, <a href='#' ...> causes
a page transition from the current setHtml() page data. Previous Qt
versions allowed us to just ignore the request, but now returning False
in acceptNavigationRequest() causes the subsequent page navigation to
be rejected as well, resulting in no visible change when clicking on a
deck in the deck list.

To deal with this, Anki will now warn when such navigation requests
come in, as the anchors need to be updated to return false. pycmd()
has been updated to return false to make returning in onclick easier.

Also use QUrl.matches() instead of converting the potentially long
URL to a string.
2018-10-23 16:47:01 +10:00
Damien Elmes
fa9a54db98 allow the initial setHtml() request to proceed
Qt 5.11 appears to call acceptNavigationRequest() for the initial
page load now.
2018-10-23 16:11:08 +10:00
Damien Elmes
1af556cb8d delay event filter installation
Qt 5.11 doesn't initialize the focusProxy until
a page has been loaded.
2018-10-23 16:06:56 +10:00
Damien Elmes
63f2ccdb3a allow startup on qt 5.11 2018-10-23 16:03:27 +10:00
Damien Elmes
5ecd01cc99 support new sip module location
qt has moved sip into a submodule
2018-10-23 16:02:59 +10:00
Damien Elmes
f8e1ebd4fb prevent infinite loop with invalid template 2018-10-20 19:37:01 +10:00
Damien Elmes
b0091053bf don't require collection for top toolbar
This is a hack, and ideally the code would be refactored
so that the entire main window is not loaded until a collection
is available, but doing that will break a bunch of add-ons.

Fixes
https://anki.tenderapp.com/discussions/beta-testing/1276-anki-215-beta#comment_46241878
2018-10-12 12:08:19 +10:00
Damien Elmes
7d62b186f8 disable proxy support if 127.0.0.1 is not bypassed
There doesn't appear to be an easy way to tell WebEngine to ignore
the proxy for 127.0.0.1, so if the user has not bypassed the proxy
for local addresses, completely disable it. This may break remote
image and script references, but should at least allow the app to
load without intervention.
2018-10-11 15:49:04 +10:00
Damien Elmes
63661713df use 127.0.0.1 instead of localhost in local urls 2018-10-11 15:45:55 +10:00
Damien Elmes
5907629406 fix bug in tag deletion
https://anki.tenderapp.com/discussions/ankidesktop/30146-removing-single-letter-tags-also-removes-any-other-tags-with-the-letter
2018-10-07 18:21:51 +10:00
Damien Elmes
943863d463
Merge pull request #257 from jurf/patch-1
Use beautifulsoup4 instead of bs4
2018-10-05 11:02:10 +10:00
Juraj Fiala
42429fc3ee
Use beautifulsoup4 instead of bs4
bs4 is just a dummy package to prevent name squatting, it pulls in beautifulsoup4 as a dependency.

https://incolumitas.com/2016/06/08/typosquatting-package-managers/
2018-10-04 10:49:06 +02:00
Damien Elmes
0d0c6f94e0 use nosetests3 if available 2018-10-04 17:56:50 +10:00
Damien Elmes
a119afed6a
Merge pull request #255 from gmcmanus/master
Properly escape pasted URLs
2018-10-04 17:44:13 +10:00
Damien Elmes
3200eb043e bump version 2018-10-01 15:43:47 +10:00
Gabriel McManus
893ebfab60 Properly escape pasted URLs
If a URL is pasted and it isn't converted to a media link, then it
should be treated as normal text and properly escaped.
2018-09-29 00:47:45 +00:00
Damien Elmes
5ae73d96d7 bump version 2018-09-28 18:49:38 +10:00
Damien Elmes
c535783091 increase overview width
fixes wrapped button on
https://anki.tenderapp.com/discussions/ankidesktop/29948-214-bugs
2018-09-28 17:54:43 +10:00
Damien Elmes
2866248314 add small extra margin to answer button
fixes scrollbar in Japanese mode due to half width counts + full width
times on following screen

https://anki.tenderapp.com/discussions/ankidesktop/29948-214-bugs
2018-09-28 17:52:10 +10:00
Damien Elmes
2868ec0e8b catch js results that are received after collection closed 2018-09-28 16:27:41 +10:00
Damien Elmes
a8cadfdc3b
Merge pull request #254 from giqtaqisi/patch-1
Add support for Lojban
2018-09-27 11:51:42 +10:00
Damien Elmes
8489f84937 catch .anki(2) imports 2018-09-27 11:35:21 +10:00