102 self.ftpProxyAccountEdit.setText( |
102 self.ftpProxyAccountEdit.setText( |
103 Preferences.getUI("ProxyAccount/Ftp")) |
103 Preferences.getUI("ProxyAccount/Ftp")) |
104 |
104 |
105 self.httpProxyForAllCheckBox.setChecked( |
105 self.httpProxyForAllCheckBox.setChecked( |
106 Preferences.getUI("UseHttpProxyForAll")) |
106 Preferences.getUI("UseHttpProxyForAll")) |
107 if Preferences.getUI("UseSystemProxy"): |
107 if not Preferences.getUI("UseProxy"): |
|
108 self.noProxyButton.setChecked(True) |
|
109 elif Preferences.getUI("UseSystemProxy"): |
108 self.systemProxyButton.setChecked(True) |
110 self.systemProxyButton.setChecked(True) |
|
111 elif Preferences.getUI("UseProxyAutoConfiguration"): |
|
112 self.pacButton.setChecked(True) |
109 else: |
113 else: |
110 self.manualProxyButton.setChecked(True) |
114 self.manualProxyButton.setChecked(True) |
111 self.proxyGroup.setChecked( |
115 |
112 Preferences.getUI("UseProxy")) |
116 self.pacUrlEdit.setText(Preferences.getUI("ProxyPacUrl")) |
|
117 self.exceptionsEdit.setText( |
|
118 ", ".join(Preferences.getUI("ProxyExceptions").split(","))) |
113 |
119 |
114 def save(self): |
120 def save(self): |
115 """ |
121 """ |
116 Public slot to save the Networj configuration. |
122 Public slot to save the Networj configuration. |
117 """ |
123 """ |
130 policy = DownloadManager.RemoveSuccessFullDownload |
136 policy = DownloadManager.RemoveSuccessFullDownload |
131 Preferences.setHelp("DownloadManagerRemovePolicy", policy) |
137 Preferences.setHelp("DownloadManagerRemovePolicy", policy) |
132 |
138 |
133 Preferences.setUI( |
139 Preferences.setUI( |
134 "UseProxy", |
140 "UseProxy", |
135 self.proxyGroup.isChecked()) |
141 not self.noProxyButton.isChecked()) |
136 Preferences.setUI( |
142 Preferences.setUI( |
137 "UseSystemProxy", |
143 "UseSystemProxy", |
138 self.systemProxyButton.isChecked()) |
144 self.systemProxyButton.isChecked()) |
139 Preferences.setUI( |
145 Preferences.setUI( |
|
146 "UseProxyAutoConfiguration", |
|
147 self.systemProxyButton.isChecked()) |
|
148 Preferences.setUI( |
140 "UseHttpProxyForAll", |
149 "UseHttpProxyForAll", |
141 self.httpProxyForAllCheckBox.isChecked()) |
150 self.httpProxyForAllCheckBox.isChecked()) |
|
151 |
|
152 Preferences.setUI( |
|
153 "ProxyPacUrl", |
|
154 self.pacUrlEdit.text()) |
|
155 Preferences.setUI( |
|
156 "ProxyExceptions", |
|
157 ",".join( |
|
158 [h.strip() for h in self.exceptionsEdit.text().split(",")])) |
142 |
159 |
143 # HTTP proxy |
160 # HTTP proxy |
144 Preferences.setUI( |
161 Preferences.setUI( |
145 "ProxyHost/Http", |
162 "ProxyHost/Http", |
146 self.httpProxyHostEdit.text()) |
163 self.httpProxyHostEdit.text()) |
220 E5FtpProxyType.NonAuthorizing]) |
237 E5FtpProxyType.NonAuthorizing]) |
221 self.ftpProxyAccountEdit.setEnabled( |
238 self.ftpProxyAccountEdit.setEnabled( |
222 proxyType not in [E5FtpProxyType.NoProxy, |
239 proxyType not in [E5FtpProxyType.NoProxy, |
223 E5FtpProxyType.NonAuthorizing]) |
240 E5FtpProxyType.NonAuthorizing]) |
224 |
241 |
|
242 @pyqtSlot() |
|
243 def on_pacReloadButton_clicked(self): |
|
244 """ |
|
245 Private slot to reload the proxy auto-configuration file. |
|
246 """ |
|
247 from E5Network.E5NetworkProxyFactory import E5NetworkProxyFactory |
|
248 # TODO: switch lines once PacManager is implemented |
|
249 E5NetworkProxyFactory.pacManager() |
|
250 # E5NetworkProxyFactory.pacManager().downloadPacFile() |
|
251 |
225 |
252 |
226 def create(dlg): |
253 def create(dlg): |
227 """ |
254 """ |
228 Module function to create the configuration page. |
255 Module function to create the configuration page. |
229 |
256 |