mirror of
https://github.com/xlmnxp/blue-recorder.git
synced 2025-04-04 16:54:55 +03:00
Compare commits
No commits in common. "e95028816993443fbc8e478b9ec4df717f8e9007" and "5d2c6a297b4e3c21e1dc9cfddd1aabb4527a62fe" have entirely different histories.
e950288169
...
5d2c6a297b
@ -9,6 +9,7 @@
|
||||
<object class="GtkMessageDialog" id="error_dialog">
|
||||
<property name="can-focus">True</property>
|
||||
<property name="destroy-with-parent">True</property>
|
||||
<property name="resizable">False</property>
|
||||
<property name="modal">True</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
|
@ -34,7 +34,6 @@ pub fn run_ui(application: &Application) {
|
||||
error_dialog.set_title(Some(&get_bundle("error-title", None)));
|
||||
let _error_dialog = error_dialog.clone();
|
||||
error_dialog_button.connect_clicked(move |_| {
|
||||
_error_dialog.set_hide_on_close(true);
|
||||
_error_dialog.close();
|
||||
});
|
||||
|
||||
@ -240,6 +239,7 @@ fn build_ui(application: &Application, error_dialog: MessageDialog, error_messag
|
||||
config_management::set_bool("default", "audio_input_check", switch.is_active());
|
||||
if !switch.is_active() && !_video_switch.is_active() {
|
||||
_mouse_switch.set_sensitive(true);
|
||||
_video_switch.set_active(true);
|
||||
}
|
||||
});
|
||||
follow_mouse_switch.connect_toggled(|switch: &CheckButton| {
|
||||
@ -263,6 +263,8 @@ fn build_ui(application: &Application, error_dialog: MessageDialog, error_messag
|
||||
_follow_mouse_switch.set_sensitive(true);
|
||||
_mouse_switch.set_sensitive(true);
|
||||
} else {
|
||||
_audio_input_switch.set_active(true);
|
||||
_audio_input_switch.set_sensitive(true);
|
||||
_mouse_switch.set_active(false);
|
||||
_mouse_switch.set_sensitive(false);
|
||||
_follow_mouse_switch.set_active(false);
|
||||
@ -825,6 +827,9 @@ fn build_ui(application: &Application, error_dialog: MessageDialog, error_messag
|
||||
if hide_switch.is_active() {
|
||||
_main_window.minimize();
|
||||
}
|
||||
_audio_input_switch.set_sensitive(false);
|
||||
_speaker_switch.set_sensitive(false);
|
||||
_video_switch.set_sensitive(false);
|
||||
_play_button.hide();
|
||||
_record_button.hide();
|
||||
_stop_button.show();
|
||||
@ -838,6 +843,9 @@ fn build_ui(application: &Application, error_dialog: MessageDialog, error_messag
|
||||
text_buffer.set_text(&format!("{}", error));
|
||||
_error_message.set_buffer(Some(&text_buffer));
|
||||
_error_dialog.show();
|
||||
_audio_input_switch.set_sensitive(true);
|
||||
_speaker_switch.set_sensitive(true);
|
||||
_video_switch.set_sensitive(true);
|
||||
_record_button.show();
|
||||
_stop_button.hide();
|
||||
},
|
||||
@ -853,6 +861,9 @@ fn build_ui(application: &Application, error_dialog: MessageDialog, error_messag
|
||||
text_buffer.set_text(&format!("{}", error));
|
||||
_error_message.set_buffer(Some(&text_buffer));
|
||||
_error_dialog.show();
|
||||
_audio_input_switch.set_sensitive(true);
|
||||
_speaker_switch.set_sensitive(true);
|
||||
_video_switch.set_sensitive(true);
|
||||
_record_button.show();
|
||||
_stop_button.hide();
|
||||
},
|
||||
@ -868,6 +879,9 @@ fn build_ui(application: &Application, error_dialog: MessageDialog, error_messag
|
||||
text_buffer.set_text(&format!("{}", error));
|
||||
_error_message.set_buffer(Some(&text_buffer));
|
||||
_error_dialog.show();
|
||||
_audio_input_switch.set_sensitive(true);
|
||||
_speaker_switch.set_sensitive(true);
|
||||
_video_switch.set_sensitive(true);
|
||||
_record_button.show();
|
||||
_stop_button.hide();
|
||||
},
|
||||
@ -901,6 +915,9 @@ fn build_ui(application: &Application, error_dialog: MessageDialog, error_messag
|
||||
text_buffer.set_text(&format!("{}", error));
|
||||
_error_message.set_buffer(Some(&text_buffer));
|
||||
_error_dialog.show();
|
||||
_audio_input_switch.set_sensitive(true);
|
||||
_speaker_switch.set_sensitive(true);
|
||||
_video_switch.set_sensitive(true);
|
||||
record_button.show();
|
||||
_stop_button.hide();
|
||||
},
|
||||
@ -916,6 +933,9 @@ fn build_ui(application: &Application, error_dialog: MessageDialog, error_messag
|
||||
text_buffer.set_text(&format!("{}", error));
|
||||
_error_message.set_buffer(Some(&text_buffer));
|
||||
_error_dialog.show();
|
||||
_audio_input_switch.set_sensitive(true);
|
||||
_speaker_switch.set_sensitive(true);
|
||||
_video_switch.set_sensitive(true);
|
||||
record_button.show();
|
||||
_stop_button.hide();
|
||||
},
|
||||
@ -931,6 +951,9 @@ fn build_ui(application: &Application, error_dialog: MessageDialog, error_messag
|
||||
text_buffer.set_text(&format!("{}", error));
|
||||
_error_message.set_buffer(Some(&text_buffer));
|
||||
_error_dialog.show();
|
||||
_audio_input_switch.set_sensitive(true);
|
||||
_speaker_switch.set_sensitive(true);
|
||||
_video_switch.set_sensitive(true);
|
||||
record_button.show();
|
||||
_stop_button.hide();
|
||||
},
|
||||
@ -1048,12 +1071,10 @@ fn build_ui(application: &Application, error_dialog: MessageDialog, error_messag
|
||||
});
|
||||
|
||||
// Close the application when main window destroy
|
||||
let mut _ffmpeg_record_interface = ffmpeg_record_interface.clone();
|
||||
main_window.connect_destroy(move |main_window| {
|
||||
//let mut _ffmpeg_record_interface = ffmpeg_record_interface.clone();
|
||||
// Stop recording before close the application
|
||||
_ffmpeg_record_interface.borrow_mut().stop_input_audio().unwrap();
|
||||
_ffmpeg_record_interface.borrow_mut().stop_output_audio().unwrap();
|
||||
_ffmpeg_record_interface.borrow_mut().stop_video().unwrap();
|
||||
//_ffmpeg_record_interface.borrow_mut().clone().stop_record();
|
||||
main_window.close();
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user