better
Some checks are pending
/ test (push) Waiting to run

This commit is contained in:
Chris Cochrun 2025-09-24 12:37:14 -05:00
parent 0d3f7180c9
commit 8068b57e71
4 changed files with 60 additions and 21 deletions

55
Cargo.lock generated
View file

@ -376,6 +376,9 @@ dependencies = [
"serde_repr", "serde_repr",
"tokio", "tokio",
"url", "url",
"wayland-backend",
"wayland-client",
"wayland-protocols",
"zbus 5.11.0", "zbus 5.11.0",
] ]
@ -1358,7 +1361,7 @@ source = "git+https://github.com/pop-os/freedesktop-icons#8a05c322c482ff3c69cf34
dependencies = [ dependencies = [
"dirs 5.0.1", "dirs 5.0.1",
"ini_core", "ini_core",
"memmap2", "memmap2 0.9.8",
"thiserror 2.0.16", "thiserror 2.0.16",
"tracing", "tracing",
"xdg 2.5.2", "xdg 2.5.2",
@ -2297,7 +2300,7 @@ checksum = "e32eac81c1135c1df01d4e6d4233c47ba11f6a6d07f33e0bba09d18797077770"
dependencies = [ dependencies = [
"fontconfig-parser", "fontconfig-parser",
"log", "log",
"memmap2", "memmap2 0.9.8",
"slotmap", "slotmap",
"tinyvec", "tinyvec",
"ttf-parser 0.21.1", "ttf-parser 0.21.1",
@ -2311,7 +2314,7 @@ checksum = "457e789b3d1202543297a350643cf459f836cade38934e7a4cf6a39e7cde2905"
dependencies = [ dependencies = [
"fontconfig-parser", "fontconfig-parser",
"log", "log",
"memmap2", "memmap2 0.9.8",
"slotmap", "slotmap",
"tinyvec", "tinyvec",
"ttf-parser 0.25.1", "ttf-parser 0.25.1",
@ -3219,6 +3222,7 @@ source = "git+https://github.com/pop-os/libcosmic#0e797b244043ee86610113d5479502
dependencies = [ dependencies = [
"bitflags 2.9.4", "bitflags 2.9.4",
"bytes", "bytes",
"cosmic-client-toolkit",
"dnd", "dnd",
"glam", "glam",
"iced_accessibility", "iced_accessibility",
@ -3302,6 +3306,7 @@ version = "0.14.0-dev"
source = "git+https://github.com/pop-os/libcosmic#0e797b244043ee86610113d547950204258dea83" source = "git+https://github.com/pop-os/libcosmic#0e797b244043ee86610113d547950204258dea83"
dependencies = [ dependencies = [
"bytes", "bytes",
"cosmic-client-toolkit",
"dnd", "dnd",
"iced_accessibility", "iced_accessibility",
"iced_core", "iced_core",
@ -3380,6 +3385,7 @@ name = "iced_widget"
version = "0.14.0-dev" version = "0.14.0-dev"
source = "git+https://github.com/pop-os/libcosmic#0e797b244043ee86610113d547950204258dea83" source = "git+https://github.com/pop-os/libcosmic#0e797b244043ee86610113d547950204258dea83"
dependencies = [ dependencies = [
"cosmic-client-toolkit",
"dnd", "dnd",
"iced_accessibility", "iced_accessibility",
"iced_renderer", "iced_renderer",
@ -3399,22 +3405,29 @@ name = "iced_winit"
version = "0.14.0-dev" version = "0.14.0-dev"
source = "git+https://github.com/pop-os/libcosmic#0e797b244043ee86610113d547950204258dea83" source = "git+https://github.com/pop-os/libcosmic#0e797b244043ee86610113d547950204258dea83"
dependencies = [ dependencies = [
"cosmic-client-toolkit",
"dnd", "dnd",
"iced_accessibility", "iced_accessibility",
"iced_futures", "iced_futures",
"iced_graphics", "iced_graphics",
"iced_runtime", "iced_runtime",
"log", "log",
"raw-window-handle",
"rustc-hash 2.1.1", "rustc-hash 2.1.1",
"rustix 0.38.44", "rustix 0.38.44",
"thiserror 1.0.69", "thiserror 1.0.69",
"tracing", "tracing",
"wasm-bindgen-futures", "wasm-bindgen-futures",
"wayland-backend",
"wayland-client", "wayland-client",
"wayland-protocols",
"web-sys", "web-sys",
"winapi", "winapi",
"window_clipboard", "window_clipboard",
"winit", "winit",
"xkbcommon 0.7.0",
"xkbcommon-dl",
"xkeysym",
] ]
[[package]] [[package]]
@ -3903,6 +3916,7 @@ dependencies = [
"ashpd 0.12.0", "ashpd 0.12.0",
"auto_enums", "auto_enums",
"chrono", "chrono",
"cosmic-client-toolkit",
"cosmic-config", "cosmic-config",
"cosmic-freedesktop-icons", "cosmic-freedesktop-icons",
"cosmic-settings-config", "cosmic-settings-config",
@ -4092,7 +4106,6 @@ dependencies = [
"rapidhash", "rapidhash",
"rayon", "rayon",
"resvg 0.45.1", "resvg 0.45.1",
"rfd",
"rodio", "rodio",
"ron 0.8.1", "ron 0.8.1",
"serde", "serde",
@ -4211,6 +4224,15 @@ version = "2.7.5"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "32a282da65faaf38286cf3be983213fcf1d2e2a58700e808f83f4ea9a4804bc0" checksum = "32a282da65faaf38286cf3be983213fcf1d2e2a58700e808f83f4ea9a4804bc0"
[[package]]
name = "memmap2"
version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "43a5a03cefb0d953ec0be133036f14e109412fa594edc2f77227249db66cc3ed"
dependencies = [
"libc",
]
[[package]] [[package]]
name = "memmap2" name = "memmap2"
version = "0.9.8" version = "0.9.8"
@ -6174,7 +6196,7 @@ checksum = "b6277f0217056f77f1d8f49f2950ac6c278c0d607c45f5ee99328d792ede24ec"
dependencies = [ dependencies = [
"ab_glyph", "ab_glyph",
"log", "log",
"memmap2", "memmap2 0.9.8",
"smithay-client-toolkit 0.19.2", "smithay-client-toolkit 0.19.2",
"tiny-skia", "tiny-skia",
] ]
@ -6441,7 +6463,7 @@ dependencies = [
"cursor-icon", "cursor-icon",
"libc", "libc",
"log", "log",
"memmap2", "memmap2 0.9.8",
"rustix 0.38.44", "rustix 0.38.44",
"thiserror 1.0.69", "thiserror 1.0.69",
"wayland-backend", "wayland-backend",
@ -6467,7 +6489,7 @@ dependencies = [
"cursor-icon", "cursor-icon",
"libc", "libc",
"log", "log",
"memmap2", "memmap2 0.9.8",
"pkg-config", "pkg-config",
"rustix 1.1.2", "rustix 1.1.2",
"thiserror 2.0.16", "thiserror 2.0.16",
@ -6539,7 +6561,7 @@ dependencies = [
"foreign-types", "foreign-types",
"js-sys", "js-sys",
"log", "log",
"memmap2", "memmap2 0.9.8",
"objc", "objc",
"raw-window-handle", "raw-window-handle",
"redox_syscall 0.5.17", "redox_syscall 0.5.17",
@ -8779,7 +8801,7 @@ dependencies = [
"dpi", "dpi",
"js-sys", "js-sys",
"libc", "libc",
"memmap2", "memmap2 0.9.8",
"ndk", "ndk",
"objc2 0.5.2", "objc2 0.5.2",
"objc2-app-kit 0.2.2", "objc2-app-kit 0.2.2",
@ -8910,6 +8932,17 @@ dependencies = [
"windows-sys 0.59.0", "windows-sys 0.59.0",
] ]
[[package]]
name = "xkbcommon"
version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "13867d259930edc7091a6c41b4ce6eee464328c6ff9659b7e4c668ca20d4c91e"
dependencies = [
"libc",
"memmap2 0.8.0",
"xkeysym",
]
[[package]] [[package]]
name = "xkbcommon" name = "xkbcommon"
version = "0.8.0" version = "0.8.0"
@ -8917,7 +8950,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8d66ca9352cbd4eecbbc40871d8a11b4ac8107cfc528a6e14d7c19c69d0e1ac9" checksum = "8d66ca9352cbd4eecbbc40871d8a11b4ac8107cfc528a6e14d7c19c69d0e1ac9"
dependencies = [ dependencies = [
"libc", "libc",
"memmap2", "memmap2 0.9.8",
"xkeysym", "xkeysym",
] ]
@ -8928,7 +8961,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a7a974f48060a14e95705c01f24ad9c3345022f4d97441b8a36beb7ed5c4a02d" checksum = "a7a974f48060a14e95705c01f24ad9c3345022f4d97441b8a36beb7ed5c4a02d"
dependencies = [ dependencies = [
"libc", "libc",
"memmap2", "memmap2 0.9.8",
"xkeysym", "xkeysym",
] ]

View file

@ -40,12 +40,12 @@ rapidfuzz = "0.5.0"
# mupdf = "0.5.0" # mupdf = "0.5.0"
mupdf = { version = "0.5.0", git = "https://github.com/messense/mupdf-rs", rev="2425c1405b326165b06834dcc1ca859015f92787"} mupdf = { version = "0.5.0", git = "https://github.com/messense/mupdf-rs", rev="2425c1405b326165b06834dcc1ca859015f92787"}
rfd = { version = "0.15.4", default-features = false, features = ["xdg-portal"] } # rfd = { version = "0.15.4", default-features = false, features = ["xdg-portal"] }
[dependencies.libcosmic] [dependencies.libcosmic]
git = "https://github.com/pop-os/libcosmic" git = "https://github.com/pop-os/libcosmic"
default-features = false default-features = false
features = ["debug", "winit", "desktop", "winit_wgpu", "winit_tokio", "tokio", "rfd", "dbus-config", "a11y", "wgpu", "multi-window"] features = ["debug", "winit", "desktop", "winit_wgpu", "winit_tokio", "tokio", "wayland", "rfd", "dbus-config", "a11y", "wgpu", "multi-window", "process"]
[dependencies.iced_video_player] [dependencies.iced_video_player]
git = "https://github.com/jackpot51/iced_video_player.git" git = "https://github.com/jackpot51/iced_video_player.git"

View file

@ -621,8 +621,8 @@ impl cosmic::Application for App {
// debug!(?dnd_event); // debug!(?dnd_event);
None None
} }
iced::Event::PlatformSpecific(platform_specific) => { iced::Event::PlatformSpecific(_platform_specific) => {
debug!(?platform_specific); // debug!(?platform_specific);
None None
} }
} }

View file

@ -983,12 +983,18 @@ async fn add_images() -> Option<Vec<Image>> {
} }
async fn add_videos() -> Option<Vec<Video>> { async fn add_videos() -> Option<Vec<Video>> {
let paths = rfd::AsyncFileDialog::new() debug!("here man");
.set_title("Pick image") let paths =
.pick_files() Dialog::new().title("pick video").open_files().await.ok()?;
.await?; Some(
debug!(?paths); paths
Some(paths.iter().map(|path| Video::from(path.path())).collect()) .urls()
.iter()
.map(|path| {
Video::from(path.to_file_path().expect("oops"))
})
.collect(),
)
} }
fn update_in_db( fn update_in_db(