mirror of
https://github.com/storytold/AniCraft.git
synced 2026-11-28 17:19:31 +01:00
Merge outside PR #550: fix(import): show .wave and .oga files in audio pickers
This commit is contained in:
commit
6db50bdf3c
1 file changed
+11
-2
+11
-2
@@ -978,8 +978,8 @@ pub fn filters(cmd: &str) -> (&'static str, &'static [&'static str]) {
|
||||
"file.export_svg" => (tr_noop!("SVG image"), &["svg"]),
|
||||
"file.export_lottie" => (tr_noop!("Lottie animation"), &["json"]),
|
||||
"file.export_html" => (tr_noop!("Web page"), &["html", "htm"]),
|
||||
"file.import" => (tr_noop!("Drawing, image or sound"), &["svg", "png", "jpg", "jpeg", "wav", "ogg", "mp3"]),
|
||||
"file.import_to_library" => (tr_noop!("Sound, image or drawing"), &["wav", "ogg", "mp3", "png", "jpg", "jpeg", "svg"]),
|
||||
"file.import" => (tr_noop!("Drawing, image or sound"), &["svg", "png", "jpg", "jpeg", "wav", "wave", "ogg", "oga", "mp3"]),
|
||||
"file.import_to_library" => (tr_noop!("Sound, image or drawing"), &["wav", "wave", "ogg", "oga", "mp3", "png", "jpg", "jpeg", "svg"]),
|
||||
"file.export_audio" => (tr_noop!("WAV sound"), &["wav"]),
|
||||
"file.export_sprite_sheet" => (tr_noop!("PNG sprite sheet"), &["png"]),
|
||||
"file.export_video" => (tr_noop!("Video (WebM or MP4)"), &["webm", "mp4"]),
|
||||
@@ -1252,6 +1252,15 @@ mod tests {
|
||||
assert!(reads_file("file.open") && reads_file("file.import") && !reads_file("file.save"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn import_filters_include_supported_sound_aliases() {
|
||||
for cmd in ["file.import", "file.import_to_library"] {
|
||||
let (_, extensions) = filters(cmd);
|
||||
assert!(extensions.contains(&"wave"), "{cmd} should accept .wave");
|
||||
assert!(extensions.contains(&"oga"), "{cmd} should accept .oga");
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn mac_labels_use_apple_order_and_glyphs() {
|
||||
assert_eq!(shortcut_label_for(Os::Mac, "Ctrl+Shift+S", true), "⇧⌘S");
|
||||
|
||||
Reference in new issue
Block a user