mirror of
https://github.com/ankitects/anki.git
synced 2025-11-17 10:07:13 -05: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("fullSyncStarted"), self.fullSyncStarted)
|
||||||
self.connect(self.syncThread, SIGNAL("fullSyncFinished"), self.fullSyncFinished)
|
self.connect(self.syncThread, SIGNAL("fullSyncFinished"), self.fullSyncFinished)
|
||||||
self.connect(self.syncThread, SIGNAL("fullSyncProgress"), self.fullSyncProgress)
|
self.connect(self.syncThread, SIGNAL("fullSyncProgress"), self.fullSyncProgress)
|
||||||
|
self.connect(self.syncThread, SIGNAL("badUserPass"), self.badUserPass)
|
||||||
self.syncThread.start()
|
self.syncThread.start()
|
||||||
self.switchToWelcomeScreen()
|
self.switchToWelcomeScreen()
|
||||||
self.setEnabled(False)
|
self.setEnabled(False)
|
||||||
|
|
@ -2069,6 +2070,10 @@ it to your friends.
|
||||||
ui.utils.showWarning(text, self)
|
ui.utils.showWarning(text, self)
|
||||||
self.setStatus("")
|
self.setStatus("")
|
||||||
|
|
||||||
|
def badUserPass(self):
|
||||||
|
ui.preferences.Preferences(self, self.config).dialog.tabWidget.\
|
||||||
|
setCurrentIndex(1)
|
||||||
|
|
||||||
def noSyncResponse(self):
|
def noSyncResponse(self):
|
||||||
msg = _("""\
|
msg = _("""\
|
||||||
<h1>Sync Failed</h1>
|
<h1>Sync Failed</h1>
|
||||||
|
|
|
||||||
|
|
@ -68,6 +68,7 @@ class Sync(QThread):
|
||||||
def getErrorMessage(self, error):
|
def getErrorMessage(self, error):
|
||||||
if error.data.get('status') == "invalidUserPass":
|
if error.data.get('status') == "invalidUserPass":
|
||||||
msg=_("Please double-check your username/password.")
|
msg=_("Please double-check your username/password.")
|
||||||
|
self.emit(SIGNAL("badUserPass"))
|
||||||
elif error.data.get('status') == "oldVersion":
|
elif error.data.get('status') == "oldVersion":
|
||||||
msg=_("The sync protocol has changed. Please upgrade.")
|
msg=_("The sync protocol has changed. Please upgrade.")
|
||||||
else:
|
else:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue