hide missing decks when drawing recent decks list

This commit is contained in:
Damien Elmes 2010-02-02 00:33:07 +09:00
parent 38b1d3b48a
commit 1621092741

View file

@ -767,7 +767,8 @@ Debug info:\n%s""") % traceback.format_exc(), help="DeckErrors")
self.switchDecks = (
[(os.path.basename(x).replace(".anki", ""), x)
for x in self.config['recentDeckPaths']
if not self.deck or self.deck.path != x])
if not self.deck or self.deck.path != x and
os.path.exists(x)])
self.switchDecks.sort()
combo.addItems(QStringList([x[0] for x in self.switchDecks]))
self.connect(combo, SIGNAL("activated(int)"),