Merge branch 'master' of github.com:dae/anki
This commit is contained in:
commit
eaf09b5093
@ -159,10 +159,8 @@ class Reviewer:
|
|||||||
if c.isEmpty():
|
if c.isEmpty():
|
||||||
q = _("""\
|
q = _("""\
|
||||||
The front of this card is empty. Please run Tools>Empty Cards.""")
|
The front of this card is empty. Please run Tools>Empty Cards.""")
|
||||||
a = ""
|
|
||||||
else:
|
else:
|
||||||
q = c.q()
|
q = c.q()
|
||||||
a = c.a()
|
|
||||||
if self.autoplay(c):
|
if self.autoplay(c):
|
||||||
playFromText(q)
|
playFromText(q)
|
||||||
# render & update bottom
|
# render & update bottom
|
||||||
@ -386,11 +384,7 @@ Please run Tools>Empty Cards""")
|
|||||||
# compare in NFC form so accents appear correct
|
# compare in NFC form so accents appear correct
|
||||||
given = ucd.normalize("NFC", given)
|
given = ucd.normalize("NFC", given)
|
||||||
correct = ucd.normalize("NFC", correct)
|
correct = ucd.normalize("NFC", correct)
|
||||||
try:
|
|
||||||
s = difflib.SequenceMatcher(None, given, correct, autojunk=False)
|
s = difflib.SequenceMatcher(None, given, correct, autojunk=False)
|
||||||
except:
|
|
||||||
# autojunk was added in python 2.7.1
|
|
||||||
s = difflib.SequenceMatcher(None, given, correct)
|
|
||||||
givenElems = []
|
givenElems = []
|
||||||
correctElems = []
|
correctElems = []
|
||||||
givenPoint = 0
|
givenPoint = 0
|
||||||
@ -535,7 +529,6 @@ time = %(time)d;
|
|||||||
return l + ((2, _("Hard")), (3, _("Good")), (4, _("Easy")))
|
return l + ((2, _("Hard")), (3, _("Good")), (4, _("Easy")))
|
||||||
|
|
||||||
def _answerButtons(self):
|
def _answerButtons(self):
|
||||||
times = []
|
|
||||||
default = self._defaultEase()
|
default = self._defaultEase()
|
||||||
def but(i, label):
|
def but(i, label):
|
||||||
if i == default:
|
if i == default:
|
||||||
@ -599,7 +592,7 @@ time = %(time)d;
|
|||||||
m = QMenu(self.mw)
|
m = QMenu(self.mw)
|
||||||
self._addMenuItems(m, opts)
|
self._addMenuItems(m, opts)
|
||||||
|
|
||||||
runHook("Reviewer.contextMenuEvent",self,m)
|
runHook("Reviewer.contextMenuEvent", self, m)
|
||||||
m.exec_(QCursor.pos())
|
m.exec_(QCursor.pos())
|
||||||
|
|
||||||
def _addMenuItems(self, m, rows):
|
def _addMenuItems(self, m, rows):
|
||||||
|
Loading…
Reference in New Issue
Block a user