From 8fe8072a2f82eb8a7d53c559629dcffdd1a18cd2 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Mon, 12 Jan 2009 08:31:21 +0900 Subject: [PATCH] add showCardTimer option --- ankiqt/config.py | 1 + ankiqt/ui/status.py | 2 ++ ankiqt/ui/view.py | 1 + 3 files changed, 4 insertions(+) diff --git a/ankiqt/config.py b/ankiqt/config.py index b63db055e..9d44a4cd3 100644 --- a/ankiqt/config.py +++ b/ankiqt/config.py @@ -73,6 +73,7 @@ class Config(dict): 'alternativeTheme': False, 'showStudyScreen': True, 'showStudyOptions': False, + 'showCardTimer': True, 'created': time.time(), 'id': genID(), } diff --git a/ankiqt/ui/status.py b/ankiqt/ui/status.py index f679d78a0..731c3981b 100644 --- a/ankiqt/ui/status.py +++ b/ankiqt/ui/status.py @@ -238,6 +238,8 @@ You should aim to answer each question within
if self.main.currentCard: if time.time() - self.timerFlashStart < 1: return + if not self.main.config['showCardTimer']: + return t = self.main.currentCard.thinkingTime() self.timer.setText('%02d:%02d' % (t/60, t%60)) return diff --git a/ankiqt/ui/view.py b/ankiqt/ui/view.py index 6704fbff4..ec4deae8f 100644 --- a/ankiqt/ui/view.py +++ b/ankiqt/ui/view.py @@ -97,6 +97,7 @@ class View(object): self.buffer = self.addStyles() + self.buffer # hook for user css runHook("preFlushHook") + #print self.buffer.encode("utf-8") self.body.setHtml(self.buffer) def write(self, text):