mirror of
https://github.com/xlmnxp/blue-recorder.git
synced 2025-03-31 23:04:55 +03:00
update
This commit is contained in:
parent
d8a5ab9598
commit
3144ee473c
108
Cargo.lock
generated
108
Cargo.lock
generated
@ -491,7 +491,6 @@ dependencies = [
|
||||
"fluent-bundle",
|
||||
"glib 0.10.3",
|
||||
"libadwaita",
|
||||
"rdev",
|
||||
"regex",
|
||||
"rust-ini 0.16.1",
|
||||
"secfmt",
|
||||
@ -649,21 +648,6 @@ dependencies = [
|
||||
"libloading",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cocoa"
|
||||
version = "0.22.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "667fdc068627a2816b9ff831201dd9864249d6ee8d190b9532357f1fc0f61ea7"
|
||||
dependencies = [
|
||||
"bitflags 1.3.2",
|
||||
"block",
|
||||
"core-foundation 0.9.4",
|
||||
"core-graphics 0.21.0",
|
||||
"foreign-types 0.3.2",
|
||||
"libc",
|
||||
"objc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cocoa"
|
||||
version = "0.26.0"
|
||||
@ -719,23 +703,13 @@ dependencies = [
|
||||
"crossbeam-utils",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "core-foundation"
|
||||
version = "0.7.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "57d24c7a13c43e870e37c1556b74555437870a04514f7685f5b354e090567171"
|
||||
dependencies = [
|
||||
"core-foundation-sys 0.7.0",
|
||||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "core-foundation"
|
||||
version = "0.9.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f"
|
||||
dependencies = [
|
||||
"core-foundation-sys 0.8.7",
|
||||
"core-foundation-sys",
|
||||
"libc",
|
||||
]
|
||||
|
||||
@ -745,46 +719,16 @@ version = "0.10.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b55271e5c8c478ad3f38ad24ef34923091e0548492a266d19b3c0b4d82574c63"
|
||||
dependencies = [
|
||||
"core-foundation-sys 0.8.7",
|
||||
"core-foundation-sys",
|
||||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "core-foundation-sys"
|
||||
version = "0.7.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b3a71ab494c0b5b860bdc8407ae08978052417070c2ced38573a9157ad75b8ac"
|
||||
|
||||
[[package]]
|
||||
name = "core-foundation-sys"
|
||||
version = "0.8.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b"
|
||||
|
||||
[[package]]
|
||||
name = "core-graphics"
|
||||
version = "0.19.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b3889374e6ea6ab25dba90bb5d96202f61108058361f6dc72e8b03e6f8bbe923"
|
||||
dependencies = [
|
||||
"bitflags 1.3.2",
|
||||
"core-foundation 0.7.0",
|
||||
"foreign-types 0.3.2",
|
||||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "core-graphics"
|
||||
version = "0.21.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "52a67c4378cf203eace8fb6567847eb641fd6ff933c1145a115c6ee820ebb978"
|
||||
dependencies = [
|
||||
"bitflags 1.3.2",
|
||||
"core-foundation 0.9.4",
|
||||
"foreign-types 0.3.2",
|
||||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "core-graphics"
|
||||
version = "0.23.2"
|
||||
@ -840,7 +784,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "321077172d79c662f64f5071a03120748d5bb652f5231570141be24cfcd2bace"
|
||||
dependencies = [
|
||||
"bitflags 1.3.2",
|
||||
"core-foundation-sys 0.8.7",
|
||||
"core-foundation-sys",
|
||||
"coreaudio-sys",
|
||||
]
|
||||
|
||||
@ -860,7 +804,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "873dab07c8f743075e57f524c583985fbaf745602acbe916a01539364369a779"
|
||||
dependencies = [
|
||||
"alsa",
|
||||
"core-foundation-sys 0.8.7",
|
||||
"core-foundation-sys",
|
||||
"coreaudio-rs",
|
||||
"dasp_sample",
|
||||
"jni",
|
||||
@ -2048,7 +1992,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220"
|
||||
dependencies = [
|
||||
"android_system_properties",
|
||||
"core-foundation-sys 0.8.7",
|
||||
"core-foundation-sys",
|
||||
"iana-time-zone-haiku",
|
||||
"js-sys",
|
||||
"wasm-bindgen",
|
||||
@ -2416,12 +2360,6 @@ dependencies = [
|
||||
"log",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "lazy_static"
|
||||
version = "1.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
|
||||
|
||||
[[package]]
|
||||
name = "lebe"
|
||||
version = "0.5.2"
|
||||
@ -3290,22 +3228,6 @@ dependencies = [
|
||||
"crossbeam-utils",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rdev"
|
||||
version = "0.5.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "00552ca2dc2f93b84cd7b5581de49549411e4e41d89e1c691bcb93dc4be360c3"
|
||||
dependencies = [
|
||||
"cocoa 0.22.0",
|
||||
"core-foundation 0.7.0",
|
||||
"core-foundation-sys 0.7.0",
|
||||
"core-graphics 0.19.2",
|
||||
"lazy_static",
|
||||
"libc",
|
||||
"winapi",
|
||||
"x11",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "redox_users"
|
||||
version = "0.4.6"
|
||||
@ -3563,7 +3485,7 @@ checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02"
|
||||
dependencies = [
|
||||
"bitflags 2.6.0",
|
||||
"core-foundation 0.9.4",
|
||||
"core-foundation-sys 0.8.7",
|
||||
"core-foundation-sys",
|
||||
"libc",
|
||||
"security-framework-sys",
|
||||
]
|
||||
@ -3574,7 +3496,7 @@ version = "2.13.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1863fd3768cd83c56a7f60faa4dc0d403f1b6df0a38c3c25f44b7894e45370d5"
|
||||
dependencies = [
|
||||
"core-foundation-sys 0.8.7",
|
||||
"core-foundation-sys",
|
||||
"libc",
|
||||
]
|
||||
|
||||
@ -3863,7 +3785,7 @@ version = "0.6.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8e1d1b10ced5ca923a1fcb8d03e96b8d3268065d724548c0211415ff6ac6bac4"
|
||||
dependencies = [
|
||||
"core-foundation-sys 0.8.7",
|
||||
"core-foundation-sys",
|
||||
"libc",
|
||||
]
|
||||
|
||||
@ -4910,10 +4832,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2514eb851240a0b0a09d55765ebd4769e6f2f88a6a1f27267e2e3166bdf6d68b"
|
||||
dependencies = [
|
||||
"base64",
|
||||
"cocoa 0.26.0",
|
||||
"cocoa",
|
||||
"cocoa-foundation",
|
||||
"core-foundation 0.10.0",
|
||||
"core-foundation-sys 0.8.7",
|
||||
"core-foundation-sys",
|
||||
"core-graphics 0.24.0",
|
||||
"image",
|
||||
"libc",
|
||||
@ -4926,16 +4848,6 @@ dependencies = [
|
||||
"zbus 1.9.3",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "x11"
|
||||
version = "2.21.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "502da5464ccd04011667b11c435cb992822c2c0dbde1770c988480d312a0db2e"
|
||||
dependencies = [
|
||||
"libc",
|
||||
"pkg-config",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "xcb"
|
||||
version = "1.5.0"
|
||||
|
@ -14,7 +14,6 @@ dirs = "4.0.0"
|
||||
fluent-bundle = "0.15.3"
|
||||
glib = "0.10.3"
|
||||
adw = { version = "0.2.1", package = "libadwaita", features = ["gtk_v4_6"] }
|
||||
rdev = "0.5"
|
||||
regex = "1.4.3"
|
||||
rust-ini = "0.16"
|
||||
secfmt = "0.1.1"
|
||||
|
@ -1,14 +1,14 @@
|
||||
extern crate regex;
|
||||
|
||||
use adw::gtk::Label;
|
||||
use adw::prelude::*;
|
||||
use adw::Window;
|
||||
#[cfg(any(target_os = "freebsd", target_os = "linux"))]
|
||||
use anyhow::anyhow;
|
||||
use anyhow::Result;
|
||||
#[cfg(target_os = "windows")]
|
||||
use display_info::DisplayInfo;
|
||||
use glib::Continue;
|
||||
use adw::gtk::Label;
|
||||
use adw::Window;
|
||||
use adw::prelude::*;
|
||||
#[cfg(any(target_os = "freebsd", target_os = "linux"))]
|
||||
use regex::Regex;
|
||||
use std::cell::RefCell;
|
||||
|
@ -1,7 +1,7 @@
|
||||
extern crate secfmt;
|
||||
|
||||
use adw::gtk::glib;
|
||||
use adw::gtk::{Button, ToggleButton, Label, SpinButton};
|
||||
use adw::gtk::glib;
|
||||
use adw::gtk::prelude::*;
|
||||
use adw::Window;
|
||||
|
||||
|
@ -1,3 +1,8 @@
|
||||
use adw::{Application, Window};
|
||||
use adw::gio::File;
|
||||
use adw::gtk::{AboutDialog, Builder, Button, CheckButton, ComboBoxText, CssProvider, Entry, FileChooserNative,
|
||||
FileChooserAction, Image, Label, MessageDialog, SpinButton, TextBuffer, TextView, ToggleButton};
|
||||
use adw::prelude::*;
|
||||
use anyhow::Result;
|
||||
#[cfg(any(target_os = "freebsd", target_os = "linux"))]
|
||||
use blue_recorder_core::ffmpeg_linux::Ffmpeg;
|
||||
@ -6,11 +11,6 @@ use blue_recorder_core::ffmpeg_windows::Ffmpeg;
|
||||
use blue_recorder_core::utils::{is_wayland, play_record, RecordMode};
|
||||
use chrono::Utc;
|
||||
use cpal::traits::{DeviceTrait, HostTrait};
|
||||
use adw::{Application, Window};
|
||||
use adw::gio::File;
|
||||
use adw::gtk::{AboutDialog, Builder, Button, CheckButton, ComboBoxText, CssProvider, Entry, FileChooserNative,
|
||||
FileChooserAction, Image, Label, MessageDialog, SpinButton, TextBuffer, TextView, ToggleButton};
|
||||
use adw::prelude::*;
|
||||
use std::cell::RefCell;
|
||||
use std::ops::Add;
|
||||
use std::path::{Path, PathBuf};
|
||||
@ -516,28 +516,29 @@ fn build_ui(application: &Application, error_dialog: MessageDialog, error_messag
|
||||
folder_chooser_button.connect_clicked(glib::clone!(@strong folder_chooser_native => move |_| {
|
||||
let error_dialog = _error_dialog.clone();
|
||||
let error_message = _error_message.clone();
|
||||
folder_chooser_native.connect_response
|
||||
(glib::clone!(@strong folder_chooser_native, @strong folder_chooser_label,
|
||||
@strong folder_chooser_image => move |_, response| {
|
||||
let text_buffer = TextBuffer::new(None);
|
||||
if response == adw::gtk::ResponseType::Accept {
|
||||
if folder_chooser_native.file().is_none() {
|
||||
text_buffer.set_text("Failed to get save file path.");
|
||||
error_message.set_buffer(Some(&text_buffer));
|
||||
error_dialog.show();
|
||||
}
|
||||
let folder_chooser = folder_chooser_native.file().unwrap_or_else
|
||||
(||
|
||||
File::for_path(&config_management::get(
|
||||
"default", "folder",
|
||||
))); // Default
|
||||
let folder_chooser_name = folder_chooser.basename().unwrap();
|
||||
folder_chooser_label.set_label(&folder_chooser_name.to_string_lossy());
|
||||
let folder_chooser_icon = config_management::folder_icon(folder_chooser_name.to_str());
|
||||
folder_chooser_image.set_icon_name(Some(folder_chooser_icon));
|
||||
};
|
||||
folder_chooser_native.hide();
|
||||
}));
|
||||
folder_chooser_native.connect_response
|
||||
(glib::clone!(@strong folder_chooser_native, @strong folder_chooser_label,
|
||||
@strong folder_chooser_image => move |_, response| {
|
||||
let text_buffer = TextBuffer::new(None);
|
||||
if response == adw::gtk::ResponseType::Accept {
|
||||
if folder_chooser_native.file().is_none() {
|
||||
text_buffer.set_text("Failed to get save file path.");
|
||||
error_message.set_buffer(Some(&text_buffer));
|
||||
error_dialog.show();
|
||||
}
|
||||
let folder_chooser = folder_chooser_native.file().unwrap_or_else
|
||||
(||
|
||||
File::for_path(&config_management::get(
|
||||
"default", "folder",
|
||||
))); // Default
|
||||
|
||||
let folder_chooser_name = folder_chooser.basename().unwrap();
|
||||
folder_chooser_label.set_label(&folder_chooser_name.to_string_lossy());
|
||||
let folder_chooser_icon = config_management::folder_icon(folder_chooser_name.to_str());
|
||||
folder_chooser_image.set_icon_name(Some(folder_chooser_icon));
|
||||
};
|
||||
folder_chooser_native.hide();
|
||||
}));
|
||||
folder_chooser_native.show();
|
||||
}));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user