From 2eaadcfa08281d1066aba7fbbc8f6324d17f229b Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Wed, 6 May 2009 15:39:33 +0900 Subject: [PATCH] make sync msg box configurable, fix bug in initial->study screen --- ankiqt/config.py | 1 + ankiqt/ui/main.py | 10 +++++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ankiqt/config.py b/ankiqt/config.py index 9652fee92..5e1e1c882 100644 --- a/ankiqt/config.py +++ b/ankiqt/config.py @@ -44,6 +44,7 @@ class Config(dict): 'iconSize': 32, 'syncOnLoad': True, 'syncOnClose': True, + 'syncInMsgBox': False, 'checkForUpdates': True, 'interfaceLang': "", 'syncUsername': "", diff --git a/ankiqt/ui/main.py b/ankiqt/ui/main.py index aa6440c6e..a37695744 100644 --- a/ankiqt/ui/main.py +++ b/ankiqt/ui/main.py @@ -230,7 +230,7 @@ Please do not file a bug report with Anki.

""") 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 = _("""\

Sync Failed

-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..."),