diff --git a/aqt/preferences.py b/aqt/preferences.py index 822e3b2c9..197cb21f8 100644 --- a/aqt/preferences.py +++ b/aqt/preferences.py @@ -107,10 +107,7 @@ class Preferences(QDialog): self.form.syncMedia.setChecked( self.prof['syncMedia']) if not self.prof['syncKey']: - self.form.syncDeauth.setShown(False) - self.form.syncLabel.setText(_("""\ -Synchronization
-Not currently enabled; click the sync button in the main window to enable.""")) + self._hideAuth() else: self.connect(self.form.syncDeauth, SIGNAL("clicked()"), self.onSyncDeauth) @@ -119,8 +116,15 @@ Not currently enabled; click the sync button in the main window to enable.""")) self.form.proxyUser.setText(self.prof['proxyUser']) self.form.proxyPass.setText(self.prof['proxyPass']) + def _hideAuth(self): + self.form.syncDeauth.setShown(False) + self.form.syncLabel.setText(_("""\ +Synchronization
+Not currently enabled; click the sync button in the main window to enable.""")) + def onSyncDeauth(self): self.prof['syncKey'] = None + self._hideAuth() def updateNetwork(self): self.prof['autoSync'] = self.form.syncOnProgramOpen.isChecked() diff --git a/designer/preferences.ui b/designer/preferences.ui index 900554b6e..3e64817c7 100644 --- a/designer/preferences.ui +++ b/designer/preferences.ui @@ -235,6 +235,9 @@ Deauthorize + + false +