eric6/Plugins/UiExtensionPlugins/Translator/TranslatorWidget.py

changeset 8259
2bbec88047dd
parent 8218
7c09585bd960
equal deleted inserted replaced
8258:82b608e352ec 8259:2bbec88047dd
337 337
338 def __updatePronounceButtons(self): 338 def __updatePronounceButtons(self):
339 """ 339 """
340 Private slot to set the state of the pronounce buttons. 340 Private slot to set the state of the pronounce buttons.
341 """ 341 """
342 if self.__translationEngine is not None: 342 hasTTS = self.__translationEngine and self.__translationEngine.hasTTS()
343 hasTTS = self.__translationEngine.hasTTS()
344 else:
345 hasTTS = False
346 self.pronounceOrigButton.setEnabled( 343 self.pronounceOrigButton.setEnabled(
347 hasTTS and bool(self.origEdit.toPlainText())) 344 hasTTS and bool(self.origEdit.toPlainText()))
348 self.pronounceTransButton.setEnabled( 345 self.pronounceTransButton.setEnabled(
349 hasTTS and bool(self.transEdit.toPlainText())) 346 hasTTS and bool(self.transEdit.toPlainText()))
350 347

eric ide

mercurial