From a9a0b1752dced2a83df8d626f6b5acd9713d55e1 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Fri, 6 Apr 2012 16:36:47 +0900 Subject: [PATCH] consistent nomenclature --- aqt/browser.py | 19 ------------------- aqt/clayout.py | 10 +++++----- aqt/editor.py | 2 +- aqt/fields.py | 1 + 4 files changed, 7 insertions(+), 25 deletions(-) diff --git a/aqt/browser.py b/aqt/browser.py index 76c91d9f6..8372ec2d6 100644 --- a/aqt/browser.py +++ b/aqt/browser.py @@ -738,25 +738,6 @@ class Browser(QMainWindow): border: 1px solid #000; padding: 3px; '>%s""" % rep return rep, cs - def onCardLink(self, url): - if url == "sort": - self.onChangeSortField() - else: - self.onRevlog() - - def onChangeSortField(self): - from aqt.utils import chooseList - m = self.card.model() - fields = [f['name'] for f in m['flds']] - mm = self.col.models - idx = chooseList(_("Choose field to sort this model by:"), - fields, mm.sortIdx(m)) - if idx != mm.sortIdx(m): - self.mw.progress.start() - mm.setSortIdx(m, idx) - self.mw.progress.finish() - self.onSearch() - def onRevlog(self): data = self._revlogData() d = QDialog(self) diff --git a/aqt/clayout.py b/aqt/clayout.py index 22f859245..97b029b55 100644 --- a/aqt/clayout.py +++ b/aqt/clayout.py @@ -23,14 +23,14 @@ class CardLayout(QDialog): self.col = self.mw.col self.mm = self.mw.col.models self.model = note.model() - self.mw.checkpoint(_("Card Layout")) + self.mw.checkpoint(_("Card Types")) self.addMode = addMode if addMode: # save it to DB temporarily note.flush() self.setupTabs() self.setupButtons() - self.setWindowTitle(_("%s Layout") % self.model['name']) + self.setWindowTitle(_("Card Types for %s") % self.model['name']) v1 = QVBoxLayout() v1.addWidget(self.tabs) v1.addLayout(self.buttons) @@ -98,12 +98,12 @@ class CardLayout(QDialog): self.tabs.addTab(w, t['name']) def onRemoveTab(self, idx): - if not askUser(_("Remove template and all its cards?")): + if not askUser(_("Remove all cards of this type?")): return if not self.mm.remTemplate(self.model, self.cards[idx].template()): return showWarning(_("""\ -Removing this card would cause one or more notes to be deleted. \ -Please create a new card first.""")) +Removing this card type would cause one or more notes to be deleted. \ +Please create a new card type first.""")) self.redraw() # Buttons diff --git a/aqt/editor.py b/aqt/editor.py index 28d9230d3..300a73832 100644 --- a/aqt/editor.py +++ b/aqt/editor.py @@ -488,7 +488,7 @@ class Editor(object): contents = self.note.fields[0] browser = aqt.dialogs.open("Browser", self.mw) browser.form.searchEdit.setText( - "'model:%s' '%s:%s'" % ( + "'ntype:%s' '%s:%s'" % ( self.note.model()['name'], self.note.model()['flds'][0]['name'], contents)) diff --git a/aqt/fields.py b/aqt/fields.py index a80835c66..62ea0ff97 100644 --- a/aqt/fields.py +++ b/aqt/fields.py @@ -20,6 +20,7 @@ class FieldDialog(QDialog): self.mw.checkpoint(_("Fields")) self.form = aqt.forms.fields.Ui_Dialog() self.form.setupUi(self) + self.setWindowTitle(_("Fields for %s") % self.model['name']) self.form.buttonBox.button(QDialogButtonBox.Help).setAutoDefault(False) self.form.buttonBox.button(QDialogButtonBox.Close).setAutoDefault(False) self.currentIdx = None