mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 06:22:22 -04:00
sync pref tweaks
This commit is contained in:
parent
07ce5983f9
commit
63e1132b5b
2 changed files with 11 additions and 4 deletions
|
@ -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()
|
||||
|
|
|
@ -235,6 +235,9 @@
|
|||
<property name="text">
|
||||
<string>Deauthorize</string>
|
||||
</property>
|
||||
<property name="autoDefault">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
|
|
Loading…
Reference in a new issue