add switch to disable groups without forgetting the selection

This commit is contained in:
Damien Elmes 2011-03-22 07:58:34 +09:00
parent 31a548ee42
commit 4e989d98a9

View file

@ -21,6 +21,7 @@ import anki.cards, anki.facts, anki.models, anki.template, anki.cram
defaultQconf = {
'revGroups': [],
'newGroups': [],
'groupsOn': True,
'newPerDay': 20,
'newToday': [0, 0], # currentDay, count
'newTodayOrder': NEW_TODAY_ORD,
@ -556,6 +557,8 @@ select conf from gconf where id = (select gcid from groups where id = ?)""",
gid))
def activeGroups(self, type):
if not self.qconf['groupsOn']:
return []
return self.qconf[type+"Groups"]
def setActiveGroups(self, type, list):