138 if not Preferences.getUI("UseProxy"): |
138 if not Preferences.getUI("UseProxy"): |
139 proxyType = E5FtpProxyType.NoProxy |
139 proxyType = E5FtpProxyType.NoProxy |
140 else: |
140 else: |
141 proxyType = Preferences.getUI("ProxyType/Ftp") |
141 proxyType = Preferences.getUI("ProxyType/Ftp") |
142 if proxyType != E5FtpProxyType.NoProxy: |
142 if proxyType != E5FtpProxyType.NoProxy: |
143 self.__ftp.setProxy(proxyType, |
143 self.__ftp.setProxy( |
|
144 proxyType, |
144 Preferences.getUI("ProxyHost/Ftp"), |
145 Preferences.getUI("ProxyHost/Ftp"), |
145 Preferences.getUI("ProxyPort/Ftp")) |
146 Preferences.getUI("ProxyPort/Ftp")) |
146 if proxyType != E5FtpProxyType.NonAuthorizing: |
147 if proxyType != E5FtpProxyType.NonAuthorizing: |
147 self.__ftp.setProxyAuthentication( |
148 self.__ftp.setProxyAuthentication( |
148 Preferences.getUI("ProxyUser/Ftp"), |
149 Preferences.getUI("ProxyUser/Ftp"), |
281 AuthenticationDialog |
282 AuthenticationDialog |
282 info = self.trUtf8( |
283 info = self.trUtf8( |
283 "<b>Connect to proxy '{0}' using:</b>")\ |
284 "<b>Connect to proxy '{0}' using:</b>")\ |
284 .format(Utilities.html_encode( |
285 .format(Utilities.html_encode( |
285 Preferences.getUI("ProxyHost/Ftp"))) |
286 Preferences.getUI("ProxyHost/Ftp"))) |
286 dlg = AuthenticationDialog(info, |
287 dlg = AuthenticationDialog( |
287 Preferences.getUI("ProxyUser/Ftp"), True) |
288 info, Preferences.getUI("ProxyUser/Ftp"), True) |
288 dlg.setData(Preferences.getUI("ProxyUser/Ftp"), |
289 dlg.setData(Preferences.getUI("ProxyUser/Ftp"), |
289 Preferences.getUI("ProxyPassword/Ftp")) |
290 Preferences.getUI("ProxyPassword/Ftp")) |
290 if dlg.exec_() == QDialog.Accepted: |
291 if dlg.exec_() == QDialog.Accepted: |
291 username, password = dlg.getData() |
292 username, password = dlg.getData() |
292 if dlg.shallSave(): |
293 if dlg.shallSave(): |
388 # write a blank pixmap on error |
389 # write a blank pixmap on error |
389 pixmap = QPixmap(size, size) |
390 pixmap = QPixmap(size, size) |
390 pixmap.fill(Qt.transparent) |
391 pixmap.fill(Qt.transparent) |
391 imageBuffer.buffer().clear() |
392 imageBuffer.buffer().clear() |
392 pixmap.save(imageBuffer, "PNG") |
393 pixmap.save(imageBuffer, "PNG") |
393 return cssString.format(size + 4, |
394 return cssString.format( |
|
395 size + 4, |
394 str(imageBuffer.buffer().toBase64(), encoding="ascii")) |
396 str(imageBuffer.buffer().toBase64(), encoding="ascii")) |
395 |
397 |
396 def __setListContent(self): |
398 def __setListContent(self): |
397 """ |
399 """ |
398 Private method to prepare the content for the reader. |
400 Private method to prepare the content for the reader. |