summaryrefslogtreecommitdiffstats
path: root/module/gui
diff options
context:
space:
mode:
Diffstat (limited to 'module/gui')
-rw-r--r--module/gui/MainWindow.py3
-rw-r--r--module/gui/connector.py23
2 files changed, 25 insertions, 1 deletions
diff --git a/module/gui/MainWindow.py b/module/gui/MainWindow.py
index ccca6b697..6d68f4d7a 100644
--- a/module/gui/MainWindow.py
+++ b/module/gui/MainWindow.py
@@ -85,6 +85,7 @@ class MainWindow(QMainWindow):
self.masterlayout.addWidget(self.tabw)
self.connect(self.mactions["manager"], SIGNAL("triggered()"), self.slotShowConnector)
+ self.connect(self.mactions["exit"], SIGNAL("triggered()"), self.close)
def init_toolbar(self):
self.toolbar = self.addToolBar("main")
@@ -134,7 +135,7 @@ class MainWindow(QMainWindow):
self.tabs["collector"]["l"].addWidget(groupLinks, 0, 1)
def slotToggleStatus(self, status):
- print "toggle status", status
+ self.emit(SIGNAL("setDownloadStatus"), status)
def slotStatusStop(self):
print "stop!"
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()