sync pref tweaks

This commit is contained in:
Damien Elmes 2011-12-13 01:04:01 +09:00
parent 07ce5983f9
commit 63e1132b5b
2 changed files with 11 additions and 4 deletions

View file

@ -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(_("""\
<b>Synchronization</b><br>
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(_("""\
<b>Synchronization</b><br>
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()

View file

@ -235,6 +235,9 @@
<property name="text">
<string>Deauthorize</string>
</property>
<property name="autoDefault">
<bool>false</bool>
</property>
</widget>
</item>
<item>