From 9fd4000c0b43fb334b5a90b4873027fc68fe69d4 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Tue, 14 Oct 2008 13:13:50 +0900 Subject: [PATCH] don't hard code models --- ankiqt/ui/modelchooser.py | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/ankiqt/ui/modelchooser.py b/ankiqt/ui/modelchooser.py index 7c7950ac2..757e3ead3 100644 --- a/ankiqt/ui/modelchooser.py +++ b/ankiqt/ui/modelchooser.py @@ -176,14 +176,9 @@ class AddModel(QDialog): self.dialog = ankiqt.forms.addmodel.Ui_AddModel() self.dialog.setupUi(self) self.models = {} - for name in ( - "Basic", - "Japanese", - "English", - "Cantonese", - "Mandarin", - "Heisig"): - # hard code the order so that most common come first + names = stdmodels.models.keys() + names.sort() + for name in names: m = stdmodels.byName(name) item = QListWidgetItem(m.name) self.dialog.models.addItem(item)