summaryrefslogtreecommitdiffstats
path: root/module/gui
diff options
context:
space:
mode:
Diffstat (limited to 'module/gui')
-rw-r--r--module/gui/ConnectionManager.py15
-rw-r--r--module/gui/connector.py9
2 files changed, 18 insertions, 6 deletions
diff --git a/module/gui/ConnectionManager.py b/module/gui/ConnectionManager.py
index d96916338..2a63698a0 100644
--- a/module/gui/ConnectionManager.py
+++ b/module/gui/ConnectionManager.py
@@ -126,10 +126,14 @@ class ConnectionManager(QWidget):
self.emit(SIGNAL("removeConnection"), data)
def slotConnect(self):
- item = self.connList.currentItem()
- data = item.data(Qt.UserRole).toPyObject()
- data = self.cleanDict(data)
- self.emit(SIGNAL("connect"), data)
+ if self.internal.checkState() == 2:
+ data = {"type": "internal"}
+ self.emit(SIGNAL("connect"), data)
+ else:
+ item = self.connList.currentItem()
+ data = item.data(Qt.UserRole).toPyObject()
+ data = self.cleanDict(data)
+ self.emit(SIGNAL("connect"), data)
def cleanDict(self, data):
tmp = {}
@@ -154,7 +158,8 @@ class ConnectionManager(QWidget):
self.setDefault(data, False)
def slotInternal(self):
- self.connList.clearSelection()
+ if self.internal.checkState() == 2:
+ self.connList.clearSelection()
def setDefault(self, data, state):
data = self.cleanDict(data)
diff --git a/module/gui/connector.py b/module/gui/connector.py
index 975e1ca1b..28bfaacc4 100644
--- a/module/gui/connector.py
+++ b/module/gui/connector.py
@@ -46,7 +46,14 @@ class Connector(QThread):
self.mutex.unlock()
def connectProxy(self):
- self.proxy = DispatchRPC(self.mutex, ServerProxy(self.addr, allow_none=True, verbose=False))
+ if isinstance(self.addr, tuple):
+ while not hasattr(self.addr[1], "server_methods"):
+ sleep(1)
+
+ self.proxy = DispatchRPC(self.mutex, self.addr[1].server_methods)
+ else:
+ self.proxy = DispatchRPC(self.mutex, ServerProxy(self.addr, allow_none=True, verbose=False))
+
self.connect(self.proxy, SIGNAL("proxy_error"), self._proxyError)
self.connect(self.proxy, SIGNAL("connectionLost"), self, SIGNAL("connectionLost"))
try: