Call `translate_selection` or queue it until the window is focused
(self, src_lang: str | None, dest_lang: str | None)
| 542 | self.send_notification(_("Couldn’t read selection clip board!")) |
| 543 | |
| 544 | def queue_selection_translation(self, src_lang: str | None, dest_lang: str | None): |
| 545 | """Call `translate_selection` or queue it until the window is focused""" |
| 546 | if self.props.is_active: |
| 547 | self.translate_selection(src_lang, dest_lang) |
| 548 | else: |
| 549 | self.selection_translation_queued = True |
| 550 | self.selection_translation_langs = (src_lang, dest_lang) |
| 551 | |
| 552 | def save_settings(self, *args, **kwargs): |
| 553 | if not self.is_maximized(): |
no test coverage detected