src/eric7/RemoteServerInterface/EricServerConnectionDialog.py

branch
eric7
changeset 11033
6b197c3389f7
parent 10785
82d8a5606135
child 11090
f5f5f5803935
--- a/src/eric7/RemoteServerInterface/EricServerConnectionDialog.py	Sat Nov 02 19:28:14 2024 +0100
+++ b/src/eric7/RemoteServerInterface/EricServerConnectionDialog.py	Sun Nov 03 12:34:02 2024 +0100
@@ -98,9 +98,9 @@
         """
         Public method to get the entered data.
 
-        @return tuple containing the entered host name or IP address, the port number
-            and the timeout (in seconds)
-        @rtype tuple of (str, int, int)
+        @return tuple containing the entered host name or IP address, the port number,
+            the timeout in seconds and the client ID string
+        @rtype tuple of (str, int, int, str)
         """
         port = self.portSpinBox.value()
         if port == self.portSpinBox.minimum():
@@ -110,15 +110,15 @@
         if timeout == self.timeoutSpinBox.minimum():
             timeout = None
 
-        return self.hostnameEdit.text(), port, timeout
+        return self.hostnameEdit.text(), port, timeout, self.clientIdEdit.text()
 
     def getProfileData(self):
         """
         Public method to get the entered data for connection profile mode.
 
         @return tuple containing the profile name, host name or IP address,
-            the port number and the timeout (in seconds)
-        @rtype tuple of (str, str, int, int)
+            the port number, the timeout in seconds and the client ID string
+        @rtype tuple of (str, str, int, int, str)
         """
         port = self.portSpinBox.value()
         if port == self.portSpinBox.minimum():
@@ -128,9 +128,15 @@
         if timeout == self.timeoutSpinBox.minimum():
             timeout = 0
 
-        return self.nameEdit.text(), self.hostnameEdit.text(), port, timeout
+        return (
+            self.nameEdit.text(),
+            self.hostnameEdit.text(),
+            port,
+            timeout,
+            self.clientIdEdit.text(),
+        )
 
-    def setProfileData(self, name, hostname, port, timeout):
+    def setProfileData(self, name, hostname, port, timeout, clientId=""):
         """
         Public method to set the connection profile data to be edited.
 
@@ -142,6 +148,8 @@
         @type int
         @param timeout timeout value in seconds
         @type int
+        @param clientId client ID string (defaults to "")
+        @type str (optional)
         """
         # adjust some values
         if not bool(port):
@@ -155,3 +163,4 @@
         self.hostnameEdit.setText(hostname)
         self.portSpinBox.setValue(port)
         self.timeoutSpinBox.setValue(timeout)
+        self.clientIdEdit.setText(clientId)

eric ide

mercurial