open libanki with progress handler

This commit is contained in:
Damien Elmes 2009-09-22 18:32:26 +09:00
parent ac5839b3e8
commit ecd9ffe2b9

View file

@ -671,7 +671,7 @@ new:
self.moveToState("noDeck") self.moveToState("noDeck")
return return
try: try:
self.deck = DeckStorage.Deck(deckPath) self.deck = DeckStorage.Deck(deckPath, progress=True)
except Exception, e: except Exception, e:
if hasattr(e, 'data') and e.data.get('type') == 'inuse': if hasattr(e, 'data') and e.data.get('type') == 'inuse':
if interactive: if interactive:
@ -1066,7 +1066,7 @@ your deck."""))
toRemove.append(d) toRemove.append(d)
continue continue
try: try:
deck = DeckStorage.Deck(d, backup=False) deck = DeckStorage.Deck(d, backup=False, progress=True)
self.browserDecks.append({ self.browserDecks.append({
'path': d, 'path': d,
'name': deck.name(), 'name': deck.name(),