summaryrefslogtreecommitdiffstats
path: root/module/gui/ConnectionManager.py
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2010-09-04 20:23:50 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2010-09-04 20:23:50 +0200
commit6590f2c91d4896d22820d9dd30dac211b7fadb32 (patch)
tree07bace92af908d890c13762663048b49ba02a851 /module/gui/ConnectionManager.py
parenthoster fixes, new tray icon (diff)
downloadpyload-6590f2c91d4896d22820d9dd30dac211b7fadb32.tar.xz
links.txt default to queue
Diffstat (limited to 'module/gui/ConnectionManager.py')
-rw-r--r--module/gui/ConnectionManager.py37
1 files changed, 34 insertions, 3 deletions
diff --git a/module/gui/ConnectionManager.py b/module/gui/ConnectionManager.py
index d0050e69d..d96916338 100644
--- a/module/gui/ConnectionManager.py
+++ b/module/gui/ConnectionManager.py
@@ -39,8 +39,32 @@ class ConnectionManager(QWidget):
edit = QPushButton(_("Edit"))
remove = QPushButton(_("Remove"))
connect = QPushButton(_("Connect"))
-
- mainLayout.addWidget(connList)
+
+ #box = QFrame()
+ boxLayout = QVBoxLayout()
+ #box.setLayout(boxLayout)
+
+ boxLayout.addWidget(QLabel(_("Connect:")))
+ boxLayout.addWidget(connList)
+
+ line = QFrame()
+ #line.setFixedWidth(100)
+ line.setFrameShape(line.HLine)
+ line.setFrameShadow(line.Sunken)
+
+ boxLayout.addWidget(line)
+
+ form = QFormLayout()
+ form.setMargin(5)
+ form.setSpacing(20)
+
+ form.setAlignment(Qt.AlignRight)
+ checkbox = QCheckBox()
+ form.addRow(_("Use internal Core"), checkbox)
+
+ boxLayout.addLayout(form)
+
+ mainLayout.addLayout(boxLayout)
mainLayout.addLayout(buttonLayout)
buttonLayout.addWidget(new)
@@ -50,7 +74,8 @@ class ConnectionManager(QWidget):
buttonLayout.addWidget(connect)
self.setLayout(mainLayout)
-
+
+ self.internal = checkbox
self.new = new
self.connectb = connect
self.remove = remove
@@ -69,6 +94,7 @@ class ConnectionManager(QWidget):
self.connect(self.connectb, SIGNAL("clicked()"), self.slotConnect)
self.connect(self.edit, SIGNAL("save"), self.slotSave)
self.connect(self.connList, SIGNAL("itemDoubleClicked(QListWidgetItem *)"), self.slotItemDoubleClicked)
+ self.connect(self.internal, SIGNAL("clicked()"), self.slotInternal)
def setConnections(self, connections):
self.connList.clear()
@@ -126,6 +152,9 @@ class ConnectionManager(QWidget):
if self.cleanDict(data)["id"] == did:
continue
self.setDefault(data, False)
+
+ def slotInternal(self):
+ self.connList.clearSelection()
def setDefault(self, data, state):
data = self.cleanDict(data)
@@ -198,6 +227,8 @@ class ConnectionManager(QWidget):
self.default = None
def setData(self, data):
+ if not data: return
+
self.id = data["id"]
self.default = data["default"]
self.controls["name"].setText(data["name"])