From 24b8ddce29a624cae0e63e6d05d5bffbfc62b87c Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Sat, 26 Sep 2009 23:23:41 +0900 Subject: [PATCH] display helpful dialog if cloze bad --- ankiqt/ui/facteditor.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/ankiqt/ui/facteditor.py b/ankiqt/ui/facteditor.py index 42ad13c67..20d0ccb42 100644 --- a/ankiqt/ui/facteditor.py +++ b/ankiqt/ui/facteditor.py @@ -804,13 +804,17 @@ class FactEditor(object): self.saveFields() return else: - ui.utils.showInfo(_("Next field must be blank."), - parent=self.parent) + ui.utils.showInfo( + _("Next field must be blank."), + help="ClozeDeletion", + parent=self.parent) return # check if there's anything to change if not re.search("\[.+?\]", unicode(src.toPlainText())): - QDesktopServices.openUrl(QUrl(ankiqt.appWiki + - "ClozeDeletion")) + ui.utils.showInfo( + _("You didn't specify anything to occlude."), + help="ClozeDeletion", + parent=self.parent) return # create s = unicode(src.toHtml())