Mon, 17 Apr 2023 14:52:51 +0200
Configuration Dialog
- optimized the handling of the web browser spell checking dialog
--- a/src/eric7/APIs/Python3/eric7.api Mon Apr 17 14:38:57 2023 +0200 +++ b/src/eric7/APIs/Python3/eric7.api Mon Apr 17 14:52:51 2023 +0200 @@ -12545,7 +12545,7 @@ eric7.WebBrowser.SpellCheck.ManageDictionariesDialog.ManageDictionariesDialog.on_dictionariesList_itemSelectionChanged?4() eric7.WebBrowser.SpellCheck.ManageDictionariesDialog.ManageDictionariesDialog.on_dictionariesUrlEditButton_toggled?4(checked) eric7.WebBrowser.SpellCheck.ManageDictionariesDialog.ManageDictionariesDialog.on_locationComboBox_currentTextChanged?4(txt) -eric7.WebBrowser.SpellCheck.ManageDictionariesDialog.ManageDictionariesDialog?1(writeableDirectories, parent=None) +eric7.WebBrowser.SpellCheck.ManageDictionariesDialog.ManageDictionariesDialog?1(writeableDirectories, enforceUnencryptedDownloads=False, parent=None, ) eric7.WebBrowser.StatusBar.ImagesIcon.ImagesIcon.preferencesChanged?4() eric7.WebBrowser.StatusBar.ImagesIcon.ImagesIcon?1(window) eric7.WebBrowser.StatusBar.JavaScriptIcon.JavaScriptIcon.preferencesChanged?4()
--- a/src/eric7/Documentation/Source/eric7.WebBrowser.SpellCheck.ManageDictionariesDialog.html Mon Apr 17 14:38:57 2023 +0200 +++ b/src/eric7/Documentation/Source/eric7.WebBrowser.SpellCheck.ManageDictionariesDialog.html Mon Apr 17 14:52:51 2023 +0200 @@ -131,7 +131,7 @@ <a NAME="ManageDictionariesDialog.__init__" ID="ManageDictionariesDialog.__init__"></a> <h4>ManageDictionariesDialog (Constructor)</h4> -<b>ManageDictionariesDialog</b>(<i>writeableDirectories, parent=None</i>) +<b>ManageDictionariesDialog</b>(<i>writeableDirectories, enforceUnencryptedDownloads=False, parent=None, </i>) <p> Constructor @@ -142,9 +142,14 @@ <dd> list of writable directories </dd> -<dt><i>parent</i> (QWidget)</dt> +<dt><i>enforceUnencryptedDownloads</i> (bool (optional))</dt> <dd> -reference to the parent widget +flag indicating to perform unencrypted + downloads (defaults to False) +</dd> +<dt><i>parent</i> (QWidget (optional))</dt> +<dd> +reference to the parent widget (defaults to None) </dd> </dl> <a NAME="ManageDictionariesDialog.__checkInstalledDictionaries" ID="ManageDictionariesDialog.__checkInstalledDictionaries"></a>
--- a/src/eric7/Preferences/ConfigurationPages/WebBrowserSpellCheckingPage.py Mon Apr 17 14:38:57 2023 +0200 +++ b/src/eric7/Preferences/ConfigurationPages/WebBrowserSpellCheckingPage.py Mon Apr 17 14:52:51 2023 +0200 @@ -185,7 +185,10 @@ ManageDictionariesDialog, ) - dlg = ManageDictionariesDialog(self.__writeableDirectories, self) + dlg = ManageDictionariesDialog( + self.__writeableDirectories, + enforceUnencryptedDownloads=self.unencryptedCheckBox.isChecked(), + parent=self) dlg.exec() self.__populateDictionariesList()
--- 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)