Merge pull request #7 from ochibani/fix-main

Fix main
This commit is contained in:
Chibani 2024-12-04 21:45:34 +02:00 committed by GitHub
commit d313eacd01
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 13 additions and 10 deletions

View File

@ -66,6 +66,9 @@ close = Close
# Copy right
copy-right = © 2021 Salem Yaslem
# Close error dialog
close-error-dialog = Close
# Run command label
default-command = Default command:
@ -81,12 +84,12 @@ delay-title = Start Recording in…
# Stop delay timer
delay-window-stop = Stop
# About message
dialog-comment = A simple screen recorder for Linux desktop. Supports Wayland & Xorg.
# Details button
details-button = Details
# About message
dialog-comment = A simple screen recorder for Linux desktop. Supports Wayland & Xorg.
# Run command input
enter-command = Enter your command here..

View File

@ -170,7 +170,7 @@ fn build_ui(application: &Application, error_dialog: MessageDialog, error_messag
format_chooser_combobox.append(Some("avi"), &get_bundle("avi-format", None));
format_chooser_combobox.append(Some("wmv"), &get_bundle("wmv-format", None));
format_chooser_combobox.append(Some("nut"), &get_bundle("nut-format", None));
format_chooser_combobox.set_active(Some(config_management::get("default", "format").parse::<u32>().unwrap()));
format_chooser_combobox.set_active(Some(config_management::get("default", "format").parse::<u32>().unwrap_or(0u32)));
// Get audio sources
let input_device = host_audio_device.input_devices().unwrap();
@ -373,17 +373,17 @@ fn build_ui(application: &Application, error_dialog: MessageDialog, error_messag
("frame-{}",
&format_chooser_combobox.active().unwrap().to_string()))
.parse::<f64>()
.unwrap(),
.unwrap_or(0f64),
);
audio_bitrate_spin.set_value(
config_management::get("default", "audiobitrate")
.parse::<f64>()
.unwrap(),
.unwrap_or(0f64),
);
delay_spin.set_value(
config_management::get("default", "delay")
.parse::<f64>()
.unwrap(),
.unwrap_or(0f64),
);
video_bitrate_spin.set_value(
config_management::get("default",
@ -391,7 +391,7 @@ fn build_ui(application: &Application, error_dialog: MessageDialog, error_messag
("videobitrate-{}",
&format_chooser_combobox.active().unwrap().to_string()))
.parse::<f64>()
.unwrap(),
.unwrap_or(0f64),
);
let _format_chooser_combobox = format_chooser_combobox.clone();
@ -411,7 +411,7 @@ fn build_ui(application: &Application, error_dialog: MessageDialog, error_messag
("frame-{}",
&format_chooser_combobox.active().unwrap().to_string()))
.parse::<f64>()
.unwrap(),
.unwrap_or(0f64),
);
_video_bitrate_spin.set_value(
config_management::get("default",
@ -419,7 +419,7 @@ fn build_ui(application: &Application, error_dialog: MessageDialog, error_messag
("videobitrate-{}",
&format_chooser_combobox.active().unwrap().to_string()))
.parse::<f64>()
.unwrap(),
.unwrap_or(0f64),
);
}
});