src/eric7/MicroPython/WifiDialogs/WifiApConfigDialog.py

branch
eric7
changeset 10153
ffe7432f716b
parent 9868
467288cffee2
child 10439
21c28b0f9e41
equal deleted inserted replaced
10152:33e7b9d3f91c 10153:ffe7432f716b
54 Preferences.getMicroPython("WifiApAuthMode") 54 Preferences.getMicroPython("WifiApAuthMode")
55 ) 55 )
56 if index == -1: 56 if index == -1:
57 index = 5 # default it to WPA/WPA2 in case of an issue 57 index = 5 # default it to WPA/WPA2 in case of an issue
58 self.apSecurityComboBox.setCurrentIndex(index) 58 self.apSecurityComboBox.setCurrentIndex(index)
59 self.hostnameEdit.setText(Preferences.getMicroPython("WifiApHostname"))
59 60
60 self.__withIP = withIP 61 self.__withIP = withIP
61 62
62 self.ipv4GroupBox.setVisible(withIP) 63 self.ipv4GroupBox.setVisible(withIP)
63 if withIP: 64 if withIP:
128 Preferences.setMicroPython("WifiApName", self.apSsidEdit.text()) 129 Preferences.setMicroPython("WifiApName", self.apSsidEdit.text())
129 Preferences.setMicroPython("WifiApPassword", self.apPasswordEdit.text()) 130 Preferences.setMicroPython("WifiApPassword", self.apPasswordEdit.text())
130 Preferences.setMicroPython( 131 Preferences.setMicroPython(
131 "WifiApAuthMode", self.apSecurityComboBox.currentData() 132 "WifiApAuthMode", self.apSecurityComboBox.currentData()
132 ) 133 )
134 Preferences.setMicroPython("WifiApHostname", self.hostnameEdit.text())
133 if self.__withIP: 135 if self.__withIP:
134 Preferences.setMicroPython("WifiApAddress", self.addressEdit.text()) 136 Preferences.setMicroPython("WifiApAddress", self.addressEdit.text())
135 Preferences.setMicroPython("WifiApNetmask", self.netmaskEdit.text()) 137 Preferences.setMicroPython("WifiApNetmask", self.netmaskEdit.text())
136 Preferences.setMicroPython("WifiApGateway", self.gatewayEdit.text()) 138 Preferences.setMicroPython("WifiApGateway", self.gatewayEdit.text())
137 Preferences.setMicroPython("WifiApDNS", self.dnsEdit.text()) 139 Preferences.setMicroPython("WifiApDNS", self.dnsEdit.text())
160 162
161 return ( 163 return (
162 self.apSsidEdit.text(), 164 self.apSsidEdit.text(),
163 self.apPasswordEdit.text(), 165 self.apPasswordEdit.text(),
164 self.apSecurityComboBox.currentData(), 166 self.apSecurityComboBox.currentData(),
167 self.hostnameEdit.text(),
165 ifconfig, 168 ifconfig,
166 ) 169 )

eric ide

mercurial