mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -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.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()
|
||||||
|
|
|
@ -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>
|
||||||
|
|
Loading…
Reference in a new issue