mirror of
https://github.com/ankitects/anki.git
synced 2025-11-11 07:07:13 -05:00
implement prefs window
This commit is contained in:
parent
4a84a304ae
commit
279c40b5f5
4 changed files with 141 additions and 204 deletions
19
aqt/main.py
19
aqt/main.py
|
|
@ -100,7 +100,7 @@ class AnkiQt(QMainWindow):
|
||||||
f = self.profileForm = aqt.forms.profiles.Ui_Dialog()
|
f = self.profileForm = aqt.forms.profiles.Ui_Dialog()
|
||||||
f.setupUi(d)
|
f.setupUi(d)
|
||||||
d.connect(f.login, SIGNAL("clicked()"), self.onOpenProfile)
|
d.connect(f.login, SIGNAL("clicked()"), self.onOpenProfile)
|
||||||
d.connect(f.quit, SIGNAL("clicked()"), self.app.closeAllWindows)
|
d.connect(f.quit, SIGNAL("clicked()"), lambda: sys.exit(0))
|
||||||
d.connect(f.add, SIGNAL("clicked()"), self.onAddProfile)
|
d.connect(f.add, SIGNAL("clicked()"), self.onAddProfile)
|
||||||
d.connect(f.delete_2, SIGNAL("clicked()"), self.onRemProfile)
|
d.connect(f.delete_2, SIGNAL("clicked()"), self.onRemProfile)
|
||||||
d.connect(d, SIGNAL("rejected()"), lambda: d.close())
|
d.connect(d, SIGNAL("rejected()"), lambda: d.close())
|
||||||
|
|
@ -125,26 +125,19 @@ class AnkiQt(QMainWindow):
|
||||||
return
|
return
|
||||||
name = self.pm.profiles()[n]
|
name = self.pm.profiles()[n]
|
||||||
f = self.profileForm
|
f = self.profileForm
|
||||||
passwd = False
|
passwd = not self.pm.load(name)
|
||||||
try:
|
|
||||||
self.pm.load(name)
|
|
||||||
except:
|
|
||||||
passwd = True
|
|
||||||
f.passEdit.setShown(passwd)
|
f.passEdit.setShown(passwd)
|
||||||
f.passLabel.setShown(passwd)
|
f.passLabel.setShown(passwd)
|
||||||
|
|
||||||
def openProfile(self):
|
def openProfile(self):
|
||||||
name = self.pm.profiles()[self.profileForm.profiles.currentRow()]
|
name = self.pm.profiles()[self.profileForm.profiles.currentRow()]
|
||||||
passwd = self.profileForm.passEdit.text()
|
passwd = self.profileForm.passEdit.text()
|
||||||
try:
|
return self.pm.load(name, passwd)
|
||||||
self.pm.load(name, passwd)
|
|
||||||
except:
|
|
||||||
showWarning(_("Invalid password."))
|
|
||||||
return
|
|
||||||
return True
|
|
||||||
|
|
||||||
def onOpenProfile(self):
|
def onOpenProfile(self):
|
||||||
self.openProfile()
|
if not self.openProfile():
|
||||||
|
showWarning(_("Invalid password."))
|
||||||
|
return
|
||||||
self.profileDiag.close()
|
self.profileDiag.close()
|
||||||
self.loadProfile()
|
self.loadProfile()
|
||||||
return True
|
return True
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
import os
|
import os
|
||||||
from aqt.qt import *
|
from aqt.qt import *
|
||||||
from anki.lang import langs
|
from anki.lang import langs
|
||||||
from aqt.utils import openFolder, showWarning
|
from aqt.utils import openFolder, showWarning, getText
|
||||||
import aqt
|
import aqt
|
||||||
|
|
||||||
class Preferences(QDialog):
|
class Preferences(QDialog):
|
||||||
|
|
@ -13,153 +13,41 @@ class Preferences(QDialog):
|
||||||
def __init__(self, mw):
|
def __init__(self, mw):
|
||||||
QDialog.__init__(self, mw, Qt.Window)
|
QDialog.__init__(self, mw, Qt.Window)
|
||||||
self.mw = mw
|
self.mw = mw
|
||||||
self.config = mw.pm.config
|
self.prof = self.mw.pm.profile
|
||||||
self.form = aqt.forms.preferences.Ui_Preferences()
|
self.form = aqt.forms.preferences.Ui_Preferences()
|
||||||
self.form.setupUi(self)
|
self.form.setupUi(self)
|
||||||
self.needDeckClose = False
|
|
||||||
self.connect(self.form.buttonBox, SIGNAL("helpRequested()"),
|
self.connect(self.form.buttonBox, SIGNAL("helpRequested()"),
|
||||||
lambda: openHelp("Preferences"))
|
lambda: openHelp("Preferences"))
|
||||||
self.setupLang()
|
self.setupLang()
|
||||||
self.setupNetwork()
|
self.setupNetwork()
|
||||||
self.setupBackup()
|
self.setupBackup()
|
||||||
self.setupOptions()
|
self.setupOptions()
|
||||||
self.setupMedia()
|
|
||||||
self.show()
|
self.show()
|
||||||
|
|
||||||
def accept(self):
|
def accept(self):
|
||||||
self.updateNetwork()
|
self.updateNetwork()
|
||||||
self.updateBackup()
|
self.updateBackup()
|
||||||
self.updateOptions()
|
self.updateOptions()
|
||||||
self.updateMedia()
|
self.mw.pm.save()
|
||||||
self.config.save()
|
self.mw.reset()
|
||||||
self.mw.setupLang()
|
|
||||||
if self.needDeckClose:
|
|
||||||
self.mw.close()
|
|
||||||
else:
|
|
||||||
self.mw.reset()
|
|
||||||
self.done(0)
|
self.done(0)
|
||||||
|
|
||||||
def reject(self):
|
def reject(self):
|
||||||
self.accept()
|
self.accept()
|
||||||
|
|
||||||
|
# Language handling
|
||||||
|
######################################################################
|
||||||
|
|
||||||
def setupLang(self):
|
def setupLang(self):
|
||||||
# interface lang
|
# interface lang
|
||||||
for (lang, code) in langs:
|
for (lang, code) in langs:
|
||||||
self.form.interfaceLang.addItem(lang)
|
self.form.interfaceLang.addItem(lang)
|
||||||
self.form.interfaceLang.setCurrentIndex(
|
self.form.interfaceLang.setCurrentIndex(
|
||||||
self.codeToIndex(self.config['interfaceLang']))
|
self.codeToIndex(self.prof['lang']))
|
||||||
self.connect(self.form.interfaceLang,
|
self.connect(self.form.interfaceLang,
|
||||||
SIGNAL("currentIndexChanged(QString)"),
|
SIGNAL("currentIndexChanged(QString)"),
|
||||||
self.interfaceLangChanged)
|
self.interfaceLangChanged)
|
||||||
|
|
||||||
def interfaceLangChanged(self):
|
|
||||||
self.config['interfaceLang'] = (
|
|
||||||
langs[self.form.interfaceLang.currentIndex()])[1]
|
|
||||||
self.mw.setupLang()
|
|
||||||
self.form.retranslateUi(self)
|
|
||||||
|
|
||||||
def setupMedia(self):
|
|
||||||
self.form.mediaChoice.addItems([
|
|
||||||
_("Keep media next to deck"),
|
|
||||||
_("Keep media in DropBox"),
|
|
||||||
_("Keep media in custom folder"),
|
|
||||||
])
|
|
||||||
if not self.config['mediaLocation']:
|
|
||||||
idx = 0
|
|
||||||
elif self.config['mediaLocation'] == "dropbox":
|
|
||||||
idx = 1
|
|
||||||
else:
|
|
||||||
idx = 2
|
|
||||||
self.form.mediaChoice.setCurrentIndex(idx)
|
|
||||||
self.mediaChoiceChanged(idx)
|
|
||||||
self.connect(self.form.mediaChoice,
|
|
||||||
SIGNAL("currentIndexChanged(int)"),
|
|
||||||
self.mediaChoiceChanged)
|
|
||||||
self.origMediaChoice = idx
|
|
||||||
|
|
||||||
def mediaChoiceChanged(self, idx):
|
|
||||||
mp = self.form.mediaPath
|
|
||||||
mpl = self.form.mediaPrefix
|
|
||||||
if idx == 2:
|
|
||||||
mp.setText(self.config['mediaLocation'])
|
|
||||||
mp.setShown(True)
|
|
||||||
mpl.setShown(True)
|
|
||||||
else:
|
|
||||||
mp.setShown(False)
|
|
||||||
mpl.setShown(False)
|
|
||||||
|
|
||||||
def setupNetwork(self):
|
|
||||||
self.form.syncOnProgramOpen.setChecked(self.config['syncOnProgramOpen'])
|
|
||||||
self.form.disableWhenMoved.setChecked(self.config['syncDisableWhenMoved'])
|
|
||||||
self.form.syncUser.setText(self.config['syncUsername'])
|
|
||||||
self.form.syncPass.setText(self.config['syncPassword'])
|
|
||||||
self.form.proxyHost.setText(self.config['proxyHost'])
|
|
||||||
self.form.proxyPort.setValue(self.config['proxyPort'])
|
|
||||||
self.form.proxyUser.setText(self.config['proxyUser'])
|
|
||||||
self.form.proxyPass.setText(self.config['proxyPass'])
|
|
||||||
|
|
||||||
def updateNetwork(self):
|
|
||||||
self.config['syncOnProgramOpen'] = self.form.syncOnProgramOpen.isChecked()
|
|
||||||
self.config['syncDisableWhenMoved'] = self.form.disableWhenMoved.isChecked()
|
|
||||||
self.config['syncUsername'] = unicode(self.form.syncUser.text())
|
|
||||||
self.config['syncPassword'] = unicode(self.form.syncPass.text())
|
|
||||||
self.config['proxyHost'] = unicode(self.form.proxyHost.text())
|
|
||||||
self.config['proxyPort'] = int(self.form.proxyPort.value())
|
|
||||||
self.config['proxyUser'] = unicode(self.form.proxyUser.text())
|
|
||||||
self.config['proxyPass'] = unicode(self.form.proxyPass.text())
|
|
||||||
|
|
||||||
def setupBackup(self):
|
|
||||||
self.form.numBackups.setValue(self.config['numBackups'])
|
|
||||||
self.connect(self.form.openBackupFolder,
|
|
||||||
SIGNAL("linkActivated(QString)"),
|
|
||||||
self.onOpenBackup)
|
|
||||||
|
|
||||||
def onOpenBackup(self):
|
|
||||||
path = os.path.join(self.config.confDir, "backups")
|
|
||||||
openFolder(path)
|
|
||||||
|
|
||||||
def updateMedia(self):
|
|
||||||
orig = self.origMediaChoice
|
|
||||||
new = self.form.mediaChoice.currentIndex()
|
|
||||||
if orig == new and orig != 2:
|
|
||||||
return
|
|
||||||
if new == 0:
|
|
||||||
p = ""
|
|
||||||
elif new == 1:
|
|
||||||
p = "dropbox"
|
|
||||||
# reset public folder location
|
|
||||||
self.config['dropboxPublicFolder'] = ""
|
|
||||||
else:
|
|
||||||
p = unicode(self.form.mediaPath.text())
|
|
||||||
self.config['mediaLocation'] = p
|
|
||||||
self.needDeckClose = True
|
|
||||||
|
|
||||||
def updateBackup(self):
|
|
||||||
self.config['numBackups'] = self.form.numBackups.value()
|
|
||||||
|
|
||||||
def setupOptions(self):
|
|
||||||
self.form.showEstimates.setChecked(not self.config['suppressEstimates'])
|
|
||||||
self.form.centerQA.setChecked(self.config['centerQA'])
|
|
||||||
self.form.showProgress.setChecked(self.config['showProgress'])
|
|
||||||
self.form.openLastDeck.setChecked(self.config['loadLastDeck'])
|
|
||||||
self.form.deleteMedia.setChecked(self.config['deleteMedia'])
|
|
||||||
self.form.stripHTML.setChecked(self.config['stripHTML'])
|
|
||||||
self.form.autoplaySounds.setChecked(self.config['autoplaySounds'])
|
|
||||||
self.form.showToolbar.setChecked(self.config['showToolbar'])
|
|
||||||
self.connect(self.form.documentFolder,
|
|
||||||
SIGNAL("clicked()"),
|
|
||||||
self.onChangeFolder)
|
|
||||||
|
|
||||||
def updateOptions(self):
|
|
||||||
self.config['suppressEstimates'] = not self.form.showEstimates.isChecked()
|
|
||||||
self.config['centerQA'] = self.form.centerQA.isChecked()
|
|
||||||
self.config['showProgress'] = self.form.showProgress.isChecked()
|
|
||||||
self.config['stripHTML'] = self.form.stripHTML.isChecked()
|
|
||||||
self.config['autoplaySounds'] = self.form.autoplaySounds.isChecked()
|
|
||||||
self.config['loadLastDeck'] = self.form.openLastDeck.isChecked()
|
|
||||||
self.config['deleteMedia'] = self.form.deleteMedia.isChecked()
|
|
||||||
self.config['showToolbar'] = self.form.showToolbar.isChecked()
|
|
||||||
|
|
||||||
def codeToIndex(self, code):
|
def codeToIndex(self, code):
|
||||||
n = 0
|
n = 0
|
||||||
for (lang, type) in langs:
|
for (lang, type) in langs:
|
||||||
|
|
@ -169,22 +57,89 @@ class Preferences(QDialog):
|
||||||
# default to english
|
# default to english
|
||||||
return self.codeToIndex("en")
|
return self.codeToIndex("en")
|
||||||
|
|
||||||
def onChangeFolder(self):
|
def interfaceLangChanged(self):
|
||||||
d = QFileDialog(self)
|
self.prof['lang'] = (
|
||||||
d.setWindowModality(Qt.WindowModal)
|
langs[self.form.interfaceLang.currentIndex()])[1]
|
||||||
d.setFileMode(QFileDialog.Directory)
|
self.mw.setupLang()
|
||||||
d.setOption(QFileDialog.ShowDirsOnly, True)
|
self.form.retranslateUi(self)
|
||||||
d.setDirectory(self.config['documentDir'])
|
|
||||||
d.show()
|
|
||||||
def accept():
|
# Network
|
||||||
dir = unicode(list(d.selectedFiles())[0])
|
######################################################################
|
||||||
# make sure we can write into it
|
|
||||||
try:
|
def setupNetwork(self):
|
||||||
f = os.path.join(dir, "test.txt")
|
self.form.syncOnProgramOpen.setChecked(
|
||||||
open(f, "w").write("test")
|
self.prof['autoSync'])
|
||||||
os.unlink(f)
|
self.form.syncMedia.setChecked(
|
||||||
except (OSError, IOError):
|
self.prof['syncMedia'])
|
||||||
showWarning(_("Can't write to folder."))
|
if not self.prof['syncKey']:
|
||||||
return
|
self.form.syncDeauth.setShown(False)
|
||||||
self.config['documentDir'] = dir
|
else:
|
||||||
d.connect(d, SIGNAL("accepted()"), accept)
|
self.connect(self.form.syncDeauth, SIGNAL("clicked()"),
|
||||||
|
self.onSyncDeauth)
|
||||||
|
self.form.proxyHost.setText(self.prof['proxyHost'])
|
||||||
|
self.form.proxyPort.setValue(self.prof['proxyPort'])
|
||||||
|
self.form.proxyUser.setText(self.prof['proxyUser'])
|
||||||
|
self.form.proxyPass.setText(self.prof['proxyPass'])
|
||||||
|
|
||||||
|
def onSyncDeauth(self):
|
||||||
|
self.prof['syncKey'] = None
|
||||||
|
|
||||||
|
def updateNetwork(self):
|
||||||
|
self.prof['autoSync'] = self.form.syncOnProgramOpen.isChecked()
|
||||||
|
self.prof['syncMedia'] = self.form.syncMedia.isChecked()
|
||||||
|
self.prof['proxyHost'] = unicode(self.form.proxyHost.text())
|
||||||
|
self.prof['proxyPort'] = int(self.form.proxyPort.value())
|
||||||
|
self.prof['proxyUser'] = unicode(self.form.proxyUser.text())
|
||||||
|
self.prof['proxyPass'] = unicode(self.form.proxyPass.text())
|
||||||
|
|
||||||
|
# Backup
|
||||||
|
######################################################################
|
||||||
|
|
||||||
|
def setupBackup(self):
|
||||||
|
self.form.numBackups.setValue(self.prof['numBackups'])
|
||||||
|
self.connect(self.form.openBackupFolder,
|
||||||
|
SIGNAL("linkActivated(QString)"),
|
||||||
|
self.onOpenBackup)
|
||||||
|
|
||||||
|
def onOpenBackup(self):
|
||||||
|
openFolder(self.mw.pm.backupFolder())
|
||||||
|
|
||||||
|
def updateBackup(self):
|
||||||
|
self.prof['numBackups'] = self.form.numBackups.value()
|
||||||
|
|
||||||
|
# Basic & Advanced Options
|
||||||
|
######################################################################
|
||||||
|
|
||||||
|
def setupOptions(self):
|
||||||
|
self.form.showEstimates.setChecked(self.prof['showDueTimes'])
|
||||||
|
self.form.showProgress.setChecked(self.prof['showProgress'])
|
||||||
|
self.form.deleteMedia.setChecked(self.prof['deleteMedia'])
|
||||||
|
self.form.stripHTML.setChecked(self.prof['stripHTML'])
|
||||||
|
self.form.autoplaySounds.setChecked(self.prof['autoplay'])
|
||||||
|
self.connect(
|
||||||
|
self.form.profilePass, SIGNAL("clicked()"),
|
||||||
|
self.onProfilePass)
|
||||||
|
|
||||||
|
def updateOptions(self):
|
||||||
|
self.prof['showDueTimes'] = self.form.showEstimates.isChecked()
|
||||||
|
self.prof['showProgress'] = self.form.showProgress.isChecked()
|
||||||
|
self.prof['stripHTML'] = self.form.stripHTML.isChecked()
|
||||||
|
self.prof['autoplay'] = self.form.autoplaySounds.isChecked()
|
||||||
|
self.prof['deleteMedia'] = self.form.deleteMedia.isChecked()
|
||||||
|
self.prof['deleteMedia'] = self.form.deleteMedia.isChecked()
|
||||||
|
|
||||||
|
def onProfilePass(self):
|
||||||
|
pw, ret = getText(_("""\
|
||||||
|
Lock account with password, or leave blank:"""))
|
||||||
|
if not ret:
|
||||||
|
return
|
||||||
|
if not pw:
|
||||||
|
self.prof['key'] = None
|
||||||
|
return
|
||||||
|
pw2, ret = getText(_("Confirm password:"))
|
||||||
|
if not ret:
|
||||||
|
return
|
||||||
|
if pw != pw2:
|
||||||
|
showWarning(_("Passwords didn't match"))
|
||||||
|
self.prof['key'] = self.mw.pm._pwhash(pw)
|
||||||
|
|
|
||||||
|
|
@ -133,10 +133,11 @@ computer.""")
|
||||||
self.db.scalar("select data from profiles where name = ?", name))
|
self.db.scalar("select data from profiles where name = ?", name))
|
||||||
if prof['key'] and prof['key'] != self._pwhash(passwd):
|
if prof['key'] and prof['key'] != self._pwhash(passwd):
|
||||||
self.name = None
|
self.name = None
|
||||||
raise Exception("Invalid password")
|
return False
|
||||||
if name != "_global":
|
if name != "_global":
|
||||||
self.name = name
|
self.name = name
|
||||||
self.profile = prof
|
self.profile = prof
|
||||||
|
return True
|
||||||
|
|
||||||
def save(self):
|
def save(self):
|
||||||
sql = "update profiles set data = ? where name = ?"
|
sql = "update profiles set data = ? where name = ?"
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>395</width>
|
<width>461</width>
|
||||||
<height>442</height>
|
<height>442</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
|
|
@ -73,14 +73,14 @@
|
||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="showEstimates">
|
<widget class="QCheckBox" name="showEstimates">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Show next times</string>
|
<string>Show next review time above answer buttons</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="showProgress">
|
<widget class="QCheckBox" name="showProgress">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Show due counts while reviewing</string>
|
<string>Show remaining card count during review</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
|
@ -124,9 +124,6 @@
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QVBoxLayout">
|
<layout class="QVBoxLayout">
|
||||||
<item>
|
|
||||||
<layout class="QGridLayout"/>
|
|
||||||
</item>
|
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_16">
|
<widget class="QLabel" name="label_16">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
|
|
@ -141,28 +138,41 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QRadioButton" name="radioButton">
|
<widget class="QCheckBox" name="syncMedia">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Synchronize collection across devices</string>
|
<string>Synchronize audio and images too</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QRadioButton" name="radioButton_2">
|
<widget class="QCheckBox" name="syncOnProgramOpen">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Don't synchronize</string>
|
<string>Automatically sync on profile open/close</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QGridLayout">
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
<item row="0" column="0" colspan="2">
|
<item>
|
||||||
<widget class="QCheckBox" name="syncOnProgramOpen">
|
<widget class="QPushButton" name="syncDeauth">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Automatically sync on profile open/close</string>
|
<string>Deauthorize</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer_2">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>1</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
|
|
@ -172,7 +182,7 @@
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_13">
|
<widget class="QLabel" name="label_13">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string><b>Proxy</b><br>If your system needs a proxy to access the internet, enter your details below.</string>
|
<string><b>Proxy</b><br>If your system needs a proxy to access the internet, enter your details below. Leave "Host" blank to disable proxy support.</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="wordWrap">
|
<property name="wordWrap">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
|
|
@ -282,7 +292,7 @@
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_9">
|
<widget class="QLabel" name="label_9">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string><b>Backups</b><br>Anki will create a backup of your collection each time it is closed or synchronized</string>
|
<string><b>Backups</b><br>Anki will create a backup of your collection each time it is closed or synchronized.</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="wordWrap">
|
<property name="wordWrap">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
|
|
@ -395,12 +405,19 @@
|
||||||
<item row="1" column="0">
|
<item row="1" column="0">
|
||||||
<widget class="QCheckBox" name="deleteMedia">
|
<widget class="QCheckBox" name="deleteMedia">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Delete original media on add</string>
|
<string>Move instead of copying media when adding</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="profilePass">
|
||||||
|
<property name="text">
|
||||||
|
<string>Profile Password...</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<spacer>
|
<spacer>
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
|
|
@ -441,12 +458,15 @@
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<tabstops>
|
<tabstops>
|
||||||
<tabstop>tabWidget</tabstop>
|
<tabstop>buttonBox</tabstop>
|
||||||
<tabstop>interfaceLang</tabstop>
|
<tabstop>interfaceLang</tabstop>
|
||||||
<tabstop>autoplaySounds</tabstop>
|
<tabstop>autoplaySounds</tabstop>
|
||||||
<tabstop>showEstimates</tabstop>
|
<tabstop>showEstimates</tabstop>
|
||||||
<tabstop>showProgress</tabstop>
|
<tabstop>showProgress</tabstop>
|
||||||
|
<tabstop>tabWidget</tabstop>
|
||||||
|
<tabstop>syncMedia</tabstop>
|
||||||
<tabstop>syncOnProgramOpen</tabstop>
|
<tabstop>syncOnProgramOpen</tabstop>
|
||||||
|
<tabstop>syncDeauth</tabstop>
|
||||||
<tabstop>proxyHost</tabstop>
|
<tabstop>proxyHost</tabstop>
|
||||||
<tabstop>proxyPort</tabstop>
|
<tabstop>proxyPort</tabstop>
|
||||||
<tabstop>proxyUser</tabstop>
|
<tabstop>proxyUser</tabstop>
|
||||||
|
|
@ -454,7 +474,7 @@
|
||||||
<tabstop>numBackups</tabstop>
|
<tabstop>numBackups</tabstop>
|
||||||
<tabstop>stripHTML</tabstop>
|
<tabstop>stripHTML</tabstop>
|
||||||
<tabstop>deleteMedia</tabstop>
|
<tabstop>deleteMedia</tabstop>
|
||||||
<tabstop>buttonBox</tabstop>
|
<tabstop>profilePass</tabstop>
|
||||||
</tabstops>
|
</tabstops>
|
||||||
<resources/>
|
<resources/>
|
||||||
<connections>
|
<connections>
|
||||||
|
|
@ -490,37 +510,5 @@
|
||||||
</hint>
|
</hint>
|
||||||
</hints>
|
</hints>
|
||||||
</connection>
|
</connection>
|
||||||
<connection>
|
|
||||||
<sender>radioButton</sender>
|
|
||||||
<signal>toggled(bool)</signal>
|
|
||||||
<receiver>syncOnProgramOpen</receiver>
|
|
||||||
<slot>setEnabled(bool)</slot>
|
|
||||||
<hints>
|
|
||||||
<hint type="sourcelabel">
|
|
||||||
<x>81</x>
|
|
||||||
<y>92</y>
|
|
||||||
</hint>
|
|
||||||
<hint type="destinationlabel">
|
|
||||||
<x>83</x>
|
|
||||||
<y>136</y>
|
|
||||||
</hint>
|
|
||||||
</hints>
|
|
||||||
</connection>
|
|
||||||
<connection>
|
|
||||||
<sender>radioButton_2</sender>
|
|
||||||
<signal>toggled(bool)</signal>
|
|
||||||
<receiver>syncOnProgramOpen</receiver>
|
|
||||||
<slot>setDisabled(bool)</slot>
|
|
||||||
<hints>
|
|
||||||
<hint type="sourcelabel">
|
|
||||||
<x>146</x>
|
|
||||||
<y>110</y>
|
|
||||||
</hint>
|
|
||||||
<hint type="destinationlabel">
|
|
||||||
<x>146</x>
|
|
||||||
<y>134</y>
|
|
||||||
</hint>
|
|
||||||
</hints>
|
|
||||||
</connection>
|
|
||||||
</connections>
|
</connections>
|
||||||
</ui>
|
</ui>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue