eric6/VirtualEnv/VirtualenvAddEditDialog.py

changeset 8260
2161475d9639
parent 8218
7c09585bd960
child 8273
698ae46f40a4
equal deleted inserted replaced
8259:2bbec88047dd 8260:2161475d9639
105 105
106 def __updateOk(self): 106 def __updateOk(self):
107 """ 107 """
108 Private slot to update the state of the OK button. 108 Private slot to update the state of the OK button.
109 """ 109 """
110 if self.__editMode: 110 enable = (
111 enable = ( 111 (bool(self.nameEdit.text()) and
112 bool(self.nameEdit.text()) and 112 (self.nameEdit.text() == self.__venvName or
113 (self.nameEdit.text() == self.__venvName or 113 self.__manager.isUnique(self.nameEdit.text())))
114 self.__manager.isUnique(self.nameEdit.text())) 114 if self.__editMode else
115 ) 115 (bool(self.nameEdit.text()) and
116 else: 116 self.__manager.isUnique(self.nameEdit.text()))
117 enable = ( 117 )
118 bool(self.nameEdit.text()) and
119 self.__manager.isUnique(self.nameEdit.text())
120 )
121 118
122 if not self.globalCheckBox.isChecked(): 119 if not self.globalCheckBox.isChecked():
123 enable &= ( 120 enable &= (
124 self.remoteCheckBox.isChecked() or ( 121 self.remoteCheckBox.isChecked() or (
125 bool(self.targetDirectoryPicker.text()) and 122 bool(self.targetDirectoryPicker.text()) and

eric ide

mercurial