if user/pass is wrong, open prefs

This commit is contained in:
Damien Elmes 2009-06-15 09:26:36 +09:00
parent 888317385c
commit 2f8508d13a
2 changed files with 6 additions and 0 deletions

View file

@ -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>

View file

@ -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: