diff options
author | mkaay <mkaay@mkaay.de> | 2009-12-21 14:41:23 +0100 |
---|---|---|
committer | mkaay <mkaay@mkaay.de> | 2009-12-21 14:41:23 +0100 |
commit | 4c98db9a0eb0ca1ca70c4886b907e79682bfad82 (patch) | |
tree | f4c412ef5e5875b2cbffd1c79bb4a5b2ec4e0892 /module/gui/connector.py | |
parent | new update threads, link dock works now (diff) | |
download | pyload-4c98db9a0eb0ca1ca70c4886b907e79682bfad82.tar.xz |
pause/start button works
Diffstat (limited to 'module/gui/connector.py')
-rw-r--r-- | module/gui/connector.py | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/module/gui/connector.py b/module/gui/connector.py index 3627545ba..32da29bba 100644 --- a/module/gui/connector.py +++ b/module/gui/connector.py @@ -154,3 +154,26 @@ class connector(QThread): self.proxy.add_urls(links) finally: self.mutex.unlock() + + def togglePause(self): + """ + toogle pause + """ + self.mutex.lock() + try: + return self.proxy.toggle_pause() + finally: + self.mutex.unlock() + + def setPause(self, pause): + """ + set pause + """ + self.mutex.lock() + try: + if pause: + self.proxy.pause_server() + else: + self.proxy.unpause_server() + finally: + self.mutex.unlock() |