MCPcopy Create free account
hub / github.com/dialect-app/dialect / _on_dest_text_changed

Method _on_dest_text_changed

dialect/window.py:979–988  ·  view source on GitHub ↗
(self, buffer: Gtk.TextBuffer)

Source from the content-addressed store, hash-verified

977 self._check_speech_enabled()
978
979 def _on_dest_text_changed(self, buffer: Gtk.TextBuffer):
980 if not self.provider["trans"]:
981 return
982
983 sensitive = buffer.get_char_count() != 0
984 self.lookup_action("copy").props.enabled = sensitive # type: ignore
985 self.lookup_action("suggest").set_enabled( # type: ignore
986 self.provider["trans"].supports_suggestions and sensitive
987 )
988 self._check_speech_enabled()
989
990 def _on_user_action_ended(self, _buffer):
991 if Settings.get().live_translation:

Callers

nothing calls this directly

Calls 1

_check_speech_enabledMethod · 0.95

Tested by

no test coverage detected