mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 22:42:25 -04:00
add showCardTimer option
This commit is contained in:
parent
51701903be
commit
8fe8072a2f
3 changed files with 4 additions and 0 deletions
|
@ -73,6 +73,7 @@ class Config(dict):
|
||||||
'alternativeTheme': False,
|
'alternativeTheme': False,
|
||||||
'showStudyScreen': True,
|
'showStudyScreen': True,
|
||||||
'showStudyOptions': False,
|
'showStudyOptions': False,
|
||||||
|
'showCardTimer': True,
|
||||||
'created': time.time(),
|
'created': time.time(),
|
||||||
'id': genID(),
|
'id': genID(),
|
||||||
}
|
}
|
||||||
|
|
|
@ -238,6 +238,8 @@ You should aim to answer each question within<br>
|
||||||
if self.main.currentCard:
|
if self.main.currentCard:
|
||||||
if time.time() - self.timerFlashStart < 1:
|
if time.time() - self.timerFlashStart < 1:
|
||||||
return
|
return
|
||||||
|
if not self.main.config['showCardTimer']:
|
||||||
|
return
|
||||||
t = self.main.currentCard.thinkingTime()
|
t = self.main.currentCard.thinkingTime()
|
||||||
self.timer.setText('%02d:%02d' % (t/60, t%60))
|
self.timer.setText('%02d:%02d' % (t/60, t%60))
|
||||||
return
|
return
|
||||||
|
|
|
@ -97,6 +97,7 @@ class View(object):
|
||||||
self.buffer = self.addStyles() + self.buffer
|
self.buffer = self.addStyles() + self.buffer
|
||||||
# hook for user css
|
# hook for user css
|
||||||
runHook("preFlushHook")
|
runHook("preFlushHook")
|
||||||
|
#print self.buffer.encode("utf-8")
|
||||||
self.body.setHtml(self.buffer)
|
self.body.setHtml(self.buffer)
|
||||||
|
|
||||||
def write(self, text):
|
def write(self, text):
|
||||||
|
|
Loading…
Reference in a new issue