diff options
author | mkaay <mkaay@mkaay.de> | 2009-12-30 12:35:03 +0100 |
---|---|---|
committer | mkaay <mkaay@mkaay.de> | 2009-12-30 12:35:03 +0100 |
commit | c1516088e4e7f76dddd68ef71f58c6413862e31c (patch) | |
tree | 9e392f79fc225934b8a0a99cc4a119332b6685e0 /pyLoadGui.py | |
parent | messed up last commit message; added new icons, default connection in gui, pu... (diff) | |
download | pyload-c1516088e4e7f76dddd68ef71f58c6413862e31c.tar.xz |
show captchas in gui, SerienjunkiesOrg plugin
Diffstat (limited to 'pyLoadGui.py')
-rwxr-xr-x | pyLoadGui.py | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/pyLoadGui.py b/pyLoadGui.py index dab3ef18b..8fff8e8c9 100755 --- a/pyLoadGui.py +++ b/pyLoadGui.py @@ -62,6 +62,7 @@ class main(QObject): self.checkClipboard = False default = self.refreshConnections() self.connData = None + self.captchaProcessing = False if not first: self.connWindow.show() else: @@ -131,6 +132,7 @@ class main(QObject): self.connect(self.mainWindow, SIGNAL("setClipboardStatus"), self.slotSetClipboardStatus) self.connect(self.mainWindow, SIGNAL("changePackageName"), self.slotChangePackageName) self.connect(self.mainWindow, SIGNAL("pullOutPackage"), self.slotPullOutPackage) + self.connect(self.mainWindow.captchaDock, SIGNAL("done"), self.slotCaptchaDone) def slotShowConnector(self): """ @@ -503,6 +505,7 @@ class main(QObject): geo = str(nodes["geometry"].text()) self.mainWindow.restoreWindow(state, geo) + self.mainWindow.captchaDock.hide() def slotPushPackageToQueue(self, id): """ @@ -566,7 +569,15 @@ class main(QObject): pull package out of the queue """ if isPack: - self.connector.slotPullOutPackage(pid) + self.connector.pullOutPackage(pid) + + def checkCaptcha(self): + if self.connector.captchaWaiting() and self.mainWindow.captchaDock.isFree(): + cid, img, imgType = self.connector.getCaptcha() + self.mainWindow.captchaDock.setTask(cid, str(img), imgType) + + def slotCaptchaDone(self, cid, result): + print self.connector.setCaptchaResult(str(cid), str(result)) class Loop(QThread): """ @@ -590,6 +601,7 @@ class main(QObject): self.parent.refreshServerStatus() self.parent.refreshLog() self.parent.updateAvailable() + self.parent.checkCaptcha() def stop(self): self.running = False |