(self, _widget, _clock)
| 933 | self._speech_reset() |
| 934 | |
| 935 | def _gst_progress_timeout(self, _widget, _clock): |
| 936 | if not self.player: |
| 937 | return False |
| 938 | |
| 939 | if self.current_speech and self.player.get_state(Gst.CLOCK_TIME_NONE) != Gst.State.NULL: |
| 940 | have_pos, pos = self.player.query_position(Gst.Format.TIME) |
| 941 | have_dur, dur = self.player.query_duration(Gst.Format.TIME) |
| 942 | |
| 943 | if have_pos and have_dur: |
| 944 | if self.current_speech["called_from"] == "src": |
| 945 | self.src_speech_btn.progress(pos / dur) |
| 946 | else: |
| 947 | self.dest_speech_btn.progress(pos / dur) |
| 948 | |
| 949 | if self.speech_loading: |
| 950 | self.speech_loading = False |
| 951 | self._check_speech_enabled() |
| 952 | |
| 953 | return True |
| 954 | |
| 955 | return False |
| 956 | |
| 957 | def _on_src_text_changed(self, buffer: Gtk.TextBuffer): |
| 958 | if not self.provider["trans"]: |
nothing calls this directly
no test coverage detected