summaryrefslogtreecommitdiffstats
path: root/pyLoadGui.py
diff options
context:
space:
mode:
authorGravatar mkaay <mkaay@mkaay.de> 2009-12-26 22:35:20 +0100
committerGravatar mkaay <mkaay@mkaay.de> 2009-12-26 22:35:20 +0100
commitb5d1c47ac2590fe4314d7e96d58443c30463746c (patch)
treebf35105179c5fc841edc26b86b8ed96f148f2b35 /pyLoadGui.py
parentpluginconfig now in xml (diff)
downloadpyload-b5d1c47ac2590fe4314d7e96d58443c30463746c.tar.xz
gui contaoner upload, closes #39
Diffstat (limited to 'pyLoadGui.py')
-rwxr-xr-xpyLoadGui.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/pyLoadGui.py b/pyLoadGui.py
index 5e13dd080..f075db710 100755
--- a/pyLoadGui.py
+++ b/pyLoadGui.py
@@ -28,6 +28,8 @@ from PyQt4.QtGui import *
from uuid import uuid4 as uuid
+from os.path import basename
+
from module.gui.ConnectionManager import *
from module.gui.connector import *
from module.gui.MainWindow import *
@@ -109,6 +111,7 @@ class main(QObject):
self.connect(self.mainWindow, SIGNAL("pushPackageToQueue"), self.slotPushPackageToQueue)
self.connect(self.mainWindow, SIGNAL("restartDownload"), self.slotRestartDownload)
self.connect(self.mainWindow, SIGNAL("removeDownload"), self.slotRemoveDownload)
+ self.connect(self.mainWindow, SIGNAL("addContainer"), self.slotAddContainer)
def slotShowConnector(self):
"""
@@ -377,6 +380,18 @@ class main(QObject):
for fileid in ids:
self.connector.addFileToPackage(fileid, packid)
+ def slotAddContainer(self, path):
+ """
+ emitted from main window
+ add container
+ """
+ filename = basename(path)
+ type = "".join(filename.split(".")[-1])
+ fh = open(path, "r")
+ content = fh.read()
+ fh.close()
+ self.connector.uploadContainer(filename, type, content)
+
def slotSaveMainWindow(self, state, geo):
"""
save the window geometry and toolbar/dock position to config file