mirror of
https://github.com/ankitects/anki.git
synced 2025-09-20 06:52:21 -04:00
hide/show intervals in real time, create media dir when escaping
This commit is contained in:
parent
45dd2c2c58
commit
cafb19f2ca
2 changed files with 6 additions and 7 deletions
|
@ -369,13 +369,12 @@ An error occurred. Please copy the following message into a bug report.\n\n""" +
|
|||
for i in range(1, 5):
|
||||
l = getattr(self.mainWin, "easeLabel%d" % i)
|
||||
if self.config['suppressEstimates']:
|
||||
l.hide()
|
||||
l.setText("")
|
||||
elif i == 1:
|
||||
l.setText(self.withInterfaceFont(_("Soon")))
|
||||
else:
|
||||
if i == 1:
|
||||
l.setText(self.withInterfaceFont(_("Soon")))
|
||||
else:
|
||||
l.setText(self.withInterfaceFont("<b>" +
|
||||
self.deck.nextIntervalStr(self.currentCard, i) + "</b>"))
|
||||
l.setText(self.withInterfaceFont("<b>" +
|
||||
self.deck.nextIntervalStr(self.currentCard, i) + "</b>"))
|
||||
|
||||
def withInterfaceFont(self, text):
|
||||
family = self.config["interfaceFontFamily"]
|
||||
|
|
|
@ -170,7 +170,7 @@ def mungeQA(deck, txt):
|
|||
prefix = u"file:///"
|
||||
else:
|
||||
prefix = u"file://"
|
||||
src = prefix + os.path.join(deck.mediaDir(), match)
|
||||
src = prefix + os.path.join(deck.mediaDir(create=True), match)
|
||||
return 'img src="%s"' % src
|
||||
txt = re.sub('img src="(.*?)"', quote, txt)
|
||||
return txt
|
||||
|
|
Loading…
Reference in a new issue