add show_play

This commit is contained in:
ochibani 2025-01-08 13:01:03 +02:00
parent 2f11505b8b
commit 31ea054174
No known key found for this signature in database
GPG Key ID: 2C6B61CE0C704ED4

View File

@ -985,6 +985,7 @@ fn build_ui(application: &Application, error_dialog: MessageDialog, error_messag
let _video_switch = video_switch.clone(); let _video_switch = video_switch.clone();
let mut _ffmpeg_record_interface = ffmpeg_record_interface.clone(); let mut _ffmpeg_record_interface = ffmpeg_record_interface.clone();
stop_button.connect_clicked(move |_| { stop_button.connect_clicked(move |_| {
let mut show_play = true;
_record_time_label.set_visible(false); _record_time_label.set_visible(false);
stop_timer(_record_time_label.clone()); stop_timer(_record_time_label.clone());
if _audio_input_switch.is_active() { if _audio_input_switch.is_active() {
@ -1000,6 +1001,7 @@ fn build_ui(application: &Application, error_dialog: MessageDialog, error_messag
} }
enable_input_widgets(input_widgets.clone()); enable_input_widgets(input_widgets.clone());
record_button.show(); record_button.show();
show_play = false;
_stop_button.hide(); _stop_button.hide();
let text_buffer = TextBuffer::new(None); let text_buffer = TextBuffer::new(None);
text_buffer.set_text(&format!("{}", error)); text_buffer.set_text(&format!("{}", error));
@ -1021,6 +1023,7 @@ fn build_ui(application: &Application, error_dialog: MessageDialog, error_messag
} }
enable_input_widgets(input_widgets.clone()); enable_input_widgets(input_widgets.clone());
record_button.show(); record_button.show();
show_play = false;
_stop_button.hide(); _stop_button.hide();
let text_buffer = TextBuffer::new(None); let text_buffer = TextBuffer::new(None);
text_buffer.set_text(&format!("{}", error)); text_buffer.set_text(&format!("{}", error));
@ -1042,6 +1045,7 @@ fn build_ui(application: &Application, error_dialog: MessageDialog, error_messag
} }
enable_input_widgets(input_widgets.clone()); enable_input_widgets(input_widgets.clone());
record_button.show(); record_button.show();
show_play = false;
_stop_button.hide(); _stop_button.hide();
let text_buffer = TextBuffer::new(None); let text_buffer = TextBuffer::new(None);
text_buffer.set_text(&format!("{}", error)); text_buffer.set_text(&format!("{}", error));
@ -1057,7 +1061,9 @@ fn build_ui(application: &Application, error_dialog: MessageDialog, error_messag
enable_input_widgets(input_widgets.clone()); enable_input_widgets(input_widgets.clone());
record_button.show(); record_button.show();
_stop_button.hide(); _stop_button.hide();
_play_button.show(); if show_play {
_play_button.show();
}
}); });
// Delay window button // Delay window button