From 30ef6ac4501e6aec2ee944ca576cf2e231d06b61 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Thu, 4 Dec 2008 04:11:00 +0900 Subject: [PATCH] tweaks to lookup --- ankiqt/ui/lookup.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/ankiqt/ui/lookup.py b/ankiqt/ui/lookup.py index dcca74913..38deb9364 100644 --- a/ankiqt/ui/lookup.py +++ b/ankiqt/ui/lookup.py @@ -5,6 +5,7 @@ from PyQt4.QtGui import * from PyQt4.QtCore import * import urllib, re import anki +from ankiqt import ui # Tools - looking up words in the dictionary ########################################################################## @@ -19,11 +20,12 @@ class Lookup(object): text = unicode(self.main.mainWin.mainText.selectedText()) text = text.strip() if "\n" in text: - self.main.setStatus(_("Can't look up a selection with a newline.")) + ui.utils.showInfo(_("Can't look up a selection with a newline.")) return text = text.strip() if not text: - self.main.setStatus(_("Empty selection.")) + u + ui.utils.showInfo(_("Empty selection.")) return function(text) @@ -42,7 +44,7 @@ class Lookup(object): else: baseUrl += "E" url = baseUrl + urllib.quote(text.encode("utf-8")) - self.main.setStatus(_("Looking %s up on edict...") % text) + ui.utils.showInfo(_("Looking %s up on edict...") % text) qurl = QUrl() qurl.setEncodedUrl(url) QDesktopServices.openUrl(qurl) @@ -54,7 +56,7 @@ class Lookup(object): "http://eow.alc.co.jp/" + newText + "/UTF-8/?ref=sa") - self.main.setStatus(_("Looking %s up on ALC...") % text) + ui.utils.showInfo(_("Looking %s up on ALC...") % text) qurl = QUrl() qurl.setEncodedUrl(url) QDesktopServices.openUrl(qurl)