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