From 7a5ed7d804efe39b43dc2f2c79e87bc627617e8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Gl=C3=BCpker?= Date: Wed, 6 Apr 2016 17:16:43 +0200 Subject: More status text --- 9kwpyqt.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/9kwpyqt.py b/9kwpyqt.py index a0d2534..b3b7359 100755 --- a/9kwpyqt.py +++ b/9kwpyqt.py @@ -240,6 +240,8 @@ class CaptchaGUI(QWidget): QTimer.singleShot(500, self.getCaptchaID) self.startstopButton.setStyleSheet("QPushButton { background-color: green; }") return + if self.waitingoncaptcha == 0: + self.captchaImage.setText("Asking server for new captcha...") self.startstopButton.setStyleSheet("QPushButton { background-color: red; }") url = QUrl(self.apiurl+"action=usercaptchanew&text=yes&mouse=0&confirm=0") self.networkCaptchaID = QNetworkRequest(url) @@ -256,13 +258,13 @@ class CaptchaGUI(QWidget): QTimer.singleShot(1000, self.getCaptchaID) elif content.isnumeric(): self.waitingoncaptcha = 0 - print("New Captcha:", int(content)) + self.captchaImage.setText("Downloading new captcha.") self.currentCaptchaID = int(content) self.getCaptchaIMG() else: self.waitingoncaptcha += 1 - print("Unknown error? ID not 'NO CAPTCHA' nor number") - print(content) + status = "Unknown Server response (getCaptchaID).\n"+str(content) + self.captchaImage.setText(status) def getCaptchaIMG(self): url = QUrl(self.apiurl+"action=usercaptchashow&id="+str(self.currentCaptchaID)) -- cgit v1.2.3