mirror of
https://github.com/ankitects/anki.git
synced 2025-09-20 06:52:21 -04:00
add hidden option to disable repeating of audio in question
This commit is contained in:
parent
ea76ddc9f3
commit
b3e0b302ff
2 changed files with 52 additions and 50 deletions
|
@ -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):
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue