Commit graph

1636 commits

Author SHA1 Message Date
Damien Elmes
2294f8bc9f work around progress dlg hang at startup on osx
with autosync on, when the progress dialog is closed and the main window
appears, it becomes stuck. hiding the dialog instead of closing it
seems to fix this.
2018-01-14 19:29:56 +10:00
Damien Elmes
f2159a99d0 hide second filter for v1 sched 2018-01-14 19:20:01 +10:00
Damien Elmes
e03f28f2cc fix bad margins in progress dialog 2018-01-14 18:05:43 +10:00
Damien Elmes
5b8f2ad4e5 bump version 2018-01-14 17:53:09 +10:00
Damien Elmes
a089424adc check prefs21.db integrity
otherwise some corruption errors only become apparent when trying to
load an individual profile
2018-01-14 17:47:21 +10:00
Damien Elmes
1f818aa10b disable syncing and deck exports for v2 sched 2018-01-14 17:35:59 +10:00
Damien Elmes
5f22a067e2 extra newline 2018-01-14 17:01:39 +10:00
Damien Elmes
a91829f9b7 update tests 2018-01-14 16:58:12 +10:00
Damien Elmes
3c728e60f5 support sched versions in collection 2018-01-14 16:58:04 +10:00
Damien Elmes
59aa78f253 code in new scheduler to move between versions 2018-01-14 16:57:40 +10:00
Damien Elmes
1b88490bb1 add old sched code back 2018-01-14 16:55:07 +10:00
Damien Elmes
cdb3ee4702 rename new sched code to schedv2.py 2018-01-14 16:54:48 +10:00
Damien Elmes
0482a37517 support a second filter in filtered decks 2018-01-14 13:08:38 +10:00
Damien Elmes
f671a7aa99 store day rollover relative to local time 2018-01-14 12:16:53 +10:00
Damien Elmes
3f3fbd6fe3 make sure we log the correct type when card.type=3 2018-01-14 12:16:53 +10:00
Damien Elmes
f6176748c5 don't fetch reviews in deck order
- fetch reviews from all child decks at once, sorted by due order
- shuffle the gathered cards as we did previously
- review limits on child decks are ignored - only the current deck and
its parents control what the limit is
- to make the deck list consistent with actual counts, we can't sum the
child counts, as the sum in the parent limit>child limit case may not
reflect the actual number of cards that would be presented
2018-01-14 12:16:53 +10:00
Damien Elmes
65c779f25d distinguish between buried siblings and manually buried cards 2018-01-14 12:16:53 +10:00
Damien Elmes
38cd7f543a preserve learning/filtered state when suspending/burying
add new card type of 3 so we can distinguish cards in relearning from
normal reviews
2018-01-14 12:16:53 +10:00
Damien Elmes
a312ccf32e experiment with simple resched=off case to 'preview mode'
the previous approach meant we weren't able to preserve the card state
exactly when cards were in learning, since we didn't record the step
position prior to cards being moved into the filtered deck.

it also meant the answer buttons needed to change depending on state - 4
for cards in learning/review, but 2 when the card is on the final step
or is a review.

instead, in preview mode cards always have 2 buttons: again will repeat
again after a delay, and good immediately removes the card and restores
it to its previous state.

to accomplish this, we use a separate queue #, as the learn count
always needs to have a 1:1 correspondence to the number of cards
2018-01-14 12:16:53 +10:00
Damien Elmes
accf75be26 tweaks to interval constraining
- move fuzzing into _constrainedIvl() so it's applied prior to limits
like maxIvl

- don't fuzz early reviews, so cards get the same interval if a filtered
deck is rebuilt again
2018-01-14 12:16:53 +10:00
Damien Elmes
60db50a285 use the review queue for undue reviews 2018-01-14 12:16:53 +10:00
Damien Elmes
2f235ad8cf ensure due reviews+resched off works 2018-01-14 12:16:53 +10:00
Damien Elmes
93e4c2dc1a add test for new position preservation 2018-01-14 12:16:53 +10:00
Damien Elmes
4b581c9f77 schedtest changes, squashed from local branch 2018-01-14 12:16:53 +10:00
Damien Elmes
7ef0e8ed5e fixes to progress window
- make sure _shown reset to False on finish()
- ignore calls to .update() after finish() called, which can happen with
async signals in the sync code
2018-01-14 12:16:47 +10:00
Damien Elmes
20323ab8d2 Merge pull request #222 from tmiasko/narrow-browser-window
Make it possible to create narrow browser window.
2018-01-13 20:46:25 +10:00
Damien Elmes
99815f124e Merge pull request #221 from dubiousjim/patch-1
Factor out definition of context menu in reviewer.py
2018-01-13 20:45:54 +10:00
Tomasz Miąsko
9466eebea2 Make it possible to create narrow browser window. 2018-01-12 13:46:14 +01:00
dubiousjim
efefe1eac0 Factor out definition of context menu in reviewer.py
Handle definition of context menu in same way that shortcutKeys are handled. This makes it easier for add-ons to modify the context menu without needing to re-implement the whole showContextMenu method.
2018-01-07 18:19:49 +01:00
Damien Elmes
8d162270f0 update LICENSE to match source code
https://anki.tenderapp.com/discussions/beta-testing/920-anki-210-beta-26#comment_44446480
2018-01-06 19:07:56 +09:00
Damien Elmes
75a3262a9a Merge branch 'master' of github.com:dae/anki 2018-01-03 12:17:56 +09:00
Damien Elmes
5f21bbb465 Merge pull request #220 from ottopasuuna/fix-csv-import
Fix string decode error when importing csv files
2018-01-03 13:17:48 +10:00
Carl Hofmeister
430d38223c Fix string decode error when importing csv files 2017-12-31 14:01:47 -06:00
Damien Elmes
2810a0702f bigger margins in reviewer 2017-12-28 20:15:11 +10:00
Damien Elmes
71627b1c23 move away from qprogressdialog
qprogressdialog has been the source of a number of problems in the past,
and the most recent issue is that it's showing the progress dialog
early, regardless of what the minimum duration is set to. since we're
already using our own logic for deciding when to show the dialog, it's
easier to move to a normal dialog box

also prevent timers from firing while a progress dialog is visible, or
if the refresh timer fires we end up with the same issue.

https://anki.tenderapp.com/discussions/beta-testing/949-anki-stops-when-field-is-added
2017-12-28 18:31:05 +10:00
Damien Elmes
cc6f99015b Merge pull request #219 from kerrickstaley/localhost
Bind mediaserver on 127.0.0.1 instead of localhost
2017-12-26 12:42:35 +10:00
Kerrick Staley
47dc2eb464 Bind mediaserver on 127.0.0.1 instead of localhost 2017-12-24 23:10:07 -08:00
Damien Elmes
d08f6c4f46 bump version 2017-12-24 22:27:09 +10:00
Damien Elmes
f1aa0df2c5 don't make the body margin depend on text size 2017-12-24 22:26:55 +10:00
Damien Elmes
c9f37be0d0 Merge pull request #218 from aakatov/master
Fix play sound with HTML special symbols in its filename
2017-12-24 10:43:44 +10:00
aakatov
793e12a84c fix play sound with HTML special symbols in its filename 2017-12-23 12:36:26 +03:00
Damien Elmes
b5c17cb370 bump version 2017-12-22 21:48:13 +10:00
Damien Elmes
9230211809 different cloze colour in night mode 2017-12-20 16:05:28 +10:00
Damien Elmes
206abfa338 refuse to run on qt 5.10
- on Linux and Windows, opening the browser and stats window back and
forth multiple times triggers a crash in the GL libraries, even with
software rendering enabled. Will try again when .1 is out
- on Mac, shortcut keys fire multiple times:
https://bugreports.qt.io/browse/QTBUG-65184
2017-12-18 14:50:14 +10:00
Damien Elmes
020eb86e3d add context menu to browser 2017-12-14 14:49:51 +10:00
Damien Elmes
d513c93b89 more raw string literals 2017-12-13 14:34:54 +10:00
Damien Elmes
174e1a46b3 fix error when importing 2017-12-12 11:55:27 +10:00
Damien Elmes
39bc5d42ae fix mpv warnings 2017-12-11 17:26:25 +10:00
Damien Elmes
83b220f931 more open() and regex strings 2017-12-11 17:25:51 +10:00
Damien Elmes
7bc9fd6d04 move regex flags to start of string 2017-12-11 16:42:19 +10:00