diff --git a/ankiqt/config.py b/ankiqt/config.py index 53235a122..50af0857a 100644 --- a/ankiqt/config.py +++ b/ankiqt/config.py @@ -41,66 +41,67 @@ class Config(dict): def defaults(self): fields = { - 'iconSize': 32, - 'syncOnLoad': True, - 'syncOnClose': True, - 'syncInMsgBox': False, - 'checkForUpdates': True, - 'interfaceLang': "", - 'syncUsername': "", - 'syncPassword': "", - 'showFontPreview': False, - 'showToolbar': True, - 'recentDeckPaths': [], - 'saveAfterAnswer': True, - 'saveAfterAnswerNum': 10, - 'saveAfterAdding': True, - 'saveAfterAddingNum': 1, - 'saveOnClose': True, - 'mainWindowGeom': None, - 'mainWindowState': None, - 'suppressUpdate': False, - 'suppressEstimates': False, - 'showLastCardInterval': False, - 'showLastCardContent': False, - 'showTrayIcon': False, - 'showTimer': True, - 'simpleToolbar': True, - 'scrollToAnswer': True, - 'qaDivider': True, - 'splitQA': True, - 'sortIndex': 0, 'addZeroSpace': False, 'alternativeTheme': False, - 'showStudyScreen': True, - 'showStudyOptions': False, - 'showStudyStats': True, - 'showCardTimer': True, - 'standaloneWindows': True, - 'extraNewCards': 5, - 'randomizeOnCram': True, + 'checkForUpdates': True, 'created': time.time(), - 'id': genID(), - 'editorReverseOrder': False, + 'deckBrowserNameLength': 30, + 'deckBrowserOrder': 0, + 'deckBrowserRefreshPeriod': 3600, + 'deleteMedia': False, 'editFontFamily': 'Arial', 'editFontSize': 12, 'editLineSize': 20, + 'editorReverseOrder': False, + 'extraNewCards': 5, 'factEditorAdvanced': False, - 'typeAnswerFontSize': 20, - 'showProgress': True, - 'recentColours': ["#000000", "#0000ff"], - 'preventEditUntilAnswer': False, + 'forceLTR': False, + 'iconSize': 32, + 'id': genID(), + 'interfaceLang': "", + 'loadLastDeck': False, + 'mainWindowGeom': None, + 'mainWindowState': None, 'numBackups': 30, + 'preventEditUntilAnswer': False, 'proxyHost': '', + 'proxyPass': '', 'proxyPort': 8080, 'proxyUser': '', - 'proxyPass': '', - 'loadLastDeck': False, - 'deckBrowserRefreshPeriod': 3600, - 'deckBrowserOrder': 0, - 'deckBrowserNameLength': 30, - 'deleteMedia': False, - 'forceLTR': False, + 'qaDivider': True, + 'randomizeOnCram': True, + 'recentColours': ["#000000", "#0000ff"], + 'recentDeckPaths': [], + 'repeatQuestionAudio': True, + 'saveAfterAdding': True, + 'saveAfterAddingNum': 1, + 'saveAfterAnswer': True, + 'saveAfterAnswerNum': 10, + 'saveOnClose': True, + 'scrollToAnswer': True, + 'showCardTimer': True, + 'showFontPreview': False, + 'showLastCardContent': False, + 'showLastCardInterval': False, + 'showProgress': True, + 'showStudyOptions': False, + 'showStudyScreen': True, + 'showStudyStats': True, + 'showTimer': True, + 'showToolbar': True, + 'showTrayIcon': False, + 'simpleToolbar': True, + 'sortIndex': 0, + 'splitQA': True, + 'standaloneWindows': True, + 'suppressEstimates': False, + 'suppressUpdate': False, + 'syncInMsgBox': False, + 'syncOnClose': True, + 'syncOnLoad': True, + 'syncPassword': "", + 'syncUsername': "", + 'typeAnswerFontSize': 20, } for (k,v) in fields.items(): if not self.has_key(k): diff --git a/ankiqt/ui/main.py b/ankiqt/ui/main.py index cb5339d87..eb82946fc 100755 --- a/ankiqt/ui/main.py +++ b/ankiqt/ui/main.py @@ -2556,7 +2556,8 @@ it to your friends. def onRepeatAudio(self): clearAudioQueue() if (not self.currentCard.cardModel.questionInAnswer - or self.state == "showQuestion"): + or self.state == "showQuestion") and \ + self.config['repeatQuestionAudio']: playFromText(self.currentCard.question) if self.state != "showQuestion": playFromText(self.currentCard.answer)