summaryrefslogtreecommitdiffstats
path: root/module/gui/MainWindow.py
diff options
context:
space:
mode:
authorGravatar mkaay <mkaay@mkaay.de> 2009-12-29 16:50:13 +0100
committerGravatar mkaay <mkaay@mkaay.de> 2009-12-29 16:50:13 +0100
commitfa9cce4987da585f5bf21274cfbe5f046f46f703 (patch)
tree94fa0f16d8b72b09c1e59d27d2bb70aeed3c09ff /module/gui/MainWindow.py
parentUploadedTo indirect download fix (diff)
downloadpyload-fa9cce4987da585f5bf21274cfbe5f046f46f703.tar.xz
: Bitte gib eine Versions-Meldung ein. Zeilen beginnend mit 'HG:' werden entfernt.
Diffstat (limited to 'module/gui/MainWindow.py')
-rw-r--r--module/gui/MainWindow.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/module/gui/MainWindow.py b/module/gui/MainWindow.py
index 5237436f0..6daa0aa55 100644
--- a/module/gui/MainWindow.py
+++ b/module/gui/MainWindow.py
@@ -187,10 +187,13 @@ class MainWindow(QMainWindow):
self.queueContext.item = (None, None)
self.queueContext.buttons["remove"] = QAction(QIcon("icons/gui/remove_small.png"), "Remove", self.queueContext)
self.queueContext.buttons["restart"] = QAction(QIcon("icons/gui/refresh_small.png"), "Restart", self.queueContext)
+ self.queueContext.buttons["pull"] = QAction(QIcon("icons/gui/pull_small.png"), "Pull out", self.queueContext)
+ self.queueContext.addAction(self.queueContext.buttons["pull"])
self.queueContext.addAction(self.queueContext.buttons["remove"])
self.queueContext.addAction(self.queueContext.buttons["restart"])
self.connect(self.queueContext.buttons["remove"], SIGNAL("triggered()"), self.slotRemoveDownload)
self.connect(self.queueContext.buttons["restart"], SIGNAL("triggered()"), self.slotRestartDownload)
+ self.connect(self.queueContext.buttons["pull"], SIGNAL("triggered()"), self.slotPullOutPackage)
#collector
self.collectorContext = QMenu()
@@ -341,6 +344,10 @@ class MainWindow(QMainWindow):
menuPos = QCursor.pos()
menuPos.setX(menuPos.x()+2)
self.activeMenu = self.queueContext
+ if hasattr(i, "getPackData"):
+ self.queueContext.buttons["pull"].setVisible(True)
+ else:
+ self.queueContext.buttons["pull"].setVisible(False)
self.queueContext.exec_(menuPos)
def slotCollectorContextMenu(self, pos):
@@ -402,4 +409,12 @@ class MainWindow(QMainWindow):
print type(pid)
self.emit(SIGNAL("changePackageName"), pid, editor.text())
self.emit(SIGNAL("pauseItemUpdate"), pid, False)
+
+ def slotPullOutPackage(self):
+ """
+ pull package out of the queue
+ """
+ id, isTopLevel = self.activeMenu.item
+ if not id == None:
+ self.emit(SIGNAL("pullOutPackage"), id, isTopLevel)