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 |