From b9db940ae30fc7f1624e7843905daf0fcda4ce18 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Thu, 25 Oct 2012 18:18:16 +0900 Subject: [PATCH] pass unicode to onAppMsg; don't ask for filtered deck name --- aqt/main.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/aqt/main.py b/aqt/main.py index fa74b8370..e40777cd2 100644 --- a/aqt/main.py +++ b/aqt/main.py @@ -46,7 +46,7 @@ class AnkiQt(QMainWindow): sys.exit(1) # were we given a file to import? if args and args[0]: - self.onAppMsg(args[0]) + self.onAppMsg(unicode(args[0], "utf8", "ignore")) # Load profile in a timer so we can let the window finish init and not # close on profile load error. self.progress.timer(10, self.setupProfile, False) @@ -717,12 +717,6 @@ and check the statistics for a home deck instead.""")) while _("Filtered Deck %d") % n in decks: n += 1 name = _("Filtered Deck %d") % n - name = getOnlyText(_("New deck name:"), default=name) - if not name: - return - if name in decks: - showWarning(_("The provided name was already in use.")) - return did = self.col.decks.newDyn(name) diag = aqt.dyndeckconf.DeckConf(self, first=True, search=search) if not diag.ok: @@ -1036,7 +1030,7 @@ will be lost. Continue?""")) if buf == "raise": return self.pendingImport = buf - return showInfo(_("Deck will be imported when a profile is opened.")) + return tooltip(_("Deck will be imported when a profile is opened.")) if not self.interactiveState() or self.progress.busy(): # we can't raise the main window while in profile dialog, syncing, etc if buf != "raise":