diff -r 16b243bdb12f -r 3139cbc98a14 eric6/Preferences/ConfigurationPages/NetworkPage.py --- a/eric6/Preferences/ConfigurationPages/NetworkPage.py Sun May 02 17:26:47 2021 +0200 +++ b/eric6/Preferences/ConfigurationPages/NetworkPage.py Sun May 02 18:13:23 2021 +0200 @@ -41,25 +41,25 @@ self.downloadDirPicker.setMode(E5PathPickerModes.DirectoryMode) self.ftpProxyTypeCombo.addItem( - self.tr("No FTP Proxy"), E5FtpProxyType.NoProxy) + self.tr("No FTP Proxy"), E5FtpProxyType.NO_PROXY) self.ftpProxyTypeCombo.addItem( self.tr("No Proxy Authentication required"), - E5FtpProxyType.NonAuthorizing) + E5FtpProxyType.NON_AUTHORIZING) self.ftpProxyTypeCombo.addItem( - self.tr("User@Server"), E5FtpProxyType.UserAtServer) + self.tr("User@Server"), E5FtpProxyType.USER_SERVER) self.ftpProxyTypeCombo.addItem( - self.tr("SITE"), E5FtpProxyType.Site) + self.tr("SITE"), E5FtpProxyType.SITE) self.ftpProxyTypeCombo.addItem( - self.tr("OPEN"), E5FtpProxyType.Open) + self.tr("OPEN"), E5FtpProxyType.OPEN) self.ftpProxyTypeCombo.addItem( self.tr("User@Proxyuser@Server"), - E5FtpProxyType.UserAtProxyuserAtServer) + E5FtpProxyType.USER_PROXYUSER_SERVER) self.ftpProxyTypeCombo.addItem( - self.tr("Proxyuser@Server"), E5FtpProxyType.ProxyuserAtServer) + self.tr("Proxyuser@Server"), E5FtpProxyType.PROXYUSER_SERVER) self.ftpProxyTypeCombo.addItem( - self.tr("AUTH and RESP"), E5FtpProxyType.AuthResp) + self.tr("AUTH and RESP"), E5FtpProxyType.AUTH_RESP) self.ftpProxyTypeCombo.addItem( - self.tr("Bluecoat Proxy"), E5FtpProxyType.Bluecoat) + self.tr("Bluecoat Proxy"), E5FtpProxyType.BLUECOAT) # set initial values self.downloadDirPicker.setText(Preferences.getUI("DownloadPath")) @@ -204,8 +204,7 @@ self.ftpProxyPortSpin.value()) Preferences.setUI( "ProxyType/Ftp", - self.ftpProxyTypeCombo.itemData( - self.ftpProxyTypeCombo.currentIndex())) + self.ftpProxyTypeCombo.currentData()) Preferences.setUI( "ProxyUser/Ftp", self.ftpProxyUserEdit.text()) @@ -232,17 +231,17 @@ @param index index of the selected item (integer) """ proxyType = self.ftpProxyTypeCombo.itemData(index) - self.ftpProxyHostEdit.setEnabled(proxyType != E5FtpProxyType.NoProxy) - self.ftpProxyPortSpin.setEnabled(proxyType != E5FtpProxyType.NoProxy) + self.ftpProxyHostEdit.setEnabled(proxyType != E5FtpProxyType.NO_PROXY) + self.ftpProxyPortSpin.setEnabled(proxyType != E5FtpProxyType.NO_PROXY) self.ftpProxyUserEdit.setEnabled( - proxyType not in [E5FtpProxyType.NoProxy, - E5FtpProxyType.NonAuthorizing]) + proxyType not in [E5FtpProxyType.NO_PROXY, + E5FtpProxyType.NON_AUTHORIZING]) self.ftpProxyPasswordEdit.setEnabled( - proxyType not in [E5FtpProxyType.NoProxy, - E5FtpProxyType.NonAuthorizing]) + proxyType not in [E5FtpProxyType.NO_PROXY, + E5FtpProxyType.NON_AUTHORIZING]) self.ftpProxyAccountEdit.setEnabled( - proxyType not in [E5FtpProxyType.NoProxy, - E5FtpProxyType.NonAuthorizing]) + proxyType not in [E5FtpProxyType.NO_PROXY, + E5FtpProxyType.NON_AUTHORIZING]) def create(dlg):