From 63e1132b5be2d01d3c065c327ca2cd79efadb99c Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Tue, 13 Dec 2011 01:04:01 +0900 Subject: [PATCH] sync pref tweaks --- aqt/preferences.py | 12 ++++++++---- designer/preferences.ui | 3 +++ 2 files changed, 11 insertions(+), 4 deletions(-) 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 +