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.form.syncMedia.setChecked(
self.prof['syncMedia']) self.prof['syncMedia'])
if not self.prof['syncKey']: if not self.prof['syncKey']:
self.form.syncDeauth.setShown(False) self._hideAuth()
self.form.syncLabel.setText(_("""\
<b>Synchronization</b><br>
Not currently enabled; click the sync button in the main window to enable."""))
else: else:
self.connect(self.form.syncDeauth, SIGNAL("clicked()"), self.connect(self.form.syncDeauth, SIGNAL("clicked()"),
self.onSyncDeauth) 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.proxyUser.setText(self.prof['proxyUser'])
self.form.proxyPass.setText(self.prof['proxyPass']) 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): def onSyncDeauth(self):
self.prof['syncKey'] = None self.prof['syncKey'] = None
self._hideAuth()
def updateNetwork(self): def updateNetwork(self):
self.prof['autoSync'] = self.form.syncOnProgramOpen.isChecked() self.prof['autoSync'] = self.form.syncOnProgramOpen.isChecked()

View file

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