eric6/Plugins/UiExtensionPlugins/Translator/TranslatorWidget.py

branch
maintenance
changeset 8273
698ae46f40a4
parent 8259
2bbec88047dd
--- a/eric6/Plugins/UiExtensionPlugins/Translator/TranslatorWidget.py	Fri Apr 02 11:59:41 2021 +0200
+++ b/eric6/Plugins/UiExtensionPlugins/Translator/TranslatorWidget.py	Sat May 01 14:27:20 2021 +0200
@@ -38,7 +38,7 @@
         @param translator reference to the translator object (Translator)
         @param parent reference to the parent widget (QWidget)
         """
-        super(TranslatorWidget, self).__init__(parent)
+        super().__init__(parent)
         self.setupUi(self)
         
         self.__plugin = plugin
@@ -339,10 +339,7 @@
         """
         Private slot to set the state of the pronounce buttons.
         """
-        if self.__translationEngine is not None:
-            hasTTS = self.__translationEngine.hasTTS()
-        else:
-            hasTTS = False
+        hasTTS = self.__translationEngine and self.__translationEngine.hasTTS()
         self.pronounceOrigButton.setEnabled(
             hasTTS and bool(self.origEdit.toPlainText()))
         self.pronounceTransButton.setEnabled(

eric ide

mercurial