fix deck conf bugs

This commit is contained in:
Damien Elmes 2011-12-11 00:24:08 +09:00
parent 569b903cdc
commit ed85bec6cc
2 changed files with 5 additions and 7 deletions

View file

@ -16,7 +16,9 @@ class DeckConf(QDialog):
self.form = aqt.forms.dconf.Ui_Dialog() self.form = aqt.forms.dconf.Ui_Dialog()
self.form.setupUi(self) self.form.setupUi(self)
self.mw.checkpoint(_("Options")) self.mw.checkpoint(_("Options"))
self.setupCombos()
self.setupConfs() self.setupConfs()
self.setWindowModality(Qt.WindowModal)
self.connect(self.form.buttonBox, self.connect(self.form.buttonBox,
SIGNAL("helpRequested()"), SIGNAL("helpRequested()"),
lambda: openHelp("StudyOptions")) lambda: openHelp("StudyOptions"))
@ -25,7 +27,6 @@ class DeckConf(QDialog):
self.connect(self.form.buttonBox.button(QDialogButtonBox.RestoreDefaults), self.connect(self.form.buttonBox.button(QDialogButtonBox.RestoreDefaults),
SIGNAL("clicked()"), SIGNAL("clicked()"),
self.onRestore) self.onRestore)
self.setupCombos()
self.setWindowTitle(_("Options for %s") % self.deck['name']) self.setWindowTitle(_("Options for %s") % self.deck['name'])
self.exec_() self.exec_()
@ -148,12 +149,10 @@ class DeckConf(QDialog):
f.autoplaySounds.setChecked(c['autoplay']) f.autoplaySounds.setChecked(c['autoplay'])
def onRestore(self): def onRestore(self):
self.mw.progress.start()
self.mw.col.decks.restoreToDefault(self.conf) self.mw.col.decks.restoreToDefault(self.conf)
self.mw.progress.finish()
self.loadConf() self.loadConf()
f = self.form
f.dayOffset.setValue(4)
f.lrnCutoff.setValue(20)
f.timeLimit.setValue(0)
# New order # New order
################################################## ##################################################

View file

@ -125,7 +125,7 @@ button { font-weight: bold; }
def _renderBottom(self): def _renderBottom(self):
links = [ links = [
["opts", _("Study Options")], ["opts", _("Options")],
["cram", _("Cram")], ["cram", _("Cram")],
] ]
buf = "" buf = ""
@ -134,4 +134,3 @@ button { font-weight: bold; }
self.bottom.draw(buf) self.bottom.draw(buf)
self.bottom.web.setFixedHeight(32) self.bottom.web.setFixedHeight(32)
self.bottom.web.setLinkHandler(self._linkHandler) self.bottom.web.setLinkHandler(self._linkHandler)