make sync msg box configurable, fix bug in initial->study screen

This commit is contained in:
Damien Elmes 2009-05-06 15:39:33 +09:00
parent 329caf7f96
commit 2eaadcfa08
2 changed files with 8 additions and 3 deletions

View file

@ -44,6 +44,7 @@ class Config(dict):
'iconSize': 32,
'syncOnLoad': True,
'syncOnClose': True,
'syncInMsgBox': False,
'checkForUpdates': True,
'interfaceLang': "",
'syncUsername': "",

View file

@ -230,7 +230,7 @@ Please do not file a bug report with Anki.<br><br>""")
self.updateRecentFilesMenu()
self.updateViews(state)
if self.state == "studyScreen":
return self.updateStudyStats()
return self.showStudyScreen()
else:
return self.moveToState("getQuestion")
else:
@ -1822,9 +1822,13 @@ it to your friends.
self.setStatus("")
def noSyncResponse(self):
self.showToolTip(_("""\
msg = _("""\
<h1>Sync Failed</h1>
Couldn't contact Anki Online. Please check your internet connection."""))
Couldn't contact Anki Online. Please check your internet connection.""")
if self.config['syncInMsgBox']:
ui.utils.showWarning(msg)
else:
self.showToolTip(msg)
def openSyncProgress(self):
self.syncProgressDialog = QProgressDialog(_("Syncing Media..."),