From ad1e2a029115bb8fe16d9656d9c5b8e511fd4cdd Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Wed, 22 May 2013 11:44:18 +0900 Subject: [PATCH] add warning when over 25 decks --- aqt/deckbrowser.py | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/aqt/deckbrowser.py b/aqt/deckbrowser.py index b94381124..fef8d2cb6 100644 --- a/aqt/deckbrowser.py +++ b/aqt/deckbrowser.py @@ -3,7 +3,8 @@ # License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html from aqt.qt import * -from aqt.utils import askUser, getOnlyText, openLink, showWarning, shortcut +from aqt.utils import askUser, getOnlyText, openLink, showWarning, shortcut, \ + openHelp from anki.utils import isMac, ids2str, fmtTimeSpan import anki.js from anki.errors import DeckRenameError @@ -43,6 +44,11 @@ class DeckBrowser(object): self._onShared() elif cmd == "import": self.mw.onImport() + elif cmd == "lots": + openHelp("using-decks-appropriately") + elif cmd == "hidelots": + self.mw.pm.profile['hideDeckLotsMsg'] = True + self.refresh() elif cmd == "create": deck = getOnlyText(_("Name for deck:")) if deck: @@ -92,6 +98,7 @@ body { margin: 1em; -webkit-user-select: none; }
%(stats)s +%(countwarn)s