diff -r 2526f3b8c421 -r e99fe0e9a1e3 src/eric7/WebBrowser/SpellCheck/ManageDictionariesDialog.py --- a/src/eric7/WebBrowser/SpellCheck/ManageDictionariesDialog.py Mon Apr 17 14:38:57 2023 +0200 +++ b/src/eric7/WebBrowser/SpellCheck/ManageDictionariesDialog.py Mon Apr 17 14:52:51 2023 +0200 @@ -36,18 +36,28 @@ DocumentationDirRole = Qt.ItemDataRole.UserRole + 2 LocalesRole = Qt.ItemDataRole.UserRole + 3 - def __init__(self, writeableDirectories, parent=None): + def __init__( + self, + writeableDirectories, + enforceUnencryptedDownloads=False, + parent=None, + ): """ Constructor @param writeableDirectories list of writable directories @type list of str - @param parent reference to the parent widget - @type QWidget + @param enforceUnencryptedDownloads flag indicating to perform unencrypted + downloads (defaults to False) + @type bool (optional) + @param parent reference to the parent widget (defaults to None) + @type QWidget (optional) """ super().__init__(parent) self.setupUi(self) + self.__enforceUnencryptedDownloads = enforceUnencryptedDownloads + self.__refreshButton = self.buttonBox.addButton( self.tr("Refresh"), QDialogButtonBox.ButtonRole.ActionRole ) @@ -176,7 +186,10 @@ self.downloadProgress.setValue(0) url = self.dictionariesUrlEdit.text() - if Preferences.getWebBrowser("ForceHttpDictionaryDownload"): + if ( + self.__enforceUnencryptedDownloads + or Preferences.getWebBrowser("ForceHttpDictionaryDownload") + ): url = url.replace("https://", "http://") if self.__online: @@ -373,7 +386,10 @@ if self.__online: if self.__dictionariesToDownload: url = self.__dictionariesToDownload.pop(0) - if Preferences.getWebBrowser("ForceHttpDictionaryDownload"): + if ( + self.__enforceUnencryptedDownloads + or Preferences.getWebBrowser("ForceHttpDictionaryDownload") + ): url = url.replace("https://", "http://") self.statusLabel.setText(url)