Ejemplo n.º 1
0
    def ButtonOK(self):
        logging.info("ButtonOK")
        error = False
        if self.rdpInputName.text() == "":
            common.messageDialog("configDialogErrorName")
            error = True
        elif " " in self.rdpInputName.text():
            common.messageDialog("configDialogErrorCharacter")
            error = True
        elif "[" in self.rdpInputName.text():
            common.messageDialog("configDialogErrorCharacter")
            error = True
        elif "]" in self.rdpInputName.text():
            common.messageDialog("configDialogErrorCharacter")
            error = True
        elif self.rdpInputAddress.text() == "":
            common.messageDialog("configDialogErrorAddress")
            error = True
        elif common.isNetworkAddress(self.rdpInputAddress.text()) is False:
            error = True

        name = self.rdpInputName.text()
        if common.existingConnection(name):
            common.messageDialog("configDialogErrorAddress")
            error = True

        if error is False:
            values = {}
            values["typ"] = "rdp"
            values["address"] = self.rdpInputAddress.text()
            values["resolution"] = self.rdpInputResolution.currentText()
            values["color"] = self.rdpInputColor.currentText()
            values["parameter"] = self.rdpInputParameter.text()
            if self.rdpInputAutostart.isChecked():
                values["autostart"] = "yes"
            else:
                values["autostart"] = "no"
            if self.rdpInputRepeat.isChecked():
                values["repeat"] = "yes"
            else:
                values["repeat"] = "no"
            if self.rdpInputSystemLogin.isChecked():
                values["systemlogin"] = "******"
            else:
                values["systemlogin"] = "******"

            values["alternative"] = str(self.rdpInputAlternative.currentText())

            # delete old connection
            if self.connectionname != "":
                common.deleteConnection(self.connectionname)
            # delete new connection
            common.deleteConnection(self.rdpInputName.text())
            # make new connection
            parameter = self.parameterRDP(self.rdpInputName.text(), values)
            common.newConnection(values, parameter, self.rdpInputName.text())
            self.close()
Ejemplo n.º 2
0
    def ButtonOK(self):
        logging.info("ButtonOK")
        error = False
        if self.sshInputName.text() == "":
            common.messageDialog("configDialogErrorName")
            error = True
        elif self.sshInputAddress.text() == "":
            common.messageDialog("configDialogErrorAddress")
            error = True
        elif self.sshInputLogin.text() == "":
            common.messageDialog("configDialogErrorLogin")
            error = True
        elif self.sshInputApplication.text() == "":
            common.messageDialog("configDialogErrorApplication")
            error = True
        elif self.sshInputPassword.text() == "":
            common.messageDialog("configDialogErrorPassword")
            error = True

        name = self.sshInputName.text()
        if common.existingConnection(name):
            common.messageDialog("configDialogErrorAddress")
            error = True

        if error == False:
            values = {}
            values["typ"] = "ssh"
            values["name"] = self.sshInputName.text()
            values["address"] = self.sshInputAddress.text()
            values["port"] = self.sshInputPort.text()
            values["login"] = self.sshInputLogin.text()
            values["application"] = self.sshInputApplication.text()
            values["password"] = self.sshInputPassword.text()
            values["parameter"] = self.sshInputParameter.text()
            if self.sshInputAutostart.isChecked():
                values["autostart"] = "yes"
            else:
                values["autostart"] = "no"
            if self.sshInputRepeat.isChecked():
                values["repeat"] = "yes"
            else:
                values["repeat"] = "no"

            values["alternative"] = str(self.sshInputAlternative.currentText())

            # delete old connection
            if self.connectionname != "":
                common.deleteConnection(self.connectionname)
                common.deletePasswordFile(self.connectionname)
            # delete new connection
            common.deleteConnection(self.sshInputName.text())
            common.deletePasswordFile(self.sshInputName.text())
            # make new connection
            parameter = self.parameterssh(self.sshInputName.text(), values)
            common.newConnection(values, parameter, self.sshInputName.text())
            self.close()
Ejemplo n.º 3
0
 def configDelete(self):
     logging.info("configDelete")
     item = self.configList.currentItem()
     if item is not None:
         result = common.confirmDialog(
             self, common.getRessource("configDeleteDialogTitle"),
             common.getRessource("configDeleteDialogMessage"))
         if result:
             common.deleteConnection(item.text())
             self.fillListWidgets()
Ejemplo n.º 4
0
    def ButtonOK(self):
        logging.info("ButtonOK")
        error = False
        if self.x2goInputName.text() == "":
            common.messageDialog("configDialogErrorName")
            error = True
        elif self.x2goInputAddress.text() == "":
            common.messageDialog("configDialogErrorAddress")
            error = True

        name = self.x2goInputName.text()
        if common.existingConnection(name):
            common.messageDialog("configDialogErrorAddress")
            error = True

        if error == False:
            values = {}
            values["typ"] = "x2go"
            values["name"] = self.x2goInputName.text()
            values["address"] = self.x2goInputAddress.text()
            values["user"] = self.x2goInputUser.text()
            values["password"] = self.x2goInputPassword.text()
            values["parameter"] = self.x2goInputParameter.text()
            values["resolution"] = self.x2goInputResolution.currentText()
            values["keyboard"] = self.x2goInputKeyboard.currentText()
            values["desktop"] = self.x2goInputDesktop.currentText()
            if self.x2goInputAutostart.isChecked():
                values["autostart"] = "yes"
            else:
                values["autostart"] = "no"                
                
            if self.x2goInputRepeat.isChecked():
                values["repeat"] = "yes"
            else:
                values["repeat"] = "no"

            if self.x2goInputSystemLogin.isChecked():
                values["systemlogin"] = "******"
            else:
                values["systemlogin"] = "******"
                
            values["alternative"] = str(self.x2goInputAlternative.currentText())

            # delete old connection
            if self.connectionname != "":
                common.deleteConnection(self.connectionname)
                common.deletePasswordFile(self.connectionname)
            # delete new connection
            common.deleteConnection(self.x2goInputName.text())
            common.deletePasswordFile(self.x2goInputName.text())
            # make new connection
            parameter = self.parameterx2go(self.x2goInputName.text(), values)
            common.newConnection(values, parameter, self.x2goInputName.text())
            self.close()
Ejemplo n.º 5
0
    def ButtonOK(self):
        logging.info("ButtonOK")
        error = False
        if self.vncInputName.text() == "":
            common.messageDialog("configDialogErrorName")
            error = True
        elif " " in self.vncInputName.text():
            common.messageDialog("configDialogErrorCharacter")
            error = True
        elif "[" in self.vncInputName.text():
            common.messageDialog("configDialogErrorCharacter")
            error = True
        elif "]" in self.vncInputName.text():
            common.messageDialog("configDialogErrorCharacter")
            error = True
        elif self.vncInputAddress.text() == "":
            common.messageDialog("configDialogErrorAddress")
            error = True
        elif self.vncInputPort.text() == "":
            common.messageDialog("configDialogErrorPort")
            error = True
        elif common.isNetworkAddress(self.vncInputAddress.text()) == False:
            error = True
        elif self.vncInputIcon.isChecked() and self.vncInputIconName.text(
        ) == "":
            common.messageDialog("configDialogErrorIconName")
            error = True

        name = self.vncInputName.text()
        if common.existingConnection(name):
            common.messageDialog("configDialogErrorAddress")
            error = True

        if error == False:
            values = {}
            values["typ"] = "vnc"
            values["address"] = self.vncInputAddress.text()
            values["port"] = self.vncInputPort.text()
            values["password"] = self.vncInputPassword.text()
            values["resolution"] = self.vncInputResolution.currentText()
            values["color"] = self.vncInputColor.currentText()
            values["parameter"] = self.vncInputParameter.text()
            if self.vncInputAutostart.isChecked():
                values["autostart"] = "yes"
            else:
                values["autostart"] = "no"
            if self.vncInputRepeat.isChecked():
                values["repeat"] = "yes"
            else:
                values["repeat"] = "no"

            values["alternative"] = str(self.vncInputAlternative.currentText())

            if self.vncInputIcon.isChecked():
                values["icon"] = "yes"
            else:
                values["icon"] = "no"

            values["iconname"] = str(self.vncInputIconName.text())

            # delete old connection
            if self.connectionname != "":
                common.deleteConnection(self.connectionname)
                common.deletePasswordFile(self.connectionname)
            # delete new connection
            common.deleteConnection(self.vncInputName.text())
            common.deletePasswordFile(self.vncInputName.text())
            # make new connection
            parameter = self.parameterVNC(self.vncInputName.text(), values)
            common.newConnection(values, parameter, self.vncInputName.text())
            password = self.vncInputPassword.text()
            if password != "":
                self.newPasswordFile(self.vncInputName.text(), password)
            self.close()