summaryrefslogtreecommitdiff
path: root/9kwpyqt.py
diff options
context:
space:
mode:
authorAndré Glüpker <git@wgmd.de>2016-03-19 13:24:35 +0100
committerAndré Glüpker <git@wgmd.de>2016-03-19 13:24:35 +0100
commit2e51508ac4ae567438c42f2e73dc33f4a0323f11 (patch)
tree2acd11f510bab1da45d4b714315d2e519037f516 /9kwpyqt.py
parentf17bb3bddb0e5774e78bb4b30a2f136e31f29a20 (diff)
download9kwpyqt-2e51508ac4ae567438c42f2e73dc33f4a0323f11.tar.gz
9kwpyqt-2e51508ac4ae567438c42f2e73dc33f4a0323f11.tar.bz2
9kwpyqt-2e51508ac4ae567438c42f2e73dc33f4a0323f11.zip
little bugfixes
- startstopButton Focus - Committing/Skipping while paused
Diffstat (limited to '9kwpyqt.py')
-rwxr-xr-x9kwpyqt.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/9kwpyqt.py b/9kwpyqt.py
index 039ca1c..3529077 100755
--- a/9kwpyqt.py
+++ b/9kwpyqt.py
@@ -115,6 +115,8 @@ class CaptchaGUI(QWidget):
self.timer.timeout.connect(self.onTimeout)
self.timer.setSingleShot(True)
+ self.startstopButton.setFocus()
+
##################################################
# Handle gui
##################################################
@@ -140,6 +142,8 @@ class CaptchaGUI(QWidget):
elif key == Qt.Key_Enter or key == Qt.Key_Return:
if self.skipButton.hasFocus():
self.skipCaptcha()
+ elif self.startstopButton.hasFocus():
+ self.toggleRunning()
else:
self.submitCaptcha()
@@ -302,9 +306,10 @@ class CaptchaGUI(QWidget):
if not answer:
skip = True
self.timer.stop()
- self.setCaptchaAnswer(answer, skip)
self.captchaInputLine.setText("")
self.removeCaptchaImage()
+ if self.currentCaptchaID:
+ self.setCaptchaAnswer(answer, skip)
def onTimeout(self):
self.running = False