|
Lines 7-13
Link Here
|
| 7 |
import aqt.clayout |
7 |
import aqt.clayout |
| 8 |
from anki import stdmodels |
8 |
from anki import stdmodels |
| 9 |
from aqt.utils import saveGeom, restoreGeom |
9 |
from aqt.utils import saveGeom, restoreGeom |
| 10 |
import collections.abc |
10 |
import collections |
| 11 |
from anki.lang import _, ngettext |
11 |
from anki.lang import _, ngettext |
| 12 |
|
12 |
|
| 13 |
class Models(QDialog): |
13 |
class Models(QDialog): |
|
Lines 170-176
Link Here
|
| 170 |
# standard models |
170 |
# standard models |
| 171 |
self.models = [] |
171 |
self.models = [] |
| 172 |
for (name, func) in stdmodels.models: |
172 |
for (name, func) in stdmodels.models: |
| 173 |
if isinstance(name, collections.abc.Callable): |
173 |
if isinstance(name, collections.Callable): |
| 174 |
name = name() |
174 |
name = name() |
| 175 |
item = QListWidgetItem(_("Add: %s") % name) |
175 |
item = QListWidgetItem(_("Add: %s") % name) |
| 176 |
self.dialog.models.addItem(item) |
176 |
self.dialog.models.addItem(item) |