mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
if user/pass is wrong, open prefs
This commit is contained in:
parent
888317385c
commit
2f8508d13a
2 changed files with 6 additions and 0 deletions
|
@ -2003,6 +2003,7 @@ it to your friends.
|
|||
self.connect(self.syncThread, SIGNAL("fullSyncStarted"), self.fullSyncStarted)
|
||||
self.connect(self.syncThread, SIGNAL("fullSyncFinished"), self.fullSyncFinished)
|
||||
self.connect(self.syncThread, SIGNAL("fullSyncProgress"), self.fullSyncProgress)
|
||||
self.connect(self.syncThread, SIGNAL("badUserPass"), self.badUserPass)
|
||||
self.syncThread.start()
|
||||
self.switchToWelcomeScreen()
|
||||
self.setEnabled(False)
|
||||
|
@ -2069,6 +2070,10 @@ it to your friends.
|
|||
ui.utils.showWarning(text, self)
|
||||
self.setStatus("")
|
||||
|
||||
def badUserPass(self):
|
||||
ui.preferences.Preferences(self, self.config).dialog.tabWidget.\
|
||||
setCurrentIndex(1)
|
||||
|
||||
def noSyncResponse(self):
|
||||
msg = _("""\
|
||||
<h1>Sync Failed</h1>
|
||||
|
|
|
@ -68,6 +68,7 @@ class Sync(QThread):
|
|||
def getErrorMessage(self, error):
|
||||
if error.data.get('status') == "invalidUserPass":
|
||||
msg=_("Please double-check your username/password.")
|
||||
self.emit(SIGNAL("badUserPass"))
|
||||
elif error.data.get('status') == "oldVersion":
|
||||
msg=_("The sync protocol has changed. Please upgrade.")
|
||||
else:
|
||||
|
|
Loading…
Reference in a new issue