From e5eb6a8e83b15d20e727e754f31b8ee132cd3e3a Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Wed, 21 Jan 2026 10:16:18 -0700 Subject: [PATCH 01/13] Epoch 1.0.4 version update Generated by cosmic-epoch scripts/version-update.sh --- Cargo.lock | 630 ++++++++++++++++----------------- Cargo.toml | 2 +- cosmic-files-applet/Cargo.toml | 2 +- debian/changelog | 6 + 4 files changed, 318 insertions(+), 322 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 11810c8..582b414 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -294,9 +294,6 @@ name = "arbitrary" version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3d036a3c4ab069c7b410a2ce876bd74808d2d0888a82667669f8e783a898bf1" -dependencies = [ - "derive_arbitrary", -] [[package]] name = "arc-swap" @@ -315,7 +312,7 @@ checksum = "0ae92a5119aa49cdbcf6b9f893fe4e1d98b04ccbf82ee0584ad948a44a734dea" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -356,9 +353,9 @@ dependencies = [ [[package]] name = "ashpd" -version = "0.11.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6cbdf310d77fd3aaee6ea2093db7011dc2d35d2eb3481e5607f1f8d942ed99df" +checksum = "d2f3f79755c74fd155000314eb349864caa787c6592eace6c6882dad873d9c39" dependencies = [ "enumflags2", "futures-channel", @@ -372,14 +369,14 @@ dependencies = [ "wayland-backend", "wayland-client", "wayland-protocols", - "zbus 5.12.0", + "zbus 5.13.2", ] [[package]] name = "ashpd" -version = "0.12.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da0986d5b4f0802160191ad75f8d33ada000558757db3defb70299ca95d9fcbd" +checksum = "618a409b91d5265798a99e3d1d0b226911605e581c4e7255e83c1e397b172bce" dependencies = [ "enumflags2", "futures-channel", @@ -392,7 +389,7 @@ dependencies = [ "wayland-backend", "wayland-client", "wayland-protocols", - "zbus 5.12.0", + "zbus 5.13.2", ] [[package]] @@ -555,7 +552,7 @@ checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -590,7 +587,7 @@ checksum = "9035ad2d096bed7955a320ee7e2230574d28fd3c3a0f186cbea1ff3c7eed5dbb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -666,7 +663,7 @@ dependencies = [ "derive_utils", "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -690,7 +687,7 @@ dependencies = [ "num-traits", "pastey", "rayon", - "thiserror 2.0.17", + "thiserror 2.0.18", "v_frame", "y4m", ] @@ -752,7 +749,7 @@ dependencies = [ "regex", "rustc-hash 1.1.0", "shlex", - "syn 2.0.111", + "syn 2.0.114", "which", ] @@ -912,7 +909,7 @@ checksum = "f9abbd1bc6865053c427f7198e6af43bfdedc55ab791faed4fbd361d789575ff" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -1005,9 +1002,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.2.51" +version = "1.2.53" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a0aeaff4ff1a90589618835a598e545176939b97874f7abc7851caa0618f203" +checksum = "755d2fce177175ffca841e9a06afdb2c4ab0f593d53b4dee48147dfaade85932" dependencies = [ "find-msvc-tools", "jobserver", @@ -1071,9 +1068,9 @@ checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" [[package]] name = "chrono" -version = "0.4.42" +version = "0.4.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "145052bdd345b87320e369255277e3fb5152762ad123a901ef5c262dd38fe8d2" +checksum = "fac4744fb15ae8337dc853fee7fb3f4e48c0fbaa23d0afe49c447b4fab126118" dependencies = [ "iana-time-zone", "js-sys", @@ -1239,7 +1236,7 @@ dependencies = [ [[package]] name = "compio" version = "0.17.0" -source = "git+https://github.com/jackpot51/compio.git#28b864ca4f137637fe164ddfd1959db26d6faa71" +source = "git+https://github.com/jackpot51/compio.git#8235a1fcccde233362bb76df45b509c12ca79972" dependencies = [ "compio-buf", "compio-driver", @@ -1253,7 +1250,7 @@ dependencies = [ [[package]] name = "compio-buf" version = "0.7.1" -source = "git+https://github.com/jackpot51/compio.git#28b864ca4f137637fe164ddfd1959db26d6faa71" +source = "git+https://github.com/jackpot51/compio.git#8235a1fcccde233362bb76df45b509c12ca79972" dependencies = [ "arrayvec", "bytes", @@ -1263,7 +1260,7 @@ dependencies = [ [[package]] name = "compio-driver" version = "0.10.0" -source = "git+https://github.com/jackpot51/compio.git#28b864ca4f137637fe164ddfd1959db26d6faa71" +source = "git+https://github.com/jackpot51/compio.git#8235a1fcccde233362bb76df45b509c12ca79972" dependencies = [ "cfg-if", "cfg_aliases 0.2.1", @@ -1288,7 +1285,7 @@ dependencies = [ [[package]] name = "compio-fs" version = "0.10.0" -source = "git+https://github.com/jackpot51/compio.git#28b864ca4f137637fe164ddfd1959db26d6faa71" +source = "git+https://github.com/jackpot51/compio.git#8235a1fcccde233362bb76df45b509c12ca79972" dependencies = [ "cfg-if", "cfg_aliases 0.2.1", @@ -1305,7 +1302,7 @@ dependencies = [ [[package]] name = "compio-io" version = "0.8.4" -source = "git+https://github.com/jackpot51/compio.git#28b864ca4f137637fe164ddfd1959db26d6faa71" +source = "git+https://github.com/jackpot51/compio.git#8235a1fcccde233362bb76df45b509c12ca79972" dependencies = [ "compio-buf", "futures-util", @@ -1315,7 +1312,7 @@ dependencies = [ [[package]] name = "compio-log" version = "0.1.0" -source = "git+https://github.com/jackpot51/compio.git#28b864ca4f137637fe164ddfd1959db26d6faa71" +source = "git+https://github.com/jackpot51/compio.git#8235a1fcccde233362bb76df45b509c12ca79972" dependencies = [ "tracing", ] @@ -1323,18 +1320,18 @@ dependencies = [ [[package]] name = "compio-macros" version = "0.1.2" -source = "git+https://github.com/jackpot51/compio.git#28b864ca4f137637fe164ddfd1959db26d6faa71" +source = "git+https://github.com/jackpot51/compio.git#8235a1fcccde233362bb76df45b509c12ca79972" dependencies = [ "proc-macro-crate 3.4.0", "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] name = "compio-runtime" version = "0.10.1" -source = "git+https://github.com/jackpot51/compio.git#28b864ca4f137637fe164ddfd1959db26d6faa71" +source = "git+https://github.com/jackpot51/compio.git#8235a1fcccde233362bb76df45b509c12ca79972" dependencies = [ "async-task", "compio-buf", @@ -1452,7 +1449,7 @@ dependencies = [ [[package]] name = "cosmic-config" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic.git#dd3610b8ae4f1bcf2e2299e82f908913d1a4a57d" +source = "git+https://github.com/pop-os/libcosmic.git#689f25be539bb7163fe01dd3daaa253dc212f131" dependencies = [ "atomicwrites", "cosmic-config-derive", @@ -1467,21 +1464,21 @@ dependencies = [ "tokio", "tracing", "xdg", - "zbus 5.12.0", + "zbus 5.13.2", ] [[package]] name = "cosmic-config-derive" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic.git#dd3610b8ae4f1bcf2e2299e82f908913d1a4a57d" +source = "git+https://github.com/pop-os/libcosmic.git#689f25be539bb7163fe01dd3daaa253dc212f131" dependencies = [ "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] name = "cosmic-files" -version = "1.0.0" +version = "1.0.4" dependencies = [ "anyhow", "bzip2", @@ -1544,7 +1541,7 @@ dependencies = [ [[package]] name = "cosmic-files-applet" -version = "0.1.0" +version = "1.0.4" dependencies = [ "cosmic-files", "log", @@ -1560,7 +1557,7 @@ dependencies = [ "btoi", "memchr", "memmap2 0.9.9", - "thiserror 2.0.17", + "thiserror 2.0.18", "tracing", "xdg", ] @@ -1570,7 +1567,7 @@ name = "cosmic-mime-apps" version = "0.1.0" source = "git+https://github.com/pop-os/cosmic-mime-apps.git#157c516dbb9f2595da59c55b8cc9492070989279" dependencies = [ - "freedesktop-desktop-entry", + "freedesktop-desktop-entry 0.7.19", "mime 0.3.17", "quick-xml 0.38.4", "xdg", @@ -1593,7 +1590,7 @@ dependencies = [ [[package]] name = "cosmic-settings-config" version = "0.1.0" -source = "git+https://github.com/pop-os/cosmic-settings-daemon#9111bf0dfc65a4708a219d22616397819f6a6222" +source = "git+https://github.com/pop-os/cosmic-settings-daemon#ef024bfd06bf9fbd57246a25c91d1fdd28153d05" dependencies = [ "cosmic-config", "ron", @@ -1606,15 +1603,15 @@ dependencies = [ [[package]] name = "cosmic-settings-daemon" version = "0.1.0" -source = "git+https://github.com/pop-os/dbus-settings-bindings#b2337437d70b3db7a56211a43aa1632306711b2d" +source = "git+https://github.com/pop-os/dbus-settings-bindings#87c3c35666b926a24a1e8045fd70be2db1145e34" dependencies = [ - "zbus 5.12.0", + "zbus 5.13.2", ] [[package]] name = "cosmic-text" version = "0.16.0" -source = "git+https://github.com/pop-os/cosmic-text.git#0d9af4f7de087878100b296c81d1baca2e05433d" +source = "git+https://github.com/pop-os/cosmic-text.git#ee702e50901d90cd842dbd88154687bd2512b52c" dependencies = [ "bitflags 2.10.0", "fontdb 0.23.0", @@ -1637,7 +1634,7 @@ dependencies = [ [[package]] name = "cosmic-theme" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic.git#dd3610b8ae4f1bcf2e2299e82f908913d1a4a57d" +source = "git+https://github.com/pop-os/libcosmic.git#689f25be539bb7163fe01dd3daaa253dc212f131" dependencies = [ "almost", "cosmic-config", @@ -1647,7 +1644,7 @@ dependencies = [ "ron", "serde", "serde_json", - "thiserror 2.0.17", + "thiserror 2.0.18", ] [[package]] @@ -1803,7 +1800,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -1817,7 +1814,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -1828,7 +1825,7 @@ checksum = "fc34b93ccb385b40dc71c6fceac4b2ad23662c7eeb248cf10d529b7e055b6ead" dependencies = [ "darling_core 0.20.11", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -1839,7 +1836,7 @@ checksum = "d38308df82d1080de0afee5d069fa14b0326a88c14f15c5ccda35b4a6c414c81" dependencies = [ "darling_core 0.21.3", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -1875,17 +1872,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "derive_arbitrary" -version = "1.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e567bd82dcff979e4b03460c307b3cdc9e96fde3d73bed1496d2bc75d9dd62a" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.111", -] - [[package]] name = "derive_setters" version = "0.1.8" @@ -1895,7 +1881,7 @@ dependencies = [ "darling 0.20.11", "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -1906,7 +1892,7 @@ checksum = "ccfae181bab5ab6c5478b2ccb69e4c68a02f8c3ec72f6616bfec9dbc599d2ee0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -2009,7 +1995,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -2128,7 +2114,7 @@ checksum = "67c78a4d8fdf9953a5c9d458f9efe940fd97a0cab0941c075a813ac594733827" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -2171,7 +2157,7 @@ checksum = "44f23cf4b44bfce11a86ace86f8a73ffdec849c9fd00a386a53d278bd9e81fb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -2208,9 +2194,9 @@ dependencies = [ [[package]] name = "euclid" -version = "0.22.11" +version = "0.22.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad9cdb4b747e485a12abb0e6566612956c7a1bafa3bdb8d682c5b6d403589e48" +checksum = "df61bf483e837f88d5c2291dcf55c67be7e676b3a51acc48db3a7b163b91ed63" dependencies = [ "num-traits", ] @@ -2306,7 +2292,7 @@ checksum = "a0aca10fb742cb43f9e7bb8467c91aa9bcb8e3ffbc6a6f7389bb93ffc920577d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -2329,14 +2315,13 @@ dependencies = [ [[package]] name = "filetime" -version = "0.2.26" +version = "0.2.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc0505cd1b6fa6580283f6bdf70a73fcf4aba1184038c90902b92b3dd0df63ed" +checksum = "f98844151eee8917efc50bd9e8318cb963ae8b297431495d3f758616ea5c57db" dependencies = [ "cfg-if", "libc", "libredox", - "windows-sys 0.60.2", ] [[package]] @@ -2350,9 +2335,9 @@ dependencies = [ [[package]] name = "find-msvc-tools" -version = "0.1.6" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "645cbb3a84e60b7531617d5ae4e57f7e27308f6445f5abf653209ea76dec8dff" +checksum = "8591b0bcc8a98a64310a2fae1bb3e9b8564dd10e381e6e28010fde8e8e8568db" [[package]] name = "fixed_decimal" @@ -2367,13 +2352,13 @@ dependencies = [ [[package]] name = "flate2" -version = "1.1.5" +version = "1.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfe33edd8e85a12a67454e37f8c75e730830d83e313556ab9ebf9ee7fbeb3bfb" +checksum = "b375d6465b98090a5f25b1c7703f3859783755aa9a80433b36e0379a3ec2f369" dependencies = [ "crc32fast", - "libz-rs-sys", "miniz_oxide", + "zlib-rs", ] [[package]] @@ -2430,7 +2415,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "54f0d287c53ffd184d04d8677f590f4ac5379785529e5e08b1c8083acdd5c198" dependencies = [ "memchr", - "thiserror 2.0.17", + "thiserror 2.0.18", ] [[package]] @@ -2518,7 +2503,7 @@ checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -2555,7 +2540,22 @@ dependencies = [ "gettext-rs", "log", "memchr", - "thiserror 2.0.17", + "thiserror 2.0.18", + "unicase", + "xdg", +] + +[[package]] +name = "freedesktop-desktop-entry" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28273c5c6b97a5f07724f6652f064c0c7f637f9aa5e7c09c83bc3bc4ad4ea245" +dependencies = [ + "bstr", + "gettext-rs", + "log", + "memchr", + "thiserror 2.0.18", "unicase", "xdg", ] @@ -2664,7 +2664,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -2719,9 +2719,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.16" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592" +checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0" dependencies = [ "cfg-if", "libc", @@ -2735,9 +2735,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" dependencies = [ "cfg-if", + "js-sys", "libc", "r-efi", "wasip2", + "wasm-bindgen", ] [[package]] @@ -2858,7 +2860,7 @@ dependencies = [ "proc-macro-crate 3.4.0", "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -3154,7 +3156,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.111", + "syn 2.0.114", "unic-langid", ] @@ -3168,7 +3170,7 @@ dependencies = [ "i18n-config", "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -3198,7 +3200,7 @@ dependencies = [ [[package]] name = "iced" version = "0.14.0-dev" -source = "git+https://github.com/pop-os/libcosmic.git#dd3610b8ae4f1bcf2e2299e82f908913d1a4a57d" +source = "git+https://github.com/pop-os/libcosmic.git#689f25be539bb7163fe01dd3daaa253dc212f131" dependencies = [ "dnd", "iced_accessibility", @@ -3216,7 +3218,7 @@ dependencies = [ [[package]] name = "iced_accessibility" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic.git#dd3610b8ae4f1bcf2e2299e82f908913d1a4a57d" +source = "git+https://github.com/pop-os/libcosmic.git#689f25be539bb7163fe01dd3daaa253dc212f131" dependencies = [ "accesskit", "accesskit_winit", @@ -3225,7 +3227,7 @@ dependencies = [ [[package]] name = "iced_core" version = "0.14.0-dev" -source = "git+https://github.com/pop-os/libcosmic.git#dd3610b8ae4f1bcf2e2299e82f908913d1a4a57d" +source = "git+https://github.com/pop-os/libcosmic.git#689f25be539bb7163fe01dd3daaa253dc212f131" dependencies = [ "bitflags 2.10.0", "bytes", @@ -3249,7 +3251,7 @@ dependencies = [ [[package]] name = "iced_futures" version = "0.14.0-dev" -source = "git+https://github.com/pop-os/libcosmic.git#dd3610b8ae4f1bcf2e2299e82f908913d1a4a57d" +source = "git+https://github.com/pop-os/libcosmic.git#689f25be539bb7163fe01dd3daaa253dc212f131" dependencies = [ "futures", "iced_core", @@ -3275,7 +3277,7 @@ dependencies = [ [[package]] name = "iced_graphics" version = "0.14.0-dev" -source = "git+https://github.com/pop-os/libcosmic.git#dd3610b8ae4f1bcf2e2299e82f908913d1a4a57d" +source = "git+https://github.com/pop-os/libcosmic.git#689f25be539bb7163fe01dd3daaa253dc212f131" dependencies = [ "bitflags 2.10.0", "bytemuck", @@ -3297,7 +3299,7 @@ dependencies = [ [[package]] name = "iced_renderer" version = "0.14.0-dev" -source = "git+https://github.com/pop-os/libcosmic.git#dd3610b8ae4f1bcf2e2299e82f908913d1a4a57d" +source = "git+https://github.com/pop-os/libcosmic.git#689f25be539bb7163fe01dd3daaa253dc212f131" dependencies = [ "iced_graphics", "iced_tiny_skia", @@ -3309,7 +3311,7 @@ dependencies = [ [[package]] name = "iced_runtime" version = "0.14.0-dev" -source = "git+https://github.com/pop-os/libcosmic.git#dd3610b8ae4f1bcf2e2299e82f908913d1a4a57d" +source = "git+https://github.com/pop-os/libcosmic.git#689f25be539bb7163fe01dd3daaa253dc212f131" dependencies = [ "bytes", "cosmic-client-toolkit", @@ -3324,7 +3326,7 @@ dependencies = [ [[package]] name = "iced_tiny_skia" version = "0.14.0-dev" -source = "git+https://github.com/pop-os/libcosmic.git#dd3610b8ae4f1bcf2e2299e82f908913d1a4a57d" +source = "git+https://github.com/pop-os/libcosmic.git#689f25be539bb7163fe01dd3daaa253dc212f131" dependencies = [ "bytemuck", "cosmic-text", @@ -3340,7 +3342,7 @@ dependencies = [ [[package]] name = "iced_wgpu" version = "0.14.0-dev" -source = "git+https://github.com/pop-os/libcosmic.git#dd3610b8ae4f1bcf2e2299e82f908913d1a4a57d" +source = "git+https://github.com/pop-os/libcosmic.git#689f25be539bb7163fe01dd3daaa253dc212f131" dependencies = [ "as-raw-xcb-connection", "bitflags 2.10.0", @@ -3371,7 +3373,7 @@ dependencies = [ [[package]] name = "iced_widget" version = "0.14.0-dev" -source = "git+https://github.com/pop-os/libcosmic.git#dd3610b8ae4f1bcf2e2299e82f908913d1a4a57d" +source = "git+https://github.com/pop-os/libcosmic.git#689f25be539bb7163fe01dd3daaa253dc212f131" dependencies = [ "cosmic-client-toolkit", "dnd", @@ -3390,7 +3392,7 @@ dependencies = [ [[package]] name = "iced_winit" version = "0.14.0-dev" -source = "git+https://github.com/pop-os/libcosmic.git#dd3610b8ae4f1bcf2e2299e82f908913d1a4a57d" +source = "git+https://github.com/pop-os/libcosmic.git#689f25be539bb7163fe01dd3daaa253dc212f131" dependencies = [ "cosmic-client-toolkit", "dnd", @@ -3550,9 +3552,9 @@ dependencies = [ [[package]] name = "icu_datetime_data" -version = "2.1.1" +version = "2.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bf2a384725c67fcd32d27737bc7ba9dc5fe21311dfe3ba530f4b4d53e72bacc" +checksum = "46597233625417b7c8052a63d916e4fdc73df21614ac0b679492a5d6e3b01aeb" [[package]] name = "icu_decimal" @@ -3611,9 +3613,9 @@ dependencies = [ [[package]] name = "icu_experimental_data" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2578ea93f0373bb28800f7d1100e7e771c4d248d0d3759250fed08fa27694139" +checksum = "a0bce39e12480e91c7ddb748218050c459e241f491d130ea6ee92c3e5cd254f7" [[package]] name = "icu_list" @@ -3667,9 +3669,9 @@ dependencies = [ [[package]] name = "icu_locale_data" -version = "2.1.1" +version = "2.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f03e2fcaefecdf05619f3d6f91740e79ab969b4dd54f77cbf546b1d0d28e3147" +checksum = "1c5f1d16b4c3a2642d3a719f18f6b06070ab0aef246a6418130c955ae08aa831" [[package]] name = "icu_normalizer" @@ -3874,8 +3876,8 @@ dependencies = [ "rayon", "rgb", "tiff", - "zune-core 0.5.0", - "zune-jpeg 0.5.7", + "zune-core 0.5.1", + "zune-jpeg 0.5.11", ] [[package]] @@ -3922,9 +3924,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.12.1" +version = "2.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ad4bb2b565bca0645f4d68c5c9af97fba094e9791da685bf83cb5f3ce74acf2" +checksum = "7714e70437a7dc3ac8eb7e6f8df75fd8eb422675fc7678aff7364301092b1017" dependencies = [ "equivalent", "hashbrown 0.16.1", @@ -3987,7 +3989,7 @@ checksum = "c34819042dc3d3971c46c2190835914dfbe0c3c13f61449b2997f4e9722dfa60" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -4100,9 +4102,9 @@ checksum = "84de9d95a6d2547d9b77ee3f25fa0ee32e3c3a6484d47a55adebc0439c077992" [[package]] name = "jiff" -version = "0.2.17" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a87d9b8105c23642f50cbbae03d1f75d8422c5cb98ce7ee9271f7ff7505be6b8" +checksum = "e67e8da4c49d6d9909fe03361f9b620f58898859f5c7aded68351e85e71ecf50" dependencies = [ "jiff-static", "log", @@ -4113,13 +4115,13 @@ dependencies = [ [[package]] name = "jiff-static" -version = "0.2.17" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b787bebb543f8969132630c51fd0afab173a86c6abae56ff3b9e5e3e3f9f6e58" +checksum = "e0c84ee7f197eca9a86c6fd6cb771e55eb991632f15f2bc3ca6ec838929e6e78" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -4162,9 +4164,9 @@ checksum = "00810f1d8b74be64b13dbf3db89ac67740615d6c891f0e7b6179326533011a07" [[package]] name = "js-sys" -version = "0.3.83" +version = "0.3.85" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "464a3709c7f55f1f721e5389aa6ea4e3bc6aba669353300af094b29ffbdde1d8" +checksum = "8c942ebf8e95485ca0d52d97da7c5a2c387d0e7f0ba4c35e93bfcaee045955b3" dependencies = [ "once_cell", "wasm-bindgen", @@ -4452,17 +4454,17 @@ checksum = "2c4a545a15244c7d945065b5d392b2d2d7f21526fba56ce51467b06ed445e8f7" [[package]] name = "libc" -version = "0.2.178" +version = "0.2.180" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37c93d8daa9d8a012fd8ab92f088405fb202ea0b6ab73ee2482ae66af4f42091" +checksum = "bcc35a38544a891a5f7c865aca548a982ccb3b8650a5b06d0fd33a10283c56fc" [[package]] name = "libcosmic" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic.git#dd3610b8ae4f1bcf2e2299e82f908913d1a4a57d" +source = "git+https://github.com/pop-os/libcosmic.git#689f25be539bb7163fe01dd3daaa253dc212f131" dependencies = [ "apply", - "ashpd 0.12.0", + "ashpd 0.12.1", "auto_enums", "chrono", "cosmic-client-toolkit", @@ -4473,7 +4475,7 @@ dependencies = [ "cosmic-theme", "css-color", "derive_setters", - "freedesktop-desktop-entry", + "freedesktop-desktop-entry 0.8.1", "futures", "i18n-embed", "i18n-embed-fl", @@ -4500,12 +4502,12 @@ dependencies = [ "shlex", "slotmap", "taffy", - "thiserror 2.0.17", + "thiserror 2.0.18", "tokio", "tracing", "unicode-segmentation", "url", - "zbus 5.12.0", + "zbus 5.13.2", ] [[package]] @@ -4545,15 +4547,6 @@ dependencies = [ "redox_syscall 0.7.0", ] -[[package]] -name = "libz-rs-sys" -version = "0.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c10501e7805cee23da17c7790e59df2870c0d4043ec6d03f67d31e2b53e77415" -dependencies = [ - "zlib-rs", -] - [[package]] name = "linebender_resource_handle" version = "0.1.1" @@ -4693,9 +4686,9 @@ dependencies = [ [[package]] name = "lzma-rust2" -version = "0.15.4" +version = "0.15.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48172246aa7c3ea28e423295dd1ca2589a24617cc4e588bb8cfe177cb2c54d95" +checksum = "1670343e58806300d87950e3401e820b519b9384281bbabfb15e3636689ffd69" dependencies = [ "crc", "sha2", @@ -4888,7 +4881,7 @@ dependencies = [ "cfg_aliases 0.1.1", "codespan-reporting", "hexf-parse", - "indexmap 2.12.1", + "indexmap 2.13.0", "log", "rustc-hash 1.1.0", "spirv", @@ -4967,19 +4960,6 @@ dependencies = [ "memoffset 0.9.1", ] -[[package]] -name = "nix" -version = "0.30.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74523f3a35e05aba87a1d978330aef40f67b0304ac79c1c00b294c9830543db6" -dependencies = [ - "bitflags 2.10.0", - "cfg-if", - "cfg_aliases 0.2.1", - "libc", - "memoffset 0.9.1", -] - [[package]] name = "nom" version = "7.1.3" @@ -5047,7 +5027,7 @@ dependencies = [ "mac-notification-sys", "serde", "tauri-winrt-notification", - "zbus 5.12.0", + "zbus 5.13.2", ] [[package]] @@ -5089,7 +5069,7 @@ checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -5151,7 +5131,7 @@ dependencies = [ "proc-macro-crate 3.4.0", "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -5462,10 +5442,11 @@ checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" [[package]] name = "orbclient" -version = "0.3.49" +version = "0.3.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "247ad146e19b9437f8604c21f8652423595cf710ad108af40e77d3ae6e96b827" +checksum = "52ad2c6bae700b7aa5d1cc30c59bdd3a1c180b09dbaea51e2ae2b8e1cf211fdd" dependencies = [ + "libc", "libredox", ] @@ -5481,11 +5462,11 @@ dependencies = [ [[package]] name = "ordermap" -version = "1.0.0" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed637741ced8fb240855d22a2b4f208dab7a06bcce73380162e5253000c16758" +checksum = "cfa78c92071bbd3628c22b1a964f7e0eb201dc1456555db072beb1662ecd6715" dependencies = [ - "indexmap 2.12.1", + "indexmap 2.13.0", "serde", "serde_core", ] @@ -5497,7 +5478,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7d8fae84b431384b68627d0f9b3b1245fcf9f46f6c0e3dc902e9dce64edd1967" dependencies = [ "libc", - "windows-sys 0.45.0", + "windows-sys 0.61.2", ] [[package]] @@ -5521,7 +5502,7 @@ dependencies = [ "proc-macro2", "proc-macro2-diagnostics", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -5555,7 +5536,7 @@ dependencies = [ "by_address", "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -5697,7 +5678,7 @@ dependencies = [ "phf_shared 0.11.3", "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -5710,7 +5691,7 @@ dependencies = [ "phf_shared 0.13.1", "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -5754,7 +5735,7 @@ checksum = "6e918e4ff8c4549eb882f14b3a4bc8c8bc93de829416eacf579f1207a8fbf861" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -5908,7 +5889,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b" dependencies = [ "proc-macro2", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -5949,14 +5930,14 @@ dependencies = [ "proc-macro-error-attr2", "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] name = "proc-macro2" -version = "1.0.104" +version = "1.0.105" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9695f8df41bb4f3d222c95a67532365f569318332d03d5f3f67f37b20e6ebdf0" +checksum = "535d180e0ecab6268a3e718bb9fd44db66bbbc256257165fc699dadf70d16fe7" dependencies = [ "unicode-ident", ] @@ -5969,7 +5950,7 @@ checksum = "af066a9c399a26e020ada66a034357a868728e72cd426f3adcd35f80d88d88c8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", "version_check", "yansi", ] @@ -6014,7 +5995,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "52717f9a02b6965224f95ca2a81e2e0c5c43baacd28ca057577988930b6c3d5b" dependencies = [ "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -6077,9 +6058,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.42" +version = "1.0.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a338cc41d27e6cc6dce6cefc13a0729dfbb81c262b1f519331575dd80ef3067f" +checksum = "dc74d9a594b72ae6656596548f56f667211f8a97b3d4c3d467150794690dc40a" dependencies = [ "proc-macro2", ] @@ -6108,7 +6089,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1" dependencies = [ "rand_chacha 0.9.0", - "rand_core 0.9.3", + "rand_core 0.9.5", ] [[package]] @@ -6128,7 +6109,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" dependencies = [ "ppv-lite86", - "rand_core 0.9.3", + "rand_core 0.9.5", ] [[package]] @@ -6137,14 +6118,14 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.16", + "getrandom 0.2.17", ] [[package]] name = "rand_core" -version = "0.9.3" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38" +checksum = "76afc826de14238e6e8c374ddcc1fa19e374fd8dd986b0d2af0d02377261d83c" dependencies = [ "getrandom 0.3.4", ] @@ -6191,7 +6172,7 @@ dependencies = [ "rand 0.9.2", "rand_chacha 0.9.0", "simd_helpers", - "thiserror 2.0.17", + "thiserror 2.0.18", "v_frame", "wasm-bindgen", ] @@ -6306,7 +6287,7 @@ version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" dependencies = [ - "getrandom 0.2.16", + "getrandom 0.2.17", "libredox", "thiserror 1.0.69", ] @@ -6317,9 +6298,9 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4e608c6638b9c18977b00b475ac1f28d14e84b27d8d42f70e0bf1e3dec127ac" dependencies = [ - "getrandom 0.2.16", + "getrandom 0.2.17", "libredox", - "thiserror 2.0.17", + "thiserror 2.0.18", ] [[package]] @@ -6339,7 +6320,7 @@ checksum = "b7186006dcb21920990093f30e3dea63b7d6e977bf1256be20c3563a5db070da" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -6399,7 +6380,7 @@ version = "0.15.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ef2bee61e6cffa4635c72d7d81a84294e28f0930db0ddcb0f66d10244674ebed" dependencies = [ - "ashpd 0.11.0", + "ashpd 0.11.1", "block2 0.6.2", "dispatch2", "js-sys", @@ -6447,9 +6428,9 @@ checksum = "6c20b6793b5c2fa6553b250154b78d6d0db37e72700ae35fad9387a46f487c97" [[package]] name = "rust-embed" -version = "8.9.0" +version = "8.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "947d7f3fad52b283d261c4c99a084937e2fe492248cb9a68a8435a861b8798ca" +checksum = "04113cb9355a377d83f06ef1f0a45b8ab8cd7d8b1288160717d66df5c7988d27" dependencies = [ "rust-embed-impl", "rust-embed-utils", @@ -6458,22 +6439,22 @@ dependencies = [ [[package]] name = "rust-embed-impl" -version = "8.9.0" +version = "8.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fa2c8c9e8711e10f9c4fd2d64317ef13feaab820a4c51541f1a8c8e2e851ab2" +checksum = "da0902e4c7c8e997159ab384e6d0fc91c221375f6894346ae107f47dd0f3ccaa" dependencies = [ "proc-macro2", "quote", "rust-embed-utils", - "syn 2.0.111", + "syn 2.0.114", "walkdir", ] [[package]] name = "rust-embed-utils" -version = "8.9.0" +version = "8.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60b161f275cb337fe0a44d924a5f4df0ed69c2c39519858f931ce61c779d3475" +checksum = "5bcdef0be6fe7f6fa333b1073c949729274b05f123a0ad7efcb8efd878e5c3b1" dependencies = [ "sha2", "walkdir", @@ -6613,9 +6594,9 @@ dependencies = [ [[package]] name = "self_cell" -version = "1.2.1" +version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16c2f82143577edb4921b71ede051dac62ca3c16084e918bf7b40c96ae10eb33" +checksum = "b12e76d157a900eb52e81bc6e9f3069344290341720e9178cde2407113ac8d89" [[package]] name = "serde" @@ -6644,16 +6625,16 @@ checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] name = "serde_json" -version = "1.0.148" +version = "1.0.149" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3084b546a1dd6289475996f182a22aba973866ea8e8b02c51d9f46b1336a22da" +checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86" dependencies = [ - "indexmap 2.12.1", + "indexmap 2.13.0", "itoa", "memchr", "serde", @@ -6669,7 +6650,7 @@ checksum = "175ee3e80ae9982737ca543e96133087cbd9a485eecc3bc4de9c1a37b47ea59c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -6691,7 +6672,7 @@ dependencies = [ "chrono", "hex", "indexmap 1.9.3", - "indexmap 2.12.1", + "indexmap 2.13.0", "schemars 0.9.0", "schemars 1.2.0", "serde_core", @@ -6709,7 +6690,7 @@ dependencies = [ "darling 0.21.3", "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -6871,7 +6852,7 @@ dependencies = [ "memmap2 0.9.9", "pkg-config", "rustix 1.1.3", - "thiserror 2.0.17", + "thiserror 2.0.18", "wayland-backend", "wayland-client", "wayland-csd-frame", @@ -7046,9 +7027,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.111" +version = "2.0.114" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "390cc9a294ab71bdb1aa2e99d13be9c753cd2d7bd6560c77118597410c4d2e87" +checksum = "d4d107df263a3013ef9b1879b0df87d706ff80f65a86ea879bd9c31f9b307c2a" dependencies = [ "proc-macro2", "quote", @@ -7063,7 +7044,7 @@ checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -7084,7 +7065,7 @@ dependencies = [ "cfg-expr", "heck 0.5.0", "pkg-config", - "toml 0.9.10+spec-1.1.0", + "toml 0.9.11+spec-1.1.0", "version-compare", ] @@ -7124,7 +7105,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b1e66e07de489fe43a46678dd0b8df65e0c973909df1b60ba33874e297ba9b9" dependencies = [ "quick-xml 0.37.5", - "thiserror 2.0.17", + "thiserror 2.0.18", "windows 0.61.3", "windows-version", ] @@ -7176,7 +7157,7 @@ checksum = "be35209fd0781c5401458ab66e4f98accf63553e8fae7425503e92fdd319783b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -7196,11 +7177,11 @@ dependencies = [ [[package]] name = "thiserror" -version = "2.0.17" +version = "2.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f63587ca0f12b72a0600bcba1d40081f830876000bb46dd2337a3051618f4fc8" +checksum = "4288b5bcbc7920c07a1149a35cf9590a2aa808e0bc1eafaade0b80947865fbc4" dependencies = [ - "thiserror-impl 2.0.17", + "thiserror-impl 2.0.18", ] [[package]] @@ -7211,18 +7192,18 @@ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] name = "thiserror-impl" -version = "2.0.17" +version = "2.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ff15c8ecd7de3849db632e14d18d2571fa09dfc5ed93479bc4485c7a517c913" +checksum = "ebc4ee7f67670e9b64d05fa4253e753e016c6c95ff35b89b7941d6b856dec1d5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -7270,30 +7251,31 @@ dependencies = [ [[package]] name = "time" -version = "0.3.44" +version = "0.3.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91e7d9e3bb61134e77bde20dd4825b97c010155709965fedf0f49bb138e52a9d" +checksum = "f9e442fc33d7fdb45aa9bfeb312c095964abdf596f7567261062b2a7107aaabd" dependencies = [ "deranged", "itoa", + "js-sys", "num-conv", "powerfmt", - "serde", + "serde_core", "time-core", "time-macros", ] [[package]] name = "time-core" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40868e7c1d2f0b8d73e4a8c7f0ff63af4f6d19be117e90bd73eb1d62cf831c6b" +checksum = "8b36ee98fd31ec7426d599183e8fe26932a8dc1fb76ddb6214d05493377d34ca" [[package]] name = "time-macros" -version = "0.2.24" +version = "0.2.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30cfb0125f12d9c277f35663a0a33f8c30190f4e4574868a330595412d34ebf3" +checksum = "71e552d1249bf61ac2a52db88179fd0673def1e1ad8243a00d9ec9ed71fee3dd" dependencies = [ "num-conv", "time-core", @@ -7366,9 +7348,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.48.0" +version = "1.49.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff360e02eab121e0bc37a2d3b4d4dc622e6eda3a8e5253d5435ecf5bd4c68408" +checksum = "72a2903cd7736441aac9df9d7688bd0ce48edccaadf181c3b90be801e81d3d86" dependencies = [ "bytes", "libc", @@ -7389,14 +7371,14 @@ checksum = "af407857209536a95c8e56f8231ef2c2e2aff839b22e07a1ffcbc617e9db9fa5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] name = "tokio-stream" -version = "0.1.17" +version = "0.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eca58d7bba4a75707817a2c44174253f9236b2d5fbd055602e9d5c07c139a047" +checksum = "32da49809aab5c3bc678af03902d4ccddea2a87d028d86392a4b1560c6906c70" dependencies = [ "futures-core", "pin-project-lite", @@ -7414,11 +7396,11 @@ dependencies = [ [[package]] name = "toml" -version = "0.9.10+spec-1.1.0" +version = "0.9.11+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0825052159284a1a8b4d6c0c86cbc801f2da5afd2b225fa548c72f2e74002f48" +checksum = "f3afc9a848309fe1aaffaed6e1546a7a14de1f935dc9d89d32afd9a44bab7c46" dependencies = [ - "indexmap 2.12.1", + "indexmap 2.13.0", "serde_core", "serde_spanned", "toml_datetime 0.7.5+spec-1.1.0", @@ -7448,7 +7430,7 @@ version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap 2.12.1", + "indexmap 2.13.0", "toml_datetime 0.6.11", "winnow 0.5.40", ] @@ -7459,7 +7441,7 @@ version = "0.23.10+spec-1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "84c8b9f757e028cee9fa244aea147aab2a9ec09d5325a9b01e0a49730c2b5269" dependencies = [ - "indexmap 2.12.1", + "indexmap 2.13.0", "toml_datetime 0.7.5+spec-1.1.0", "toml_parser", "winnow 0.7.14", @@ -7500,7 +7482,7 @@ checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -7582,6 +7564,12 @@ dependencies = [ "rustc-hash 2.1.1", ] +[[package]] +name = "typed-path" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7922f2cdc51280d47b491af9eafc41eb0cdab85eabcb390c854412fcbf26dbe8" + [[package]] name = "typenum" version = "1.19.0" @@ -7620,9 +7608,9 @@ dependencies = [ [[package]] name = "unicase" -version = "2.8.1" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75b844d17643ee918803943289730bec8aac480150456169e647ed0b576ba539" +checksum = "dbc4bc3a9f746d862c45cb89d705aa10f187bb96c76001afab07a0d35ce60142" [[package]] name = "unicode-bidi" @@ -7692,14 +7680,15 @@ checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" [[package]] name = "url" -version = "2.5.7" +version = "2.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08bc136a29a3d1758e07a9cca267be308aeebf5cfd5a10f3f67ab2097683ef5b" +checksum = "ff67a8a4397373c3ef660812acab3268222035010ab8680ec4215f38ba3d0eed" dependencies = [ "form_urlencoded", "idna", "percent-encoding", "serde", + "serde_derive", ] [[package]] @@ -7836,9 +7825,9 @@ dependencies = [ [[package]] name = "wasm-bindgen" -version = "0.2.106" +version = "0.2.108" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d759f433fa64a2d763d1340820e46e111a7a5ab75f993d1852d70b03dbb80fd" +checksum = "64024a30ec1e37399cf85a7ffefebdb72205ca1c972291c51512360d90bd8566" dependencies = [ "cfg-if", "once_cell", @@ -7849,11 +7838,12 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.56" +version = "0.4.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "836d9622d604feee9e5de25ac10e3ea5f2d65b41eac0d9ce72eb5deae707ce7c" +checksum = "70a6e77fd0ae8029c9ea0063f87c46fde723e7d887703d74ad2616d792e51e6f" dependencies = [ "cfg-if", + "futures-util", "js-sys", "once_cell", "wasm-bindgen", @@ -7862,9 +7852,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.106" +version = "0.2.108" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48cb0d2638f8baedbc542ed444afc0644a29166f1595371af4fecf8ce1e7eeb3" +checksum = "008b239d9c740232e71bd39e8ef6429d27097518b6b30bdf9086833bd5b6d608" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -7872,22 +7862,22 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.106" +version = "0.2.108" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cefb59d5cd5f92d9dcf80e4683949f15ca4b511f4ac0a6e14d4e1ac60c6ecd40" +checksum = "5256bae2d58f54820e6490f9839c49780dff84c65aeab9e772f15d5f0e913a55" dependencies = [ "bumpalo", "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.106" +version = "0.2.108" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbc538057e648b67f72a982e708d485b2efa771e1ac05fec311f9f63e5800db4" +checksum = "1f01b580c9ac74c8d8f0c0e4afb04eeef2acf145458e52c03845ee9cd23e3d12" dependencies = [ "unicode-ident", ] @@ -7909,9 +7899,9 @@ dependencies = [ [[package]] name = "wayland-backend" -version = "0.3.11" +version = "0.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "673a33c33048a5ade91a6b139580fa174e19fb0d23f396dca9fa15f2e1e49b35" +checksum = "fee64194ccd96bf648f42a65a7e589547096dfa702f7cadef84347b66ad164f9" dependencies = [ "cc", "downcast-rs", @@ -7923,9 +7913,9 @@ dependencies = [ [[package]] name = "wayland-client" -version = "0.31.11" +version = "0.31.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c66a47e840dc20793f2264eb4b3e4ecb4b75d91c0dd4af04b456128e0bdd449d" +checksum = "b8e6faa537fbb6c186cb9f1d41f2f811a4120d1b57ec61f50da451a0c5122bec" dependencies = [ "bitflags 2.10.0", "rustix 1.1.3", @@ -7946,9 +7936,9 @@ dependencies = [ [[package]] name = "wayland-cursor" -version = "0.31.11" +version = "0.31.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "447ccc440a881271b19e9989f75726d60faa09b95b0200a9b7eb5cc47c3eeb29" +checksum = "5864c4b5b6064b06b1e8b74ead4a98a6c45a285fe7a0e784d24735f011fdb078" dependencies = [ "rustix 1.1.3", "wayland-client", @@ -7957,9 +7947,9 @@ dependencies = [ [[package]] name = "wayland-protocols" -version = "0.32.9" +version = "0.32.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efa790ed75fbfd71283bd2521a1cfdc022aabcc28bdcff00851f9e4ae88d9901" +checksum = "baeda9ffbcfc8cd6ddaade385eaf2393bd2115a69523c735f12242353c3df4f3" dependencies = [ "bitflags 2.10.0", "wayland-backend", @@ -7983,9 +7973,9 @@ dependencies = [ [[package]] name = "wayland-protocols-misc" -version = "0.3.9" +version = "0.3.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dfe33d551eb8bffd03ff067a8b44bb963919157841a99957151299a6307d19c" +checksum = "791c58fdeec5406aa37169dd815327d1e47f334219b523444bc26d70ceb4c34e" dependencies = [ "bitflags 2.10.0", "wayland-backend", @@ -7996,9 +7986,9 @@ dependencies = [ [[package]] name = "wayland-protocols-plasma" -version = "0.3.9" +version = "0.3.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a07a14257c077ab3279987c4f8bb987851bf57081b93710381daea94f2c2c032" +checksum = "aa98634619300a535a9a97f338aed9a5ff1e01a461943e8346ff4ae26007306b" dependencies = [ "bitflags 2.10.0", "wayland-backend", @@ -8009,9 +7999,9 @@ dependencies = [ [[package]] name = "wayland-protocols-wlr" -version = "0.3.9" +version = "0.3.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efd94963ed43cf9938a090ca4f7da58eb55325ec8200c3848963e98dc25b78ec" +checksum = "e9597cdf02cf0c34cd5823786dce6b5ae8598f05c2daf5621b6e178d4f7345f3" dependencies = [ "bitflags 2.10.0", "wayland-backend", @@ -8023,20 +8013,20 @@ dependencies = [ [[package]] name = "wayland-scanner" -version = "0.31.7" +version = "0.31.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54cb1e9dc49da91950bdfd8b848c49330536d9d1fb03d4bfec8cae50caa50ae3" +checksum = "5423e94b6a63e68e439803a3e153a9252d5ead12fd853334e2ad33997e3889e3" dependencies = [ "proc-macro2", - "quick-xml 0.37.5", + "quick-xml 0.38.4", "quote", ] [[package]] name = "wayland-server" -version = "0.31.10" +version = "0.31.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcbd4f3aba6c9fba70445ad2a484c0ef0356c1a9459b1e8e435bedc1971a6222" +checksum = "9297ab90f8d1f597711d36455c5b1b2290eca59b8134485e377a296b80b118c9" dependencies = [ "bitflags 2.10.0", "downcast-rs", @@ -8047,9 +8037,9 @@ dependencies = [ [[package]] name = "wayland-sys" -version = "0.31.7" +version = "0.31.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34949b42822155826b41db8e5d0c1be3a2bd296c747577a43a3e6daefc296142" +checksum = "1e6dbfc3ac5ef974c92a2235805cc0114033018ae1290a72e474aa8b28cbbdfd" dependencies = [ "dlib", "log", @@ -8059,9 +8049,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.83" +version = "0.3.85" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b32828d774c412041098d182a8b38b16ea816958e07cf40eec2bc080ae137ac" +checksum = "312e32e551d92129218ea9a2452120f4aabc03529ef03e4d0d82fb2780608598" dependencies = [ "js-sys", "wasm-bindgen", @@ -8119,7 +8109,7 @@ dependencies = [ "bitflags 2.10.0", "cfg_aliases 0.1.1", "document-features", - "indexmap 2.12.1", + "indexmap 2.13.0", "log", "naga", "once_cell", @@ -8383,7 +8373,7 @@ checksum = "942ac266be9249c84ca862f0a164a39533dc2f6f33dc98ec89c8da99b82ea0bd" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -8394,7 +8384,7 @@ checksum = "f6fc35f58ecd95a9b71c4f2329b911016e6bec66b3f2e6a4aad86bd2e99e2f9b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -8405,7 +8395,7 @@ checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -8416,7 +8406,7 @@ checksum = "da33557140a288fae4e1d5f8873aaf9eb6613a9cf82c3e070223ff177f598b60" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -8427,7 +8417,7 @@ checksum = "08990546bf4edef8f431fa6326e032865f27138718c587dc21bc0265bbcb57cc" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -8438,7 +8428,7 @@ checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -9094,7 +9084,7 @@ checksum = "b659052874eb698efe5b9e8cf382204678a0086ebf46982b79d6ca3182927e5d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", "synstructure", ] @@ -9174,9 +9164,9 @@ dependencies = [ [[package]] name = "zbus" -version = "5.12.0" +version = "5.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b622b18155f7a93d1cd2dc8c01d2d6a44e08fb9ebb7b3f9e6ed101488bad6c91" +checksum = "1bfeff997a0aaa3eb20c4652baf788d2dfa6d2839a0ead0b3ff69ce2f9c4bdd1" dependencies = [ "async-broadcast 0.7.2", "async-executor", @@ -9192,8 +9182,9 @@ dependencies = [ "futures-core", "futures-lite 2.6.1", "hex", - "nix 0.30.1", + "libc", "ordered-stream", + "rustix 1.1.3", "serde", "serde_repr", "tokio", @@ -9202,9 +9193,9 @@ dependencies = [ "uuid", "windows-sys 0.61.2", "winnow 0.7.14", - "zbus_macros 5.12.0", - "zbus_names 4.2.0", - "zvariant 5.8.0", + "zbus_macros 5.13.2", + "zbus_names 4.3.1", + "zvariant 5.9.2", ] [[package]] @@ -9230,23 +9221,23 @@ dependencies = [ "proc-macro-crate 3.4.0", "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", "zvariant_utils 2.1.0", ] [[package]] name = "zbus_macros" -version = "5.12.0" +version = "5.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cdb94821ca8a87ca9c298b5d1cbd80e2a8b67115d99f6e4551ac49e42b6a314" +checksum = "0bbd5a90dbe8feee5b13def448427ae314ccd26a49cac47905cafefb9ff846f1" dependencies = [ "proc-macro-crate 3.4.0", "proc-macro2", "quote", - "syn 2.0.111", - "zbus_names 4.2.0", - "zvariant 5.8.0", - "zvariant_utils 3.2.1", + "syn 2.0.114", + "zbus_names 4.3.1", + "zvariant 5.9.2", + "zvariant_utils 3.3.0", ] [[package]] @@ -9273,14 +9264,13 @@ dependencies = [ [[package]] name = "zbus_names" -version = "4.2.0" +version = "4.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7be68e64bf6ce8db94f63e72f0c7eb9a60d733f7e0499e628dfab0f84d6bcb97" +checksum = "ffd8af6d5b78619bab301ff3c560a5bd22426150253db278f164d6cf3b72c50f" dependencies = [ "serde", - "static_assertions", "winnow 0.7.14", - "zvariant 5.8.0", + "zvariant 5.9.2", ] [[package]] @@ -9291,22 +9281,22 @@ checksum = "6df3dc4292935e51816d896edcd52aa30bc297907c26167fec31e2b0c6a32524" [[package]] name = "zerocopy" -version = "0.8.31" +version = "0.8.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd74ec98b9250adb3ca554bdde269adf631549f51d8a8f8f0a10b50f1cb298c3" +checksum = "668f5168d10b9ee831de31933dc111a459c97ec93225beb307aed970d1372dfd" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.8.31" +version = "0.8.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8a8d209fdf45cf5138cbb5a506f6b52522a25afccc534d1475dad8e31105c6a" +checksum = "2c7962b26b0a8685668b671ee4b54d007a67d4eaf05fda79ac0ecf41e32270f1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -9326,7 +9316,7 @@ checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", "synstructure", ] @@ -9347,7 +9337,7 @@ checksum = "85a5b4158499876c763cb03bc4e49185d3cccbabb15b33c627f7884f43db852e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] @@ -9381,17 +9371,16 @@ checksum = "eadce39539ca5cb3985590102671f2567e659fca9666581ad3411d59207951f3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] name = "zip" -version = "7.0.0" +version = "7.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdd8a47718a4ee5fe78e07667cd36f3de80e7c2bfe727c7074245ffc7303c037" +checksum = "c42e33efc22a0650c311c2ef19115ce232583abbe80850bc8b66509ebef02de0" dependencies = [ "aes", - "arbitrary", "bzip2", "constant_time_eq", "crc32fast", @@ -9400,13 +9389,14 @@ dependencies = [ "generic-array", "getrandom 0.3.4", "hmac", - "indexmap 2.12.1", + "indexmap 2.13.0", "lzma-rust2", "memchr", "pbkdf2", "ppmd-rust", "sha1", "time", + "typed-path", "zeroize", "zopfli", "zstd", @@ -9420,9 +9410,9 @@ checksum = "40990edd51aae2c2b6907af74ffb635029d5788228222c4bb811e9351c0caad3" [[package]] name = "zmij" -version = "1.0.2" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f4a4e8e9dc5c62d159f04fcdbe07f4c3fb710415aab4754bf11505501e3251d" +checksum = "dfcd145825aace48cff44a8844de64bf75feec3080e0aa5cdbde72961ae51a65" [[package]] name = "zopfli" @@ -9472,9 +9462,9 @@ checksum = "3f423a2c17029964870cfaabb1f13dfab7d092a62a29a89264f4d36990ca414a" [[package]] name = "zune-core" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "111f7d9820f05fd715df3144e254d6fc02ee4088b0644c0ffd0efc9e6d9d2773" +checksum = "cb8a0807f7c01457d0379ba880ba6322660448ddebc890ce29bb64da71fb40f9" [[package]] name = "zune-inflate" @@ -9496,11 +9486,11 @@ dependencies = [ [[package]] name = "zune-jpeg" -version = "0.5.7" +version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51d915729b0e7d5fe35c2f294c5dc10b30207cc637920e5b59077bfa3da63f28" +checksum = "2959ca473aae96a14ecedf501d20b3608d2825ba280d5adb57d651721885b0c2" dependencies = [ - "zune-core 0.5.0", + "zune-core 0.5.1", ] [[package]] @@ -9532,17 +9522,17 @@ dependencies = [ [[package]] name = "zvariant" -version = "5.8.0" +version = "5.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2be61892e4f2b1772727be11630a62664a1826b62efa43a6fe7449521cb8744c" +checksum = "68b64ef4f40c7951337ddc7023dd03528a57a3ce3408ee9da5e948bd29b232c4" dependencies = [ "endi", "enumflags2", "serde", "url", "winnow 0.7.14", - "zvariant_derive 5.8.0", - "zvariant_utils 3.2.1", + "zvariant_derive 5.9.2", + "zvariant_utils 3.3.0", ] [[package]] @@ -9567,21 +9557,21 @@ dependencies = [ "proc-macro-crate 3.4.0", "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", "zvariant_utils 2.1.0", ] [[package]] name = "zvariant_derive" -version = "5.8.0" +version = "5.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da58575a1b2b20766513b1ec59d8e2e68db2745379f961f86650655e862d2006" +checksum = "484d5d975eb7afb52cc6b929c13d3719a20ad650fea4120e6310de3fc55e415c" dependencies = [ "proc-macro-crate 3.4.0", "proc-macro2", "quote", - "syn 2.0.111", - "zvariant_utils 3.2.1", + "syn 2.0.114", + "zvariant_utils 3.3.0", ] [[package]] @@ -9603,18 +9593,18 @@ checksum = "c51bcff7cc3dbb5055396bcf774748c3dab426b4b8659046963523cee4808340" dependencies = [ "proc-macro2", "quote", - "syn 2.0.111", + "syn 2.0.114", ] [[package]] name = "zvariant_utils" -version = "3.2.1" +version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6949d142f89f6916deca2232cf26a8afacf2b9fdc35ce766105e104478be599" +checksum = "f75c23a64ef8f40f13a6989991e643554d9bef1d682a281160cf0c1bc389c5e9" dependencies = [ "proc-macro2", "quote", "serde", - "syn 2.0.111", + "syn 2.0.114", "winnow 0.7.14", ] diff --git a/Cargo.toml b/Cargo.toml index 22a57b5..bbc854e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmic-files" -version = "1.0.0" +version = "1.0.4" authors = ["Jeremy Soller "] edition = "2024" license = "GPL-3.0-only" diff --git a/cosmic-files-applet/Cargo.toml b/cosmic-files-applet/Cargo.toml index f26222f..a6358bc 100644 --- a/cosmic-files-applet/Cargo.toml +++ b/cosmic-files-applet/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmic-files-applet" -version = "0.1.0" +version = "1.0.4" edition = "2024" [dependencies] diff --git a/debian/changelog b/debian/changelog index 188a991..8febe43 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +cosmic-files (1.0.4) noble; urgency=medium + + * Epoch 1.0.4 version update + + -- Jeremy Soller Wed, 21 Jan 2026 10:16:11 -0700 + cosmic-files (1.0.0) jammy; urgency=medium * Stable release. From f0b1e3b0a36c9f5256b1008e02be714f547a6623 Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Thu, 22 Jan 2026 10:02:23 -0700 Subject: [PATCH 02/13] Update dependencies --- Cargo.lock | 41 +++++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 582b414..114f782 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1449,7 +1449,7 @@ dependencies = [ [[package]] name = "cosmic-config" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic.git#689f25be539bb7163fe01dd3daaa253dc212f131" +source = "git+https://github.com/pop-os/libcosmic.git#beddbf17703728182395a13267954d839226331d" dependencies = [ "atomicwrites", "cosmic-config-derive", @@ -1470,7 +1470,7 @@ dependencies = [ [[package]] name = "cosmic-config-derive" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic.git#689f25be539bb7163fe01dd3daaa253dc212f131" +source = "git+https://github.com/pop-os/libcosmic.git#beddbf17703728182395a13267954d839226331d" dependencies = [ "quote", "syn 2.0.114", @@ -1634,7 +1634,7 @@ dependencies = [ [[package]] name = "cosmic-theme" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic.git#689f25be539bb7163fe01dd3daaa253dc212f131" +source = "git+https://github.com/pop-os/libcosmic.git#beddbf17703728182395a13267954d839226331d" dependencies = [ "almost", "cosmic-config", @@ -2037,7 +2037,7 @@ checksum = "75b325c5dbd37f80359721ad39aca5a29fb04c89279657cffdda8736d0c0b9d2" [[package]] name = "dpi" version = "0.1.1" -source = "git+https://github.com/pop-os/winit.git?tag=iced-xdg-surface-0.13-rc#12a5f17d1811cdebbcbd310a3d92965e9142fa12" +source = "git+https://github.com/pop-os/winit.git?tag=iced-xdg-surface-0.13-rc#0c4adf468b8397e5b1dc9183418f56b972916e42" [[package]] name = "drm" @@ -3200,7 +3200,7 @@ dependencies = [ [[package]] name = "iced" version = "0.14.0-dev" -source = "git+https://github.com/pop-os/libcosmic.git#689f25be539bb7163fe01dd3daaa253dc212f131" +source = "git+https://github.com/pop-os/libcosmic.git#beddbf17703728182395a13267954d839226331d" dependencies = [ "dnd", "iced_accessibility", @@ -3218,7 +3218,7 @@ dependencies = [ [[package]] name = "iced_accessibility" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic.git#689f25be539bb7163fe01dd3daaa253dc212f131" +source = "git+https://github.com/pop-os/libcosmic.git#beddbf17703728182395a13267954d839226331d" dependencies = [ "accesskit", "accesskit_winit", @@ -3227,7 +3227,7 @@ dependencies = [ [[package]] name = "iced_core" version = "0.14.0-dev" -source = "git+https://github.com/pop-os/libcosmic.git#689f25be539bb7163fe01dd3daaa253dc212f131" +source = "git+https://github.com/pop-os/libcosmic.git#beddbf17703728182395a13267954d839226331d" dependencies = [ "bitflags 2.10.0", "bytes", @@ -3251,7 +3251,7 @@ dependencies = [ [[package]] name = "iced_futures" version = "0.14.0-dev" -source = "git+https://github.com/pop-os/libcosmic.git#689f25be539bb7163fe01dd3daaa253dc212f131" +source = "git+https://github.com/pop-os/libcosmic.git#beddbf17703728182395a13267954d839226331d" dependencies = [ "futures", "iced_core", @@ -3277,7 +3277,7 @@ dependencies = [ [[package]] name = "iced_graphics" version = "0.14.0-dev" -source = "git+https://github.com/pop-os/libcosmic.git#689f25be539bb7163fe01dd3daaa253dc212f131" +source = "git+https://github.com/pop-os/libcosmic.git#beddbf17703728182395a13267954d839226331d" dependencies = [ "bitflags 2.10.0", "bytemuck", @@ -3299,7 +3299,7 @@ dependencies = [ [[package]] name = "iced_renderer" version = "0.14.0-dev" -source = "git+https://github.com/pop-os/libcosmic.git#689f25be539bb7163fe01dd3daaa253dc212f131" +source = "git+https://github.com/pop-os/libcosmic.git#beddbf17703728182395a13267954d839226331d" dependencies = [ "iced_graphics", "iced_tiny_skia", @@ -3311,7 +3311,7 @@ dependencies = [ [[package]] name = "iced_runtime" version = "0.14.0-dev" -source = "git+https://github.com/pop-os/libcosmic.git#689f25be539bb7163fe01dd3daaa253dc212f131" +source = "git+https://github.com/pop-os/libcosmic.git#beddbf17703728182395a13267954d839226331d" dependencies = [ "bytes", "cosmic-client-toolkit", @@ -3326,7 +3326,7 @@ dependencies = [ [[package]] name = "iced_tiny_skia" version = "0.14.0-dev" -source = "git+https://github.com/pop-os/libcosmic.git#689f25be539bb7163fe01dd3daaa253dc212f131" +source = "git+https://github.com/pop-os/libcosmic.git#beddbf17703728182395a13267954d839226331d" dependencies = [ "bytemuck", "cosmic-text", @@ -3342,7 +3342,7 @@ dependencies = [ [[package]] name = "iced_wgpu" version = "0.14.0-dev" -source = "git+https://github.com/pop-os/libcosmic.git#689f25be539bb7163fe01dd3daaa253dc212f131" +source = "git+https://github.com/pop-os/libcosmic.git#beddbf17703728182395a13267954d839226331d" dependencies = [ "as-raw-xcb-connection", "bitflags 2.10.0", @@ -3373,7 +3373,7 @@ dependencies = [ [[package]] name = "iced_widget" version = "0.14.0-dev" -source = "git+https://github.com/pop-os/libcosmic.git#689f25be539bb7163fe01dd3daaa253dc212f131" +source = "git+https://github.com/pop-os/libcosmic.git#beddbf17703728182395a13267954d839226331d" dependencies = [ "cosmic-client-toolkit", "dnd", @@ -3392,7 +3392,7 @@ dependencies = [ [[package]] name = "iced_winit" version = "0.14.0-dev" -source = "git+https://github.com/pop-os/libcosmic.git#689f25be539bb7163fe01dd3daaa253dc212f131" +source = "git+https://github.com/pop-os/libcosmic.git#beddbf17703728182395a13267954d839226331d" dependencies = [ "cosmic-client-toolkit", "dnd", @@ -4461,7 +4461,7 @@ checksum = "bcc35a38544a891a5f7c865aca548a982ccb3b8650a5b06d0fd33a10283c56fc" [[package]] name = "libcosmic" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic.git#689f25be539bb7163fe01dd3daaa253dc212f131" +source = "git+https://github.com/pop-os/libcosmic.git#beddbf17703728182395a13267954d839226331d" dependencies = [ "apply", "ashpd 0.12.1", @@ -5935,9 +5935,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.105" +version = "1.0.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "535d180e0ecab6268a3e718bb9fd44db66bbbc256257165fc699dadf70d16fe7" +checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934" dependencies = [ "unicode-ident", ] @@ -8816,7 +8816,7 @@ checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650" [[package]] name = "winit" version = "0.30.5" -source = "git+https://github.com/pop-os/winit.git?tag=iced-xdg-surface-0.13-rc#12a5f17d1811cdebbcbd310a3d92965e9142fa12" +source = "git+https://github.com/pop-os/winit.git?tag=iced-xdg-surface-0.13-rc#0c4adf468b8397e5b1dc9183418f56b972916e42" dependencies = [ "ahash", "android-activity", @@ -8833,6 +8833,7 @@ dependencies = [ "dpi", "js-sys", "libc", + "libredox", "memmap2 0.9.9", "ndk", "objc2 0.5.2", @@ -8843,7 +8844,7 @@ dependencies = [ "percent-encoding", "pin-project", "raw-window-handle", - "redox_syscall 0.5.18", + "redox_syscall 0.7.0", "rustix 0.38.44", "sctk-adwaita", "smithay-client-toolkit 0.19.2", From 1963e585608338bbd9a7bcd42015f28eee09436c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vuka=C5=A1in=20Vojinovi=C4=87?= <150025636+git-f0x@users.noreply.github.com> Date: Wed, 14 Jan 2026 21:32:26 +0100 Subject: [PATCH 03/13] perf(copy): async batch file flushes Instead of calling `sync_all()` on every file individually during the Copy operation, the flushing is now batched and done at the end. Flushing now also happens for Move. --- src/operation/recursive.rs | 35 ++++++++++++++++++++++++++++++++--- 1 file changed, 32 insertions(+), 3 deletions(-) diff --git a/src/operation/recursive.rs b/src/operation/recursive.rs index 4c19bc3..b4825e9 100644 --- a/src/operation/recursive.rs +++ b/src/operation/recursive.rs @@ -1,6 +1,7 @@ use compio::BufResult; use compio::buf::{IntoInner, IoBuf}; use compio::io::{AsyncReadAt, AsyncWriteAt}; +use futures::{StreamExt, stream}; use std::future::Future; use std::pin::Pin; use std::time::Instant; @@ -57,6 +58,8 @@ impl Context { ) -> Result { let mut ops = Vec::new(); let mut cleanup_ops = Vec::new(); + let mut written_files = Vec::new(); + let mut target_dirs = std::collections::HashSet::new(); for (from_parent, to_parent) in from_to_pairs { self.controller .check() @@ -141,6 +144,9 @@ impl Context { cleanup_ops.push(cleanup_op); } } + if let Some(parent) = op.to.parent() { + target_dirs.insert(parent.to_path_buf()); + } ops.push(op); } @@ -177,10 +183,19 @@ impl Context { &self.controller, ) })? { + if matches!( + op.kind, + OpKind::Copy + | OpKind::Move { + cross_device_copy: true + } + ) { + written_files.push(op.to.clone()); + } // The from path is ignored in the operation selection if it is a top level item if self.op_sel.ignored.contains(&op.from) { // So add the to path to the selection - self.op_sel.selected.push(op.to.clone()); + self.op_sel.selected.push(op.to); } } else { // Cancelled @@ -188,6 +203,22 @@ impl Context { } } + // Sync files to disk + let file_stream = stream::iter(written_files.into_iter().map(|path| async move { + if let Ok(file) = compio::fs::OpenOptions::new().write(true).open(&path).await { + let _ = file.sync_all().await; + } + })); + file_stream.buffer_unordered(32).collect::>().await; + + // Sync directories to disk + let dir_stream = stream::iter(target_dirs.into_iter().map(|path| async move { + if let Ok(dir) = compio::fs::OpenOptions::new().read(true).open(&path).await { + let _ = dir.sync_all().await; + } + })); + dir_stream.buffer_unordered(16).collect::>().await; + Ok(true) } @@ -411,8 +442,6 @@ impl Op { } } } - - to_file.sync_all().await?; } OpKind::Move { cross_device_copy } => { // Remove `to` if overwriting and it is an existing file From d9f654ffe329198bbfb66375d6b923009d28e5b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vuka=C5=A1in=20Vojinovi=C4=87?= <150025636+git-f0x@users.noreply.github.com> Date: Sat, 24 Jan 2026 13:48:31 +0100 Subject: [PATCH 04/13] improv(zip_extract): flush files to disk This ensures the files are fully on the disk when the operation is done. --- src/archive.rs | 108 ++++++++++++++++++------------------- src/operation/mod.rs | 23 ++++++++ src/operation/recursive.rs | 20 ++----- 3 files changed, 79 insertions(+), 72 deletions(-) diff --git a/src/archive.rs b/src/archive.rs index 5f0fe63..8684bb8 100644 --- a/src/archive.rs +++ b/src/archive.rs @@ -1,15 +1,14 @@ -use std::{ - collections::VecDeque, - fs, - io::{self, Read, Write}, - path::Path, -}; -use zip::result::ZipError; - use crate::{ mime_icon::mime_for_path, - operation::{Controller, OpReader, OperationError, OperationErrorType}, + operation::{Controller, OpReader, OperationError, OperationErrorType, sync_to_disk}, }; +use std::{ + collections::HashSet, + fs, + io::{self, Read, Write}, + path::{Path, PathBuf}, +}; +use zip::result::ZipError; pub const SUPPORTED_ARCHIVE_TYPES: &[&str] = &[ "application/gzip", @@ -113,27 +112,36 @@ fn zip_extract>( use std::{ffi::OsString, fs}; use zip::result::ZipError; - fn make_writable_dir_all>(outpath: T) -> Result<(), ZipError> { - fs::create_dir_all(outpath.as_ref())?; + fn make_writable_dir_all>( + outpath: T, + target_dirs: &mut HashSet, + ) -> Result<(), ZipError> { + let path = outpath.as_ref(); + if !path.exists() { + fs::create_dir_all(path)?; + } + if !target_dirs.contains(path) { + target_dirs.insert(path.to_path_buf()); + } + #[cfg(unix)] { // Dirs must be writable until all normal files are extracted use std::os::unix::fs::PermissionsExt; - std::fs::set_permissions( - outpath.as_ref(), - std::fs::Permissions::from_mode( - 0o700 | std::fs::metadata(outpath.as_ref())?.permissions().mode(), - ), + fs::set_permissions( + path, + fs::Permissions::from_mode(0o700 | fs::metadata(path)?.permissions().mode()), )?; } Ok(()) } - #[cfg(unix)] - let mut files_by_unix_mode = Vec::new(); let mut buffer = vec![0; 4 * 1024 * 1024]; let total_files = archive.len(); - let mut pending_directory_creates = VecDeque::new(); + let mut written_files = Vec::with_capacity(total_files); + let mut target_dirs = HashSet::new(); + #[cfg(unix)] + let mut files_by_unix_mode = Vec::with_capacity(total_files); for i in 0..total_files { futures::executor::block_on(async { @@ -143,7 +151,7 @@ fn zip_extract>( .map_err(|s| io::Error::other(OperationError::from_state(s, &controller))) })?; - controller.set_progress((i as f32) / total_files as f32); + controller.set_progress(i as f32 / total_files as f32); let mut file = match password { None => archive.by_index(i), @@ -156,26 +164,22 @@ fn zip_extract>( let outpath = directory.as_ref().join(filepath); if file.is_dir() { - pending_directory_creates.push_back(outpath.clone()); + make_writable_dir_all(&outpath, &mut target_dirs)?; + + #[cfg(unix)] + if let Some(mode) = file.unix_mode() { + files_by_unix_mode.push((outpath, mode)); + } continue; } - let symlink_target = if file.is_symlink() && (cfg!(unix) || cfg!(windows)) { + + if let Some(parent) = outpath.parent() { + make_writable_dir_all(parent, &mut target_dirs)?; + } + + if file.is_symlink() && (cfg!(unix) || cfg!(windows)) { let mut target = Vec::with_capacity(file.size() as usize); file.read_to_end(&mut target)?; - Some(target) - } else { - None - }; - drop(file); - if let Some(target) = symlink_target { - // create all pending dirs - while let Some(pending_dir) = pending_directory_creates.pop_front() { - make_writable_dir_all(pending_dir)?; - } - - if let Some(p) = outpath.parent() { - make_writable_dir_all(p)?; - } #[cfg(unix)] { @@ -205,21 +209,10 @@ fn zip_extract>( std::os::windows::fs::symlink_file(target_path, outpath.as_path())?; } } + + written_files.push(outpath); continue; } - let mut file = match password { - None => archive.by_index(i), - Some(pwd) => archive.by_index_decrypt(i, pwd.as_bytes()), - }?; - - // create all pending dirs - while let Some(pending_dir) = pending_directory_creates.pop_front() { - make_writable_dir_all(pending_dir)?; - } - - if let Some(p) = outpath.parent() { - make_writable_dir_all(p)?; - } let total = file.size(); let mut outfile = fs::File::create(&outpath)?; @@ -245,13 +238,14 @@ fn zip_extract>( controller.set_progress(total_progress); } } + + // Check for real permissions, which we'll set in a second pass #[cfg(unix)] - { - // Check for real permissions, which we'll set in a second pass - if let Some(mode) = file.unix_mode() { - files_by_unix_mode.push((outpath.clone(), mode)); - } + if let Some(mode) = file.unix_mode() { + files_by_unix_mode.push((outpath.clone(), mode)); } + + written_files.push(outpath); } #[cfg(unix)] { @@ -260,11 +254,15 @@ fn zip_extract>( if files_by_unix_mode.len() > 1 { // Ensure we update children's permissions before making a parent unwritable - files_by_unix_mode.sort_by_key(|(path, _)| Reverse(path.clone())); + files_by_unix_mode.sort_by_key(|(path, _)| Reverse(path.components().count())); } for (path, mode) in files_by_unix_mode { fs::set_permissions(&path, fs::Permissions::from_mode(mode))?; } } + + // Flush files to disk + futures::executor::block_on(async { sync_to_disk(written_files, target_dirs).await }); + Ok(()) } diff --git a/src/operation/mod.rs b/src/operation/mod.rs index 1442b74..b05488b 100644 --- a/src/operation/mod.rs +++ b/src/operation/mod.rs @@ -196,6 +196,29 @@ async fn copy_or_move( .map_err(wrap_compio_spawn_error)? } +pub async fn sync_to_disk( + written_files: Vec, + target_dirs: std::collections::HashSet, +) { + use futures::{StreamExt, stream}; + + // Sync files to disk + let file_stream = stream::iter(written_files.into_iter().map(|path| async move { + if let Ok(file) = compio::fs::OpenOptions::new().write(true).open(&path).await { + let _ = file.sync_all().await; + } + })); + file_stream.buffer_unordered(32).collect::>().await; + + // Sync directories to disk + let dir_stream = stream::iter(target_dirs.into_iter().map(|path| async move { + if let Ok(dir) = compio::fs::OpenOptions::new().read(true).open(&path).await { + let _ = dir.sync_all().await; + } + })); + dir_stream.buffer_unordered(16).collect::>().await; +} + fn copy_unique_path(from: &Path, to: &Path) -> PathBuf { // List of compound extensions to check const COMPOUND_EXTENSIONS: &[&str] = &[ diff --git a/src/operation/recursive.rs b/src/operation/recursive.rs index b4825e9..cc74a43 100644 --- a/src/operation/recursive.rs +++ b/src/operation/recursive.rs @@ -1,14 +1,13 @@ use compio::BufResult; use compio::buf::{IntoInner, IoBuf}; use compio::io::{AsyncReadAt, AsyncWriteAt}; -use futures::{StreamExt, stream}; use std::future::Future; use std::pin::Pin; use std::time::Instant; use std::{cell::Cell, error::Error, fs, ops::ControlFlow, path::PathBuf, rc::Rc}; use walkdir::WalkDir; -use crate::operation::OperationError; +use crate::operation::{OperationError, sync_to_disk}; use super::{Controller, OperationSelection, ReplaceResult, copy_unique_path}; @@ -203,21 +202,8 @@ impl Context { } } - // Sync files to disk - let file_stream = stream::iter(written_files.into_iter().map(|path| async move { - if let Ok(file) = compio::fs::OpenOptions::new().write(true).open(&path).await { - let _ = file.sync_all().await; - } - })); - file_stream.buffer_unordered(32).collect::>().await; - - // Sync directories to disk - let dir_stream = stream::iter(target_dirs.into_iter().map(|path| async move { - if let Ok(dir) = compio::fs::OpenOptions::new().read(true).open(&path).await { - let _ = dir.sync_all().await; - } - })); - dir_stream.buffer_unordered(16).collect::>().await; + // Flush files to disk + sync_to_disk(written_files, target_dirs).await; Ok(true) } From 7b4305e2e3a814edbf9b337106a62459a903546e Mon Sep 17 00:00:00 2001 From: Hosted Weblate Date: Mon, 26 Jan 2026 12:01:53 +0100 Subject: [PATCH 05/13] i18n: translation updates from weblate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Aman Alam Co-authored-by: Baurzhan Muftakhidinov Co-authored-by: Gyro Zeppeli Co-authored-by: Hosted Weblate Co-authored-by: Jun Hwi Ku Co-authored-by: gift983 <983649@my.leicestercollege.ac.uk> Co-authored-by: lorduskordus Co-authored-by: Димко Co-authored-by: 김유빈 Translate-URL: https://hosted.weblate.org/projects/pop-os/cosmic-files/cs/ Translate-URL: https://hosted.weblate.org/projects/pop-os/cosmic-files/kk/ Translate-URL: https://hosted.weblate.org/projects/pop-os/cosmic-files/ko/ Translate-URL: https://hosted.weblate.org/projects/pop-os/cosmic-files/uk/ Translation: Pop OS/COSMIC Files --- i18n/cs/cosmic_files.ftl | 4 +- i18n/kk/cosmic_files.ftl | 306 +++++++++++++++++++++++++++++++++++++++ i18n/ko/cosmic_files.ftl | 71 ++++++++- i18n/uk/cosmic_files.ftl | 30 ++-- 4 files changed, 390 insertions(+), 21 deletions(-) diff --git a/i18n/cs/cosmic_files.ftl b/i18n/cs/cosmic_files.ftl index eef2118..6f9135d 100644 --- a/i18n/cs/cosmic_files.ftl +++ b/i18n/cs/cosmic_files.ftl @@ -389,9 +389,9 @@ type-to-search-enter-path = Zadává cestu ke složce nebo souboru compress = Komprimovat eject = Vysunout extract-here = Extrahovat -change-wallpaper = Změnit pozadí... +change-wallpaper = Změnit tapetu... desktop-appearance = Vzhled plochy... -display-settings = Nastavení displeje... +display-settings = Nastavení obrazovky... reload-folder = Znovu načíst složku sort-z-a = Z-A sort-newest-first = Nejnovější první diff --git a/i18n/kk/cosmic_files.ftl b/i18n/kk/cosmic_files.ftl index e69de29..65b2b7a 100644 --- a/i18n/kk/cosmic_files.ftl +++ b/i18n/kk/cosmic_files.ftl @@ -0,0 +1,306 @@ +cosmic-files = COSMIC файлдары +empty-folder = Бос бума +empty-folder-hidden = Бос бума (жасырын элементтері бар) +no-results = Нәтижелер табылмады +filesystem = Файлдық жүйе +home = Үй +networks = Желілер +notification-in-progress = Файлдармен әрекеттер орындалуда +trash = Қоқыс шелегі +recents = Соңғылар +undo = Болдырмау +today = Бүгін +desktop-view-options = Жұмыс үстелінің көрініс опциялары... +show-on-desktop = Жұмыс үстелінде көрсету +desktop-folder-content = Жұмыс үстелі бумасының мазмұны +mounted-drives = Тіркелген дискілер +trash-folder-icon = Қоқыс шелегі бумасының таңбашасы +icon-size-and-spacing = Таңбаша өлшемі мен аралықтары +icon-size = Таңбаша өлшемі +grid-spacing = Тор аралықтары +name = Аты +modified = Өзгертілген +trashed-on = Қоқыс шелегіне тасталған +size = Өлшемі +details = Ақпараты +dismiss = Хабарламаны елемеу +operations-running = + { $running } { $running -> + [one] әрекет + *[other] әрекет + } орындалуда ({ $percent }%)... +operations-running-finished = + { $running } { $running -> + [one] әрекет + *[other] әрекет + } орындалуда ({ $percent }%), { $finished } аяқталды... +pause = Аялдату +resume = Жалғастыру +create-archive = Архив жасау +extract-password-required = Пароль керек +extract-to = Шығару... +extract-to-title = Бумаға шығару +empty-trash = Себетті тазарту +empty-trash-title = Себетті тазарту керек пе? +empty-trash-warning = Себет бумасындағы элементтер біржола өшіріледі +mount-error = Дискіге қол жеткізу мүмкін емес +create-new-file = Жаңа файл жасау +create-new-folder = Жаңа бума жасау +file-name = Файл аты +folder-name = Бума аты +file-already-exists = Ондай аты бар файл бұрыннан бар +folder-already-exists = Ондай аты бар бума бұрыннан бар +name-hidden = "." таңбасынан басталатын атаулар жасырын болады +name-invalid = Аты "{ $filename }" болуы мүмкін емес +name-no-slashes = Атауда қиғаш сызықтар болмауы тиіс +cancel = Бас тарту +create = Жасау +open = Ашу +open-file = Файлды ашу +open-folder = Буманы ашу +open-in-new-tab = Жаңа бетте ашу +open-in-new-window = Жаңа терезеде ашу +open-item-location = Нысанның орнын ашу +open-multiple-files = Бірнеше файлды ашу +open-multiple-folders = Бірнеше буманы ашу +save = Сақтау +save-file = Файлды сақтау +open-with-title = "{ $name }" қалай ашқыңыз келеді? +browse-store = { $store } шолу +other-apps = Басқа қолданбалар +related-apps = Қатысты қолданбалар +selected-items = Таңдалған { $items } нысан +permanently-delete-question = Біржола өшіру керек пе? +delete = Өшіру +permanently-delete-warning = { $target } біржола өшіріледі. Бұл әрекетті болдырмау мүмкін емес. +rename-file = Файлдың атын өзгерту +rename-folder = Буманың атын өзгерту +replace = Алмастыру +replace-title = Бұл жерде "{ $filename }" бұрыннан бар +replace-warning = Оны сақталып жатқан файлмен алмастыруды қалайсыз ба? Алмастыру кезінде оның мазмұны қайта жазылады. +replace-warning-operation = Оны алмастыруды қалайсыз ба? Алмастыру кезінде оның мазмұны үстінен жазылады. +original-file = Түпнұсқа файл +replace-with = Келесімен алмастыру +apply-to-all = Барлығына іске асыру +keep-both = Екеуін де қалдыру +skip = Өткізіп жіберу +set-executable-and-launch = Орындалатын файл ретінде орнату және жөнелту +set-executable-and-launch-description = "{ $name }" нысанын орындалатын файл ретінде орнатып, оны жөнелтуді қалайсыз ба? +set-and-launch = Орнату және жөнелту +open-with = Көмегімен ашу +owner = Иесі +group = Топ +other = Басқа +none = Ештеңе +execute-only = Тек орындау +write-only = Тек жазу +write-execute = Жазу және орындау +read-only = Тек оқу +read-execute = Оқу және орындау +read-write = Оқу және жазу +read-write-execute = Оқу, жазу және орындау +favorite-path-error = Буманы ашу қатесі +favorite-path-error-description = + "{ $path }" ашу мүмкін емес + "{ $path }" жоқ болуы мүмкін немесе оны ашуға құқығыңыз жоқ + + Оны бүйірлік панельден өшіруді қалайсыз ба? +remove = Өшіру +keep = Қалдыру +repository = Репозиторий +support = Қолдау +add-network-drive = Желілік дискіні қосу +connect = Байланысу +connect-anonymously = Анонимді түрде байланысу +connecting = Байланысуда... +domain = Домен +enter-server-address = Сервер адресін енгізіңіз +network-drive-description = + Сервер адрестері хаттама префиксі мен адрестен тұрады. + Мысалдар: ssh://192.168.0.1, ftp://[2001:db8::1] +network-drive-schemes = + Қолжетімді хаттамалар,Префикс + AppleTalk,afp:// + Файлды тасымалдау хаттамасы,ftp:// немесе ftps:// + Желілік файлдық жүйе,nfs:// + Сервер хабарламаларының блогы,smb:// + SSH файлды тасымалдау хаттамасы,sftp:// немесе ssh:// + WebDAV,dav:// немесе davs:// +network-drive-error = Желілік дискіге қол жеткізу мүмкін емес +password = Пароль +remember-password = Парольді есте сақтау +try-again = Қайтадан көру +username = Пайдаланушы аты +cancelled = Бас тартылды +edit-history = Тарихты түзету +history = Тарихы +no-history = Тарихта ешқандай элемент жоқ. +pending = Күтілуде +progress = { $percent }% +progress-cancelled = { $percent }%, бас тартылды +progress-failed = { $percent }%, сәтсіз аяқталды +progress-paused = { $percent }%, аялдатылды +failed = Сәтсіз аяқталды +complete = Аяқталды +compressing = + { $items } { $items -> + [one] нәрсені + *[other] нәрсені + } "{ $from }" ішінен "{ $to }" ішіне сығу ({ $progress })... +compressed = + { $items } { $items -> + [one] нәрсе + *[other] нәрсе + } "{ $from }" ішінен "{ $to }" ішіне сығылды +copy_noun = Көшіріп алу +creating = "{ $parent }" ішінде "{ $name }" жасау +created = "{ $parent }" ішінде "{ $name }" жасалды +copying = + { $items } { $items -> + [one] нәрсені + *[other] нәрсені + } "{ $from }" ішінен "{ $to }" ішіне көшіру ({ $progress })... +copied = + { $items } { $items -> + [one] нәрсе + *[other] нәрсе + } "{ $from }" ішінен "{ $to }" ішіне көшірілді +deleting = + { $items } { $items -> + [one] нәрсені + *[other] нәрсені + } { trash } ішінен өшіру ({ $progress })... +deleted = + { $items } { $items -> + [one] нәрсе + *[other] нәрсе + } { trash } ішінен өшірілді +emptying-trash = { trash } тазартылуда ({ $progress })... +emptied-trash = { trash } тазартылды +extracting = + { $items } { $items -> + [one] нәрсені + *[other] нәрсені + } "{ $from }" ішінен "{ $to }" ішіне тарқату ({ $progress })... +extracted = + { $items } { $items -> + [one] нәрсе + *[other] нәрсе + } "{ $from }" ішінен "{ $to }" ішіне тарқатылды +setting-executable-and-launching = "{ $name }" орындалатын файл ретінде орнату және іске қосу +set-executable-and-launched = "{ $name }" орындалатын файл ретінде орнатылды және іске қосылды +setting-permissions = "{ $name }" үшін рұқсаттарды { $mode } мәніне орнату +set-permissions = "{ $name }" үшін рұқсаттар { $mode } мәніне орнатылды +moving = + { $items } { $items -> + [one] нәрсені + *[other] нәрсені + } "{ $from }" ішінен "{ $to }" ішіне жылжыту ({ $progress })... +moved = + { $items } { $items -> + [one] нәрсе + *[other] нәрсе + } "{ $from }" ішінен "{ $to }" ішіне жылжытылды +permanently-deleting = + { $items } { $items -> + [one] нәрсені + *[other] нәрсені + } біржола өшіру +permanently-deleted = + { $items } { $items -> + [one] нәрсе + *[other] нәрсе + } біржола өшірілді +removing-from-recents = + { $items } { $items -> + [one] нәрсені + *[other] нәрсені + } { recents } тізімінен өшіру +removed-from-recents = + { $items } { $items -> + [one] нәрсе + *[other] нәрсе + } { recents } тізімінен өшірілді +renaming = "{ $from }" атын "{ $to }" деп өзгерту +renamed = "{ $from }" аты "{ $to }" деп өзгертілді +restoring = + { $items } { $items -> + [one] нәрсені + *[other] нәрсені + } { trash } ішінен қалпына келтіру ({ $progress })... +restored = + { $items } { $items -> + [one] нәрсе + *[other] нәрсе + } { trash } ішінен қалпына келтірілді +unknown-folder = белгісіз бума +menu-open-with = Көмегімен ашу... +default-app = { $name } (әдепкі) +show-details = Мәліметтерді көрсету +type = Түрі: { $mime } +items = Элементтер: { $items } +item-size = Өлшемі: { $size } +item-created = Жасалған: { $created } +item-modified = Өзгертілген: { $modified } +item-accessed = Қол жеткізілген: { $accessed } +calculating = Есептеу... +settings = Баптаулар +single-click = Ашу үшін бір рет шерту +appearance = Сыртқы түрі +theme = Тақырып +match-desktop = Жұмыс үстеліне сәйкес келу +dark = Күңгірт +light = Ашық +type-to-search = Іздеу үшін теру +type-to-search-recursive = Ағымдағы бума мен барлық ішкі бумаларды іздейді +type-to-search-enter-path = Бумаға немесе файлға жолды енгізеді +type-to-search-select = Бірінші сәйкес келетін файлды немесе буманы таңдайды +add-to-sidebar = Бүйірлік панельге қосу +compress = Сығу +delete-permanently = Біржолата өшіру +eject = Шығару +extract-here = Тарқату +new-file = Жаңа файл... +new-folder = Жаңа бума... +open-in-terminal = Терминалда ашу +move-to-trash = Қоқыс жәшігіне тастау +restore-from-trash = Қоқыс жәшігінен қалпына келтіру +remove-from-sidebar = Бүйірлік панельден өшіру +sort-by-name = Аты бойынша сұрыптау +sort-by-modified = Өзгертілген уақыты бойынша сұрыптау +sort-by-size = Өлшемі бойынша сұрыптау +sort-by-trashed = Өшірілген уақыты бойынша сұрыптау +remove-from-recents = Соңғылардан өшіру +change-wallpaper = Тұсқағазды өзгерту... +desktop-appearance = Жұмыс үстелінің сыртқы түрі... +display-settings = Көрсету баптаулары... +file = Файл +new-tab = Жаңа бет +new-window = Жаңа терезе +reload-folder = Буманы қайта жүктеу +rename = Атын өзгерту... +close-tab = Бетті жабу +quit = Шығу +edit = Түзету +cut = Қиып алу +copy = Көшіру +paste = Кірістіру +select-all = Барлығын таңдау +zoom-in = Үлкейту +default-size = Әдепкі өлшем +zoom-out = Кішірейту +view = Көрініс +grid-view = Тор көрінісі +list-view = Тізім көрінісі +show-hidden-files = Жасырын файлдарды көрсету +list-directories-first = Алдымен бумаларды тізімдеу +gallery-preview = Галереяны алдын ала қарау +menu-settings = Баптаулар... +menu-about = COSMIC файлдар туралы... +sort = Сұрыптау +sort-a-z = А-Я +sort-z-a = Я-А +sort-newest-first = Алдымен жаңалары +sort-oldest-first = Алдымен ескілері +sort-smallest-to-largest = Кішісінен үлкеніне +sort-largest-to-smallest = Үлкенінен кішісіне diff --git a/i18n/ko/cosmic_files.ftl b/i18n/ko/cosmic_files.ftl index 43bef70..5453859 100644 --- a/i18n/ko/cosmic_files.ftl +++ b/i18n/ko/cosmic_files.ftl @@ -68,7 +68,7 @@ dark = 다크 light = 라이트 # Context menu new-file = 새 파일... -new-folder = 새 폴더 +new-folder = 새 폴더... open-in-terminal = 터미널에서 열기 move-to-trash = 휴지통으로 이동 restore-from-trash = 휴지통에서 복구 @@ -84,7 +84,7 @@ sort-by-size = 크기 순으로 정렬 file = 파일 new-tab = 새 탭 new-window = 새 창 -rename = 이름 바꾸기 +rename = 이름 바꾸기... close-tab = 탭 닫기 quit = 종료 @@ -102,7 +102,7 @@ view = 보기 grid-view = 그리드 보기 list-view = 목록 보기 menu-settings = 설정... -menu-about = 코스믹 파일에 대하여... +menu-about = COSMIC 파일 정보... connect = 연결 read-execute = 읽기 및 실행 item-modified = 마지막 수정 일자: { $modified } @@ -171,7 +171,7 @@ details = 세부 정보 mounted-drives = 마운트된 드라이브 mount-error = 드라이브에 접근할 수 없음 extract-here = 압축 해제 -removed-from-recents = { recents }에서 { $items } 항목 제거됨 +removed-from-recents = { recents } 에서 { $items }개의 항목을 제거했습니다 add-to-sidebar = 사이드 바에 추가 item-created = 생성 일자: { $created } type-to-search-recursive = 현재 폴더와 하위 폴더 탐색 @@ -202,7 +202,7 @@ delete-permanently = 완전히 삭제 networks = 네트워크 write-only = 쓰기 전용 today = 오늘 -permanently-delete-warning = { $target }이(가) 완전히 삭제됩니다. 이 행동은 되돌릴 수 없습니다. +permanently-delete-warning = { $target } 이(가) 완전히 삭제됩니다. 이 행동은 되돌릴 수 없습니다. empty-trash-warning = 휴지통의 항목이 완전히 삭제됩니다 empty-trash = 휴지통 비우기 empty-trash-title = 휴지통을 비울까요? @@ -210,3 +210,64 @@ type-to-search = 입력하여 검색 notification-in-progress = 파일 작업이 진행 중입니다 permanently-delete-question = 완전히 삭제할까요? selected-items = { $items }개 항목 선택됨 +sort-newest-first = 새 항목 우선 +renamed = "{ $from }" 에서 "{ $to }" 로 이름 변경됨 +deleted = { trash } 에서 { $items }개의 항목을 제거했습니다 +reload-folder = 폴더 새로고침 +favorite-path-error = 디렉터리를 여는 중 오류가 발생했습니다 +remove-from-sidebar = 사이드 바에서 제거 +restoring = { trash } 에서 { $items }개의 항목을 복구 중 ({ $progress })... +gallery-preview = 갤러리 미리보기 +sort-smallest-to-largest = 작은 항목부터 큰 항목 +zoom-in = 확대 +removing-from-recents = { recents } 에서 { $items }개의 항목을 제거 중 +zoom-out = 축소 +compressing = "{ $from }"에서 "{ $to }"(으)로 { $items }개의 항목을 압축 중({ $progress })... +setting-executable-and-launching = "{ $name }"를 실행 가능으로 설정 및 실행 중 +default-size = 기본 크기 +extracted = "{ $from }"에서 "{ $to }"(으)로 { $items }개의 항목을 압축 해제했습니다 +permanently-deleting = { $items }개의 항목을 영구적으로 제거 중 +compressed = "{ $from }"에서 "{ $to }"(으)로 { $items }개의 항목을 압축했습니다 +grid-spacing = 그리드 간격 +copying = "{ $from }"에서 "{ $to }"(으)로 { $items }개의 항목을 복사 중({ $progress })... +sort-oldest-first = 오래된 항목 우선 +sort-by-trashed = 삭제된 시간 순으로 정렬 +copied = "{ $from }"에서 "{ $to }"(으)로 { $items }개의 항목을 복사했습니다 +list-directories-first = 폴더 우선 나열 +remove-from-recents = 최근 항목에서 제거 +moving = "{ $from }"에서 "{ $to }"(으)로 { $items }개의 항목을 이동 중 ({ $progress })... +change-wallpaper = 배경화면 변경... +deleting = { trash } 에서 { $items }개의 항목을 제거 중({ $progress })... +set-executable-and-launched = "{ $name }"를 실행 가능으로 설정 및 실행됨 +sort-a-z = A-Z +set-and-launch = 설정 후 실행 +set-executable-and-launch = 실행 가능으로 설정 후 실행 +restored = { trash } 에서 { $items }개의 항목을 복구했습니다 +sort-z-a = Z-A +operations-running-finished = { $running }개의 작업 진행 중 ({ $percent }%), { $finished } 완료됨... +sort = 정렬 +show-hidden-files = 숨긴 파일 표시 +trash-folder-icon = 휴지통 아이콘 +extracting = "{ $from }"에서 "{ $to }"(으)로 { $items }개의 항목을 압축 해제 중 ({ $progress })... +permanently-deleted = { $items }개의 항목을 영구적으로 제거했습니다 +renaming = "{ $from }" 에서 "{ $to }" 로 이름 변경 중 +set-executable-and-launch-description = "{ $name }"을 실행 가능으로 설정하고 실행할까요? +sort-largest-to-smallest = 큰 항목부터 작은 항목 +moved = "{ $from }"에서 "{ $to }"(으)로 { $items }개의 항목을 이동했습니다 +display-settings = 화면 설정... +desktop-appearance = 데스크톱 외관... +favorite-path-error-description = + "{ $path }"을(를) 열 수 없습니다 + "{ $path }"이(가) 존재하지 않거나 열기 권한이 없을 수 있습니다 + + 사이드바에서 제거하시겠습니까? +operations-running = { $running }개의 작업 진행 중 ({ $percent }%)... +network-drive-schemes = + 지원 프로토콜,접두사(Prefix) + AppleTalk,afp:// + 파일 전송 프로토콜 (FTP),ftp:// 또는 ftps:// + 네트워크 파일 시스템 (NFS),nfs:// + 서버 메시지 블록 (SMB),smb:// + SSH 파일 전송 프로토콜 (SFTP),sftp:// 또는 ssh:// + WebDAV,dav:// 또는 davs:// +type-to-search-select = 일치하는 첫 번째 파일 또는 폴더를 선택합니다 diff --git a/i18n/uk/cosmic_files.ftl b/i18n/uk/cosmic_files.ftl index 9da1650..1c77455 100644 --- a/i18n/uk/cosmic_files.ftl +++ b/i18n/uk/cosmic_files.ftl @@ -16,8 +16,8 @@ size = Розмір ## Empty Trash Dialog -empty-trash = Спорожнити Смітник -empty-trash-warning = Ви впевнені, що хочете остаточно видалити всі елементи зі Смітника? +empty-trash = Спорожнити смітник +empty-trash-warning = Елементи зі смітника будуть остаточно видалені ## New File/Folder Dialog @@ -25,11 +25,11 @@ create-new-file = Створити новий файл create-new-folder = Створити нову теку file-name = Назва файлу folder-name = Назва теки -file-already-exists = Файл з такою назвою вже існує. -folder-already-exists = Тека з такою назвою вже існує. -name-hidden = Назви, що починаються з ".", будуть приховані. -name-invalid = Назва не може бути "{ $filename }". -name-no-slashes = Назва не може містити скісні риски. +file-already-exists = Файл з такою назвою вже існує +folder-already-exists = Тека з такою назвою вже існує +name-hidden = Назви, що починаються з ".", будуть приховані +name-invalid = Назва не може бути "{ $filename }" +name-no-slashes = Назва не може містити скісні риски ## Open/Save Dialog @@ -52,7 +52,7 @@ rename-folder = Перейменувати теку ## Replace Dialog replace = Замінити -replace-title = " { $filename }" вже існує в цьому місці. +replace-title = " { $filename }" вже існує в цьому місці replace-warning = Бажаєте замінити його тим, що зберігаєте? Замінювання перезапише його вміст. replace-warning-operation = Бажаєте замінити його? Замінювання перезапише його вміст. original-file = Початковий файл @@ -185,7 +185,7 @@ remove = Вилучити cancelled = Скасовані no-results = Нічого не знайдено networks = Мережі -notification-in-progress = Виконуються операції з файлами. +notification-in-progress = Триває обробка файлів today = Сьогодні desktop-view-options = Параметри вигляду стільниці... show-on-desktop = Показувати на стільниці @@ -219,9 +219,9 @@ open-with-title = Як ви бажаєте відкрити "{ $name }"? browse-store = Переглянути { $store } other-apps = Інші застосунки related-apps = Пов'язані застосунки -permanently-delete-question = Вилучити остаточно +permanently-delete-question = Остаточно видалити? delete = Вилучити -permanently-delete-warning = Ви впевнені, що хочете остаточно вилучити { $target }? Дію неможливо скасувати. +permanently-delete-warning = { $target } буде остаточно видалено. Цю дію не можна скасувати. set-executable-and-launch = Зробити виконуваним і запустити set-executable-and-launch-description = Бажаєте зробити "{ $name }" виконуваним і запустити його? set-and-launch = Зробити і запустити @@ -239,8 +239,8 @@ read-write = Перегляд і запис read-write-execute = Перегляд, запис і виконання favorite-path-error = Помилка при відкритті каталогу favorite-path-error-description = - Неможливо відкрити "{ $path }". - Можливо, його не існує або у вас немає прав на відкриття. + Неможливо відкрити "{ $path }" + "{ $path }" можливо, його не існує або у вас немає прав на відкриття Вилучити з бічної панелі? keep = Залишити @@ -302,7 +302,7 @@ extracted = } з "{ $from }" до "{ $to }" setting-executable-and-launching = Встановлення "{ $name }" виконуваним і запуск set-executable-and-launched = Встановлено "{ $name }" виконуваним і запущено -selected-items = { $items } обраних елементів +selected-items = Вибрані { $items } елементи setting-permissions = Встановлення дозволів { $mode } для "{ $name }" set-permissions = Встановлено дозволи { $mode } для "{ $name }" show-details = Показати деталі @@ -355,3 +355,5 @@ removed-from-recents = [one] елемент *[other] елементи } з { recents } +empty-trash-title = Спорожити смітник? +type-to-search-select = Вибирає перший відповідний файл або папку From c9341d5f4600b68b3782b76bc496bde5bfe19594 Mon Sep 17 00:00:00 2001 From: Hosted Weblate Date: Tue, 27 Jan 2026 19:09:04 +0100 Subject: [PATCH 06/13] i18n: translation updates from weblate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Aman Alam Co-authored-by: Baurzhan Muftakhidinov Co-authored-by: Benjamin Orno Co-authored-by: Gyro Zeppeli Co-authored-by: Hosted Weblate Co-authored-by: Jun Hwi Ku Co-authored-by: gift983 <983649@my.leicestercollege.ac.uk> Co-authored-by: lorduskordus Co-authored-by: Димко Co-authored-by: 김유빈 Translate-URL: https://hosted.weblate.org/projects/pop-os/cosmic-files/cs/ Translate-URL: https://hosted.weblate.org/projects/pop-os/cosmic-files/kk/ Translate-URL: https://hosted.weblate.org/projects/pop-os/cosmic-files/ko/ Translate-URL: https://hosted.weblate.org/projects/pop-os/cosmic-files/nl/ Translate-URL: https://hosted.weblate.org/projects/pop-os/cosmic-files/uk/ Translation: Pop OS/COSMIC Files --- i18n/nl/cosmic_files.ftl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/i18n/nl/cosmic_files.ftl b/i18n/nl/cosmic_files.ftl index 9f85610..01f1945 100644 --- a/i18n/nl/cosmic_files.ftl +++ b/i18n/nl/cosmic_files.ftl @@ -3,8 +3,8 @@ empty-folder = Lege map empty-folder-hidden = Lege map (met verborgen bestanden) no-results = Geen resultaten gevonden filesystem = Bestandssysteem -home = Home -networks = Netwerk +home = Persoonlijke map +networks = Netwerken notification-in-progress = Bestanden worden nog bewerkt trash = Prullenbak recents = Recente bestanden From e729ebe2b2d22ede6bab888ff5bf2be92ef9dda3 Mon Sep 17 00:00:00 2001 From: Michael Meuli Date: Fri, 16 Jan 2026 20:31:44 +0100 Subject: [PATCH 07/13] only show open button if something can be opened --- src/tab.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/tab.rs b/src/tab.rs index dd1e7a4..508b5cc 100644 --- a/src/tab.rs +++ b/src/tab.rs @@ -2454,9 +2454,11 @@ impl Item { column = column.push(details); if let Some(path) = self.path_opt() { - column = column.push( - widget::button::standard(fl!("open")).on_press(Message::Open(Some(path.clone()))), - ); + if self.selected { + column = column.push( + widget::button::standard(fl!("open")).on_press(Message::Open(Some(path.clone()))), + ); + } } if !settings.is_empty() { From ce96665b602a9b97e6c71374adacdde549bcbd34 Mon Sep 17 00:00:00 2001 From: Ashley Wulber Date: Wed, 28 Jan 2026 20:05:51 -0500 Subject: [PATCH 08/13] feat: tab dnd --- Cargo.lock | 157 ++++++++++++++++++++++++++++++++--------------------- Cargo.toml | 11 +++- src/app.rs | 30 +++++++--- 3 files changed, 125 insertions(+), 73 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 114f782..a523c89 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -366,9 +366,6 @@ dependencies = [ "serde_repr", "tokio", "url", - "wayland-backend", - "wayland-client", - "wayland-protocols", "zbus 5.13.2", ] @@ -1002,9 +999,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.2.53" +version = "1.2.54" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "755d2fce177175ffca841e9a06afdb2c4ab0f593d53b4dee48147dfaade85932" +checksum = "6354c81bbfd62d9cfa9cb3c773c2b7b2a3a482d569de977fd0e961f6e7c00583" dependencies = [ "find-msvc-tools", "jobserver", @@ -1040,9 +1037,9 @@ dependencies = [ [[package]] name = "cfg-expr" -version = "0.20.5" +version = "0.20.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21be0e1ce6cdb2ee7fff840f922fb04ead349e5cfb1e750b769132d44ce04720" +checksum = "78cef5b5a1a6827c7322ae2a636368a573006b27cfa76c7ebd53e834daeaab6a" dependencies = [ "smallvec", "target-lexicon", @@ -1277,7 +1274,7 @@ dependencies = [ "pin-project-lite", "polling 3.11.0", "slab", - "socket2 0.6.1", + "socket2 0.6.2", "thin-cell", "windows-sys 0.61.2", ] @@ -1345,7 +1342,7 @@ dependencies = [ "pin-project-lite", "scoped-tls", "slab", - "socket2 0.6.1", + "socket2 0.6.2", "windows-sys 0.61.2", ] @@ -1448,8 +1445,8 @@ dependencies = [ [[package]] name = "cosmic-config" -version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic.git#beddbf17703728182395a13267954d839226331d" +version = "1.0.0" +source = "git+https://github.com/pop-os/libcosmic.git#fdcba7d8ececc35c09a7871b018930f752ac784b" dependencies = [ "atomicwrites", "cosmic-config-derive", @@ -1459,7 +1456,7 @@ dependencies = [ "iced_futures", "known-folders", "notify", - "ron", + "ron 0.12.0", "serde", "tokio", "tracing", @@ -1469,8 +1466,8 @@ dependencies = [ [[package]] name = "cosmic-config-derive" -version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic.git#beddbf17703728182395a13267954d839226331d" +version = "1.0.0" +source = "git+https://github.com/pop-os/libcosmic.git#fdcba7d8ececc35c09a7871b018930f752ac784b" dependencies = [ "quote", "syn 2.0.114", @@ -1593,7 +1590,7 @@ version = "0.1.0" source = "git+https://github.com/pop-os/cosmic-settings-daemon#ef024bfd06bf9fbd57246a25c91d1fdd28153d05" dependencies = [ "cosmic-config", - "ron", + "ron 0.11.0", "serde", "serde_with", "tracing", @@ -1633,15 +1630,15 @@ dependencies = [ [[package]] name = "cosmic-theme" -version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic.git#beddbf17703728182395a13267954d839226331d" +version = "1.0.0" +source = "git+https://github.com/pop-os/libcosmic.git#fdcba7d8ececc35c09a7871b018930f752ac784b" dependencies = [ "almost", "cosmic-config", "csscolorparser", "dirs 6.0.0", "palette", - "ron", + "ron 0.12.0", "serde", "serde_json", "thiserror 2.0.18", @@ -1738,12 +1735,14 @@ checksum = "42aaeae719fd78ce501d77c6cdf01f7e96f26bcd5617a4903a1c2b97e388543a" [[package]] name = "csscolorparser" -version = "0.7.2" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fda6aace1fbef3aa217b27f4c8d7d071ef2a70a5ca51050b1f17d40299d3f16" +checksum = "02ee6eae4d99456f92dc379ba21cf08f783ef5525f193c3854b4e921ece045c5" dependencies = [ - "phf 0.11.3", + "num-traits", + "phf 0.13.1", "serde", + "uncased", ] [[package]] @@ -3175,9 +3174,9 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.64" +version = "0.1.65" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33e57f83510bb73707521ebaffa789ec8caf86f9657cad665b092b581d40e9fb" +checksum = "e31bc9ad994ba00e440a8aa5c9ef0ec67d5cb5e5cb0cc7f8b744a35b389cc470" dependencies = [ "android_system_properties", "core-foundation-sys", @@ -3200,7 +3199,7 @@ dependencies = [ [[package]] name = "iced" version = "0.14.0-dev" -source = "git+https://github.com/pop-os/libcosmic.git#beddbf17703728182395a13267954d839226331d" +source = "git+https://github.com/pop-os/libcosmic.git#fdcba7d8ececc35c09a7871b018930f752ac784b" dependencies = [ "dnd", "iced_accessibility", @@ -3218,7 +3217,7 @@ dependencies = [ [[package]] name = "iced_accessibility" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic.git#beddbf17703728182395a13267954d839226331d" +source = "git+https://github.com/pop-os/libcosmic.git#fdcba7d8ececc35c09a7871b018930f752ac784b" dependencies = [ "accesskit", "accesskit_winit", @@ -3227,7 +3226,7 @@ dependencies = [ [[package]] name = "iced_core" version = "0.14.0-dev" -source = "git+https://github.com/pop-os/libcosmic.git#beddbf17703728182395a13267954d839226331d" +source = "git+https://github.com/pop-os/libcosmic.git#fdcba7d8ececc35c09a7871b018930f752ac784b" dependencies = [ "bitflags 2.10.0", "bytes", @@ -3251,7 +3250,7 @@ dependencies = [ [[package]] name = "iced_futures" version = "0.14.0-dev" -source = "git+https://github.com/pop-os/libcosmic.git#beddbf17703728182395a13267954d839226331d" +source = "git+https://github.com/pop-os/libcosmic.git#fdcba7d8ececc35c09a7871b018930f752ac784b" dependencies = [ "futures", "iced_core", @@ -3277,7 +3276,7 @@ dependencies = [ [[package]] name = "iced_graphics" version = "0.14.0-dev" -source = "git+https://github.com/pop-os/libcosmic.git#beddbf17703728182395a13267954d839226331d" +source = "git+https://github.com/pop-os/libcosmic.git#fdcba7d8ececc35c09a7871b018930f752ac784b" dependencies = [ "bitflags 2.10.0", "bytemuck", @@ -3299,7 +3298,7 @@ dependencies = [ [[package]] name = "iced_renderer" version = "0.14.0-dev" -source = "git+https://github.com/pop-os/libcosmic.git#beddbf17703728182395a13267954d839226331d" +source = "git+https://github.com/pop-os/libcosmic.git#fdcba7d8ececc35c09a7871b018930f752ac784b" dependencies = [ "iced_graphics", "iced_tiny_skia", @@ -3311,7 +3310,7 @@ dependencies = [ [[package]] name = "iced_runtime" version = "0.14.0-dev" -source = "git+https://github.com/pop-os/libcosmic.git#beddbf17703728182395a13267954d839226331d" +source = "git+https://github.com/pop-os/libcosmic.git#fdcba7d8ececc35c09a7871b018930f752ac784b" dependencies = [ "bytes", "cosmic-client-toolkit", @@ -3326,7 +3325,7 @@ dependencies = [ [[package]] name = "iced_tiny_skia" version = "0.14.0-dev" -source = "git+https://github.com/pop-os/libcosmic.git#beddbf17703728182395a13267954d839226331d" +source = "git+https://github.com/pop-os/libcosmic.git#fdcba7d8ececc35c09a7871b018930f752ac784b" dependencies = [ "bytemuck", "cosmic-text", @@ -3342,7 +3341,7 @@ dependencies = [ [[package]] name = "iced_wgpu" version = "0.14.0-dev" -source = "git+https://github.com/pop-os/libcosmic.git#beddbf17703728182395a13267954d839226331d" +source = "git+https://github.com/pop-os/libcosmic.git#fdcba7d8ececc35c09a7871b018930f752ac784b" dependencies = [ "as-raw-xcb-connection", "bitflags 2.10.0", @@ -3373,7 +3372,7 @@ dependencies = [ [[package]] name = "iced_widget" version = "0.14.0-dev" -source = "git+https://github.com/pop-os/libcosmic.git#beddbf17703728182395a13267954d839226331d" +source = "git+https://github.com/pop-os/libcosmic.git#fdcba7d8ececc35c09a7871b018930f752ac784b" dependencies = [ "cosmic-client-toolkit", "dnd", @@ -3392,7 +3391,7 @@ dependencies = [ [[package]] name = "iced_winit" version = "0.14.0-dev" -source = "git+https://github.com/pop-os/libcosmic.git#beddbf17703728182395a13267954d839226331d" +source = "git+https://github.com/pop-os/libcosmic.git#fdcba7d8ececc35c09a7871b018930f752ac784b" dependencies = [ "cosmic-client-toolkit", "dnd", @@ -4460,8 +4459,8 @@ checksum = "bcc35a38544a891a5f7c865aca548a982ccb3b8650a5b06d0fd33a10283c56fc" [[package]] name = "libcosmic" -version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic.git#beddbf17703728182395a13267954d839226331d" +version = "1.0.0" +source = "git+https://github.com/pop-os/libcosmic.git#fdcba7d8ececc35c09a7871b018930f752ac784b" dependencies = [ "apply", "ashpd 0.12.1", @@ -4532,9 +4531,9 @@ dependencies = [ [[package]] name = "libm" -version = "0.2.15" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9fbbcab51052fe104eb5e5d351cf728d30a5be1fe14d9be8a3b097481fb97de" +checksum = "b6d2cec3eae94f9f509c767b45932f1ada8350c4bdb85af2fcab4a3c14807981" [[package]] name = "libredox" @@ -5032,9 +5031,12 @@ dependencies = [ [[package]] name = "notify-types" -version = "2.0.0" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e0826a989adedc2a244799e823aece04662b66609d96af8dff7ac6df9a8925d" +checksum = "42b8cfee0e339a0337359f3c88165702ac6e600dc01c0cc9579a92d62b08477a" +dependencies = [ + "bitflags 2.10.0", +] [[package]] name = "nu-ansi-term" @@ -5692,6 +5694,7 @@ dependencies = [ "proc-macro2", "quote", "syn 2.0.114", + "uncased", ] [[package]] @@ -5710,6 +5713,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e57fef6bc5981e38c2ce2d63bfa546861309f875b8a75f092d1d54ae2d64f266" dependencies = [ "siphasher", + "uncased", ] [[package]] @@ -5863,9 +5867,9 @@ checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" [[package]] name = "ppmd-rust" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d558c559f0450f16f2a27a1f017ef38468c1090c9ce63c8e51366232d53717b4" +checksum = "efca4c95a19a79d1c98f791f10aebd5c1363b473244630bb7dbde1dc98455a24" [[package]] name = "ppv-lite86" @@ -6058,9 +6062,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.43" +version = "1.0.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc74d9a594b72ae6656596548f56f667211f8a97b3d4c3d467150794690dc40a" +checksum = "21b2ebcf727b7760c461f091f9f0f539b77b8e87f2fd88131e7f1b433b3cece4" dependencies = [ "proc-macro2", ] @@ -6376,9 +6380,9 @@ dependencies = [ [[package]] name = "rfd" -version = "0.15.4" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef2bee61e6cffa4635c72d7d81a84294e28f0930db0ddcb0f66d10244674ebed" +checksum = "a15ad77d9e70a92437d8f74c35d99b4e4691128df018833e99f90bcd36152672" dependencies = [ "ashpd 0.11.1", "block2 0.6.2", @@ -6395,7 +6399,7 @@ dependencies = [ "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "windows-sys 0.59.0", + "windows-sys 0.60.2", ] [[package]] @@ -6420,6 +6424,20 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "ron" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd490c5b18261893f14449cbd28cb9c0b637aebf161cd77900bfdedaff21ec32" +dependencies = [ + "bitflags 2.10.0", + "once_cell", + "serde", + "serde_derive", + "typeid", + "unicode-ident", +] + [[package]] name = "roxmltree" version = "0.20.0" @@ -6766,9 +6784,9 @@ dependencies = [ [[package]] name = "siphasher" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56199f7ddabf13fe5074ce809e7d3f42b42ae711800501b5b16ea82ad029c39d" +checksum = "b2aa850e253778c88a04c3d7323b043aeda9d3e30d5971937c1855769763678e" [[package]] name = "skrifa" @@ -6898,9 +6916,9 @@ dependencies = [ [[package]] name = "socket2" -version = "0.6.1" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17129e116933cf371d018bb80ae557e889637989d8638274fb25622827b03881" +checksum = "86f4aa3ad99f2088c990dfa82d367e19cb29268ed67c574d10d0a4bfe71f07e0" dependencies = [ "libc", "windows-sys 0.60.2", @@ -7357,7 +7375,7 @@ dependencies = [ "mio", "pin-project-lite", "signal-hook-registry", - "socket2 0.6.1", + "socket2 0.6.2", "tokio-macros", "tracing", "windows-sys 0.61.2", @@ -7566,9 +7584,15 @@ dependencies = [ [[package]] name = "typed-path" -version = "0.12.0" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7922f2cdc51280d47b491af9eafc41eb0cdab85eabcb390c854412fcbf26dbe8" +checksum = "3015e6ce46d5ad8751e4a772543a30c7511468070e98e64e20165f8f81155b64" + +[[package]] +name = "typeid" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc7d623258602320d5c55d1bc22793b57daff0ec7efc270ea7d55ce1d5f5471c" [[package]] name = "typenum" @@ -7587,6 +7611,15 @@ dependencies = [ "winapi", ] +[[package]] +name = "uncased" +version = "0.9.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1b88fcfe09e89d3866a5c11019378088af2d24c3fbd4f0543f96b479ec90697" +dependencies = [ + "version_check", +] + [[package]] name = "unic-langid" version = "0.9.6" @@ -7744,9 +7777,9 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "uuid" -version = "1.19.0" +version = "1.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2e054861b4bd027cd373e18e8d8d8e6548085000e41290d95ce0c373a654b4a" +checksum = "ee48d38b119b0cd71fe4141b30f5ba9c7c5d9f4e7a3a8b4a674e4b6ef789976f" dependencies = [ "js-sys", "serde_core", @@ -9282,18 +9315,18 @@ checksum = "6df3dc4292935e51816d896edcd52aa30bc297907c26167fec31e2b0c6a32524" [[package]] name = "zerocopy" -version = "0.8.33" +version = "0.8.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "668f5168d10b9ee831de31933dc111a459c97ec93225beb307aed970d1372dfd" +checksum = "fdea86ddd5568519879b8187e1cf04e24fce28f7fe046ceecbce472ff19a2572" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.8.33" +version = "0.8.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c7962b26b0a8685668b671ee4b54d007a67d4eaf05fda79ac0ecf41e32270f1" +checksum = "0c15e1b46eff7c6c91195752e0eeed8ef040e391cdece7c25376957d5f15df22" dependencies = [ "proc-macro2", "quote", @@ -9411,9 +9444,9 @@ checksum = "40990edd51aae2c2b6907af74ffb635029d5788228222c4bb811e9351c0caad3" [[package]] name = "zmij" -version = "1.0.16" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfcd145825aace48cff44a8844de64bf75feec3080e0aa5cdbde72961ae51a65" +checksum = "02aae0f83f69aafc94776e879363e9771d7ecbffe2c7fbb6c14c5e00dfe88439" [[package]] name = "zopfli" diff --git a/Cargo.toml b/Cargo.toml index bbc854e..ec98167 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -42,7 +42,7 @@ wayland-client = { version = "0.31.11", optional = true } xdg = { version = "3.0", optional = true } xdg-mime = { git = "https://github.com/ebassi/xdg-mime-rs" } # Compression -bzip2 = { version = "0.6", optional = true } #TODO: replace with pure Rust crate +bzip2 = { version = "0.6", optional = true } #TODO: replace with pure Rust crate flate2 = "1.1" tar = "0.4.44" lzma-rust2 = { version = "0.15.4", optional = true } @@ -80,7 +80,14 @@ optional = true git = "https://github.com/pop-os/libcosmic.git" default-features = false #TODO: a11y feature crashes -features = ["about", "autosize", "multi-window", "tokio", "winit", "surface-message"] +features = [ + "about", + "autosize", + "multi-window", + "tokio", + "winit", + "surface-message", +] [[example]] name = "gio-list" diff --git a/src/app.rs b/src/app.rs index bac8090..869c426 100644 --- a/src/app.rs +++ b/src/app.rs @@ -39,7 +39,7 @@ use cosmic::{ dnd_destination::DragId, horizontal_space, icon, menu::{action::MenuAction, key_bind::KeyBind}, - segmented_button::{self, Entity}, + segmented_button::{self, Entity, ReorderEvent}, vertical_space, }, }; @@ -396,6 +396,7 @@ pub enum Message { PendingPauseAll(bool), PermanentlyDelete(Option), Preview(Option), + ReorderTab(ReorderEvent), RescanRecents, RescanTrash, RemoveFromRecents(Option), @@ -444,7 +445,7 @@ pub enum Message { DndHoverTabTimeout(Entity), DndEnterNav(Entity), DndExitNav, - DndEnterTab(Entity), + DndEnterTab(Entity, Vec), DndExitTab, DndDropTab(Entity, Option, DndAction), DndDropNav(Entity, Option, DndAction), @@ -3937,7 +3938,6 @@ impl Application for App { config.show_hidden = !config.show_hidden; return self.update(Message::TabConfig(config)); } - Message::TabMessage(entity_opt, tab_message) => { let entity = entity_opt.unwrap_or_else(|| self.tab_model.active()); @@ -4402,11 +4402,13 @@ impl Application for App { } } } - Message::DndEnterTab(entity) => { - self.tab_dnd_hover = Some((entity, Instant::now())); - return Task::perform(tokio::time::sleep(HOVER_DURATION), move |()| { - cosmic::Action::App(Message::DndHoverTabTimeout(entity)) - }); + Message::DndEnterTab(entity, mimes) => { + if mimes.iter().all(|m| m.as_str() != "x-cosmic-files/tab-dnd") { + self.tab_dnd_hover = Some((entity, Instant::now())); + return Task::perform(tokio::time::sleep(HOVER_DURATION), move |()| { + cosmic::Action::App(Message::DndHoverTabTimeout(entity)) + }); + } } Message::DndExitTab => { self.nav_dnd_hover = None; @@ -4801,6 +4803,13 @@ impl Application for App { Message::NetworkDriveOpenTabAfterMount { location } => { return self.open_tab(location, false, None); } + Message::ReorderTab(ReorderEvent { + dragged, + target, + position, + }) => { + _ = self.tab_model.reorder(dragged, target, position); + } } Task::none() @@ -5790,9 +5799,12 @@ impl Application for App { widget::tab_bar::horizontal(&self.tab_model) .button_height(32) .button_spacing(space_xxs) + .enable_tab_drag(String::from("x-cosmic-files/tab-dnd")) + .on_reorder(move |event| Message::ReorderTab(event)) + .tab_drag_threshold(25.) .on_activate(Message::TabActivate) .on_close(|entity| Message::TabClose(Some(entity))) - .on_dnd_enter(|entity, _| Message::DndEnterTab(entity)) + .on_dnd_enter(|entity, mimes| Message::DndEnterTab(entity, mimes)) .on_dnd_leave(|_| Message::DndExitTab) .on_dnd_drop(|entity, data, action| { Message::DndDropTab(entity, data, action) From 339e4c104e040cad10a17bcbfaac80a40af750c2 Mon Sep 17 00:00:00 2001 From: Josh Megnauth Date: Thu, 29 Jan 2026 15:14:49 -0500 Subject: [PATCH 09/13] Bump compio; remove unused dependency --- Cargo.lock | 142 ++++++++++++++--------------------------------------- Cargo.toml | 12 +---- 2 files changed, 38 insertions(+), 116 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a523c89..affa134 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -727,29 +727,6 @@ dependencies = [ "serde", ] -[[package]] -name = "bindgen" -version = "0.69.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "271383c67ccabffb7381723dea0672a673f292304fcb45c01cc648c7a8d58088" -dependencies = [ - "bitflags 2.10.0", - "cexpr", - "clang-sys", - "itertools 0.12.1", - "lazy_static", - "lazycell", - "log", - "prettyplease", - "proc-macro2", - "quote", - "regex", - "rustc-hash 1.1.0", - "shlex", - "syn 2.0.114", - "which", -] - [[package]] name = "bit-set" version = "0.6.0" @@ -1015,15 +992,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" -[[package]] -name = "cexpr" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" -dependencies = [ - "nom 7.1.3", -] - [[package]] name = "cfb" version = "0.7.3" @@ -1088,17 +1056,6 @@ dependencies = [ "inout", ] -[[package]] -name = "clang-sys" -version = "1.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4" -dependencies = [ - "glob", - "libc", - "libloading", -] - [[package]] name = "clipboard-win" version = "5.4.1" @@ -1232,8 +1189,9 @@ dependencies = [ [[package]] name = "compio" -version = "0.17.0" -source = "git+https://github.com/jackpot51/compio.git#8235a1fcccde233362bb76df45b509c12ca79972" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b84ee96a86948d04388f3a0b8c36b9f0a6b40b3528ac0d65737e53632fb37fe" dependencies = [ "compio-buf", "compio-driver", @@ -1246,8 +1204,9 @@ dependencies = [ [[package]] name = "compio-buf" -version = "0.7.1" -source = "git+https://github.com/jackpot51/compio.git#8235a1fcccde233362bb76df45b509c12ca79972" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e8777c3ad31ab42f8a3a4a1bd629b78f688371df9b0f528d94dfbdbe5c945c9" dependencies = [ "arrayvec", "bytes", @@ -1256,8 +1215,9 @@ dependencies = [ [[package]] name = "compio-driver" -version = "0.10.0" -source = "git+https://github.com/jackpot51/compio.git#8235a1fcccde233362bb76df45b509c12ca79972" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "042d449def75fb78af58e53e865dd1343c36255294466e0abd5464b70a525be4" dependencies = [ "cfg-if", "cfg_aliases 0.2.1", @@ -1274,15 +1234,18 @@ dependencies = [ "pin-project-lite", "polling 3.11.0", "slab", + "smallvec", "socket2 0.6.2", + "synchrony", "thin-cell", "windows-sys 0.61.2", ] [[package]] name = "compio-fs" -version = "0.10.0" -source = "git+https://github.com/jackpot51/compio.git#8235a1fcccde233362bb76df45b509c12ca79972" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65ee36e1acf2cec4835efe9a986c012b2462c5ef53580e4ee84ae6d5a3d8e3b3" dependencies = [ "cfg-if", "cfg_aliases 0.2.1", @@ -1292,24 +1255,28 @@ dependencies = [ "compio-runtime", "libc", "os_pipe", + "pin-project-lite", "widestring", "windows-sys 0.61.2", ] [[package]] name = "compio-io" -version = "0.8.4" -source = "git+https://github.com/jackpot51/compio.git#8235a1fcccde233362bb76df45b509c12ca79972" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b914ea4883d9a5b44b328c04e4d23011f043228b0282d1e4b9100ce6507594cc" dependencies = [ "compio-buf", "futures-util", "paste", + "synchrony", ] [[package]] name = "compio-log" version = "0.1.0" -source = "git+https://github.com/jackpot51/compio.git#8235a1fcccde233362bb76df45b509c12ca79972" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc4e560213c1996b618da369b7c9109564b41af9033802ae534465c4ee4e132f" dependencies = [ "tracing", ] @@ -1317,7 +1284,8 @@ dependencies = [ [[package]] name = "compio-macros" version = "0.1.2" -source = "git+https://github.com/jackpot51/compio.git#8235a1fcccde233362bb76df45b509c12ca79972" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f05ed201484967dc70de77a8f7a02b29aaa8e6c81cbea2e75492ee0c8d97766b" dependencies = [ "proc-macro-crate 3.4.0", "proc-macro2", @@ -1327,8 +1295,9 @@ dependencies = [ [[package]] name = "compio-runtime" -version = "0.10.1" -source = "git+https://github.com/jackpot51/compio.git#8235a1fcccde233362bb76df45b509c12ca79972" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6c1c71f011bdd9c8f30e97d877b606505ee6d241c7782cfaed172f66acbd9cd" dependencies = [ "async-task", "compio-buf", @@ -1498,7 +1467,6 @@ dependencies = [ "icu", "ignore", "image", - "io-uring", "jxl-oxide", "libc", "libcosmic", @@ -3096,15 +3064,6 @@ dependencies = [ "digest", ] -[[package]] -name = "home" -version = "0.5.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "589533453244b0995c858700322199b2becb13b627df2851f64a2775d024abcf" -dependencies = [ - "windows-sys 0.59.0", -] - [[package]] name = "i18n-config" version = "0.4.8" @@ -4027,7 +3986,6 @@ version = "0.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fdd7bddefd0a8833b88a4b68f90dae22c7450d11b354198baee3874fd811b344" dependencies = [ - "bindgen", "bitflags 2.10.0", "cfg-if", "libc", @@ -4069,15 +4027,6 @@ version = "1.70.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695" -[[package]] -name = "itertools" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" -dependencies = [ - "either", -] - [[package]] name = "itertools" version = "0.14.0" @@ -4433,12 +4382,6 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" -[[package]] -name = "lazycell" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" - [[package]] name = "lebe" version = "0.5.3" @@ -5886,16 +5829,6 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e8cf8e6a8aa66ce33f63993ffc4ea4271eb5b0530a9002db8455ea6050c77bfa" -[[package]] -name = "prettyplease" -version = "0.2.37" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b" -dependencies = [ - "proc-macro2", - "syn 2.0.114", -] - [[package]] name = "proc-macro-crate" version = "1.3.1" @@ -6162,7 +6095,7 @@ dependencies = [ "built", "cfg-if", "interpolate_name", - "itertools 0.14.0", + "itertools", "libc", "libfuzzer-sys", "log", @@ -7054,6 +6987,15 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "synchrony" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de0208d3660701622272151bc63c35f5d32ca3d45c19785a9a8dc04dc797dc43" +dependencies = [ + "futures-util", +] + [[package]] name = "synstructure" version = "0.13.2" @@ -8212,18 +8154,6 @@ dependencies = [ "web-sys", ] -[[package]] -name = "which" -version = "4.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" -dependencies = [ - "either", - "home", - "once_cell", - "rustix 0.38.44", -] - [[package]] name = "widestring" version = "1.2.1" diff --git a/Cargo.toml b/Cargo.toml index ec98167..89e2156 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -65,17 +65,10 @@ num_cpus = "1.17.0" # Completion-based IO runtime to enable io_uring / IOCP file IO support. [dependencies.compio] -# Patched to fix mtime: https://github.com/compio-rs/compio/pull/625 -# version = "0.17.0" -git = "https://github.com/jackpot51/compio.git" +version = "0.18" default-features = false features = ["fs", "io", "macros", "polling", "runtime"] -[dependencies.io-uring] -version = "0.7.11" -default-features = false -optional = true - [dependencies.libcosmic] git = "https://github.com/pop-os/libcosmic.git" default-features = false @@ -117,8 +110,7 @@ dbus-config = ["libcosmic/dbus-config"] desktop = ["libcosmic/desktop", "dep:cosmic-mime-apps", "dep:xdg"] desktop-applet = [] gvfs = ["dep:gio", "dep:glib"] -io-uring = ["compio/io-uring", "dep:io-uring"] -io-uring-bindgen = ["io-uring?/bindgen"] +io-uring = ["compio/io-uring"] jemalloc = ["dep:tikv-jemallocator"] notify = ["dep:notify-rust"] wayland = ["libcosmic/wayland", "dep:cctk", "dep:wayland-client"] From 1e25e7dd69b109bb71359ee0e0288e82e90694be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vuka=C5=A1in=20Vojinovi=C4=87?= <150025636+git-f0x@users.noreply.github.com> Date: Sat, 24 Jan 2026 17:03:31 +0100 Subject: [PATCH 10/13] chore: clippy --- src/app.rs | 748 ++++++++++++++++++------------------- src/dialog.rs | 296 ++++++++------- src/large_image.rs | 26 +- src/localize.rs | 8 +- src/mime_app.rs | 4 +- src/mounter/gvfs.rs | 26 +- src/mouse_area.rs | 166 ++++---- src/operation/mod.rs | 8 +- src/operation/recursive.rs | 8 +- src/tab.rs | 621 +++++++++++++++--------------- src/thumbnail_cacher.rs | 8 +- 11 files changed, 938 insertions(+), 981 deletions(-) diff --git a/src/app.rs b/src/app.rs index 869c426..a85b098 100644 --- a/src/app.rs +++ b/src/app.rs @@ -1230,11 +1230,11 @@ impl App { }; for item in items { if item.selected { - if let Some(path) = item.path_opt() { - if op_sel.selected.contains(path) || op_sel.ignored.contains(path) { - // Ignore if path in selected or ignored paths - continue; - } + if let Some(path) = item.path_opt() + && (op_sel.selected.contains(path) || op_sel.ignored.contains(path)) + { + // Ignore if path in selected or ignored paths + continue; } // Return if there is a previous selection not matching @@ -1891,50 +1891,47 @@ impl App { children.push(item.preview_view(Some(&self.mime_app_cache), military_time)); } PreviewKind::Location(location) => { - if let Some(tab) = self.tab_model.data::(entity) { - if let Some(items) = tab.items_opt() { - for item in items { - if item.location_opt.as_ref() == Some(location) { - children.push( - item.preview_view(Some(&self.mime_app_cache), military_time), - ); - // Only show one property view to avoid issues like hangs when generating - // preview images on thousands of files - break; - } + if let Some(tab) = self.tab_model.data::(entity) + && let Some(items) = tab.items_opt() + { + for item in items { + if item.location_opt.as_ref() == Some(location) { + children + .push(item.preview_view(Some(&self.mime_app_cache), military_time)); + // Only show one property view to avoid issues like hangs when generating + // preview images on thousands of files + break; } } } } PreviewKind::Selected => { - if let Some(tab) = self.tab_model.data::(entity) { - if let Some(items) = tab.items_opt() { - let preview_opt = { - let mut selected = items.iter().filter(|item| item.selected); + if let Some(tab) = self.tab_model.data::(entity) + && let Some(items) = tab.items_opt() + { + let preview_opt = { + let mut selected = items.iter().filter(|item| item.selected); - match (selected.next(), selected.next()) { - // At least two selected items - (Some(_), Some(_)) => Some(tab.multi_preview_view()), - // Exactly one selected item - (Some(item), None) => Some( - item.preview_view(Some(&self.mime_app_cache), military_time), - ), - // No selected items - _ => None, + match (selected.next(), selected.next()) { + // At least two selected items + (Some(_), Some(_)) => Some(tab.multi_preview_view()), + // Exactly one selected item + (Some(item), None) => { + Some(item.preview_view(Some(&self.mime_app_cache), military_time)) } - }; - - if let Some(preview) = preview_opt { - children.push(preview); + // No selected items + _ => None, } + }; - if children.is_empty() { - if let Some(item) = &tab.parent_item_opt { - children.push( - item.preview_view(Some(&self.mime_app_cache), military_time), - ); - } - } + if let Some(preview) = preview_opt { + children.push(preview); + } + + if children.is_empty() + && let Some(item) = &tab.parent_item_opt + { + children.push(item.preview_view(Some(&self.mime_app_cache), military_time)); } } } @@ -2062,11 +2059,11 @@ impl App { .map(|favorite| { if let Favorite::Path(path) = favorite { for (from, to) in path_changes.iter().map(|(f, t)| (f.as_ref(), t.as_ref())) { - if path.starts_with(from) { - if let Ok(relative) = path.strip_prefix(from) { - favorites_changed = true; - return Favorite::from_path(to.join(relative)); - } + if path.starts_with(from) + && let Ok(relative) = path.strip_prefix(from) + { + favorites_changed = true; + return Favorite::from_path(to.join(relative)); } } } @@ -2235,17 +2232,16 @@ impl Application for App { let mut commands = vec![app.update_config()]; for location in flags.locations { - if let Some(path) = location.path_opt() { - if path.is_file() { - if let Some(parent) = path.parent() { - commands.push(app.open_tab( - Location::Path(parent.to_path_buf()), - true, - Some(vec![path.clone()]), - )); - continue; - } - } + if let Some(path) = location.path_opt() + && path.is_file() + && let Some(parent) = path.parent() + { + commands.push(app.open_tab( + Location::Path(parent.to_path_buf()), + true, + Some(vec![path.clone()]), + )); + continue; } commands.push(app.open_tab(location, true, None)); } @@ -2405,14 +2401,13 @@ impl Application for App { // TODO do we need to choose the correct mounter? self.mounter_items.keys().copied().next() }) + && let Some(mounter) = MOUNTERS.get(&key) { - if let Some(mounter) = MOUNTERS.get(&key) { - return mounter.network_drive(uri.clone()).map(move |()| { - cosmic::Action::App(Message::NetworkDriveOpenEntityAfterMount { - entity, - }) - }); - } + return mounter.network_drive(uri.clone()).map(move |()| { + cosmic::Action::App(Message::NetworkDriveOpenEntityAfterMount { + entity, + }) + }); } log::warn!( @@ -2468,12 +2463,12 @@ impl Application for App { return self.update(message); } } - if let Some(data) = self.nav_model.data::(entity) { - if let Some(mounter) = MOUNTERS.get(&data.0) { - return mounter - .mount(data.1.clone()) - .map(|()| cosmic::action::none()); - } + if let Some(data) = self.nav_model.data::(entity) + && let Some(mounter) = MOUNTERS.get(&data.0) + { + return mounter + .mount(data.1.clone()) + .map(|()| cosmic::action::none()); } Task::none() } @@ -2505,11 +2500,11 @@ impl Application for App { } // Close gallery mode if open - if let Some(tab) = self.tab_model.data_mut::(entity) { - if tab.gallery { - tab.gallery = false; - return Task::none(); - } + if let Some(tab) = self.tab_model.data_mut::(entity) + && tab.gallery + { + tab.gallery = false; + return Task::none(); } // Close menus and context panes in order per message @@ -2635,22 +2630,22 @@ impl Application for App { } Message::Compress(entity_opt) => { let paths: Box<[_]> = self.selected_paths(entity_opt).collect(); - if let Some(current_path) = paths.first() { - if let Some(destination) = current_path.parent().zip(current_path.file_stem()) { - let to = destination.0.to_path_buf(); - let name = destination.1.to_str().unwrap_or_default().to_string(); - let archive_type = ArchiveType::default(); - return self.push_dialog( - DialogPage::Compress { - paths, - to, - name, - archive_type, - password: None, - }, - Some(self.dialog_text_input.clone()), - ); - } + if let Some(current_path) = paths.first() + && let Some(destination) = current_path.parent().zip(current_path.file_stem()) + { + let to = destination.0.to_path_buf(); + let name = destination.1.to_str().unwrap_or_default().to_string(); + let archive_type = ArchiveType::default(); + return self.push_dialog( + DialogPage::Compress { + paths, + to, + name, + archive_type, + password: None, + }, + Some(self.dialog_text_input.clone()), + ); } } Message::Config(config) => { @@ -2664,10 +2659,10 @@ impl Application for App { } } Message::Copy(entity_opt) => { - if let Some(entity) = entity_opt { - if let Some(tab) = self.tab_model.data_mut::(entity) { - tab.refresh_cut(&[]); - } + if let Some(entity) = entity_opt + && let Some(tab) = self.tab_model.data_mut::(entity) + { + tab.refresh_cut(&[]); } let paths = self.selected_paths(entity_opt); let contents = ClipboardCopy::new(ClipboardKind::Copy, paths); @@ -2975,22 +2970,21 @@ impl Application for App { DialogResult::Cancel => {} DialogResult::Open(selected_paths) => { let mut archive_paths = None; - if let Some(file_dialog) = &self.file_dialog_opt { - if let Some(window) = self.windows.remove(&file_dialog.window_id()) { - if let WindowKind::FileDialog(paths) = window.kind { - archive_paths = paths; - } - } + if let Some(file_dialog) = &self.file_dialog_opt + && let Some(window) = self.windows.remove(&file_dialog.window_id()) + && let WindowKind::FileDialog(paths) = window.kind + { + archive_paths = paths; } - if let Some(archive_paths) = archive_paths { - if !selected_paths.is_empty() { - self.file_dialog_opt = None; - return self.operation(Operation::Extract { - paths: archive_paths, - to: selected_paths[0].clone(), - password: None, - }); - } + if let Some(archive_paths) = archive_paths + && !selected_paths.is_empty() + { + self.file_dialog_opt = None; + return self.operation(Operation::Extract { + paths: archive_paths, + to: selected_paths[0].clone(), + password: None, + }); } } } @@ -3020,56 +3014,53 @@ impl Application for App { && !modifiers.control() && !modifiers.alt() && matches!(key, Key::Character(_)) + && let Some(text) = text { - if let Some(text) = text { - match self.config.type_to_search { - TypeToSearch::Recursive => { - let mut term = - self.search_get().unwrap_or_default().to_string(); - term.push_str(&text); - return self.search_set_active(Some(term)); - } - TypeToSearch::EnterPath => { - if let Some(tab) = self.tab_model.data_mut::(entity) { - let location = tab - .edit_location - .as_ref() - .map_or_else(|| &tab.location, |x| &x.location); - // Try to add text to end of location - if let Location::Network(uri, ..) = location { - let mut uri_string = uri.clone(); - uri_string.push_str(&text); - tab.edit_location = - Some(location.with_uri(uri_string).into()); - } else if let Some(path) = location.path_opt() { - let mut path_string = - path.to_string_lossy().into_owned(); - path_string.push_str(&text); - tab.edit_location = - Some(location.with_path(path_string.into()).into()); - } + match self.config.type_to_search { + TypeToSearch::Recursive => { + let mut term = self.search_get().unwrap_or_default().to_string(); + term.push_str(&text); + return self.search_set_active(Some(term)); + } + TypeToSearch::EnterPath => { + if let Some(tab) = self.tab_model.data_mut::(entity) { + let location = tab + .edit_location + .as_ref() + .map_or_else(|| &tab.location, |x| &x.location); + // Try to add text to end of location + if let Location::Network(uri, ..) = location { + let mut uri_string = uri.clone(); + uri_string.push_str(&text); + tab.edit_location = + Some(location.with_uri(uri_string).into()); + } else if let Some(path) = location.path_opt() { + let mut path_string = path.to_string_lossy().into_owned(); + path_string.push_str(&text); + tab.edit_location = + Some(location.with_path(path_string.into()).into()); } } - TypeToSearch::SelectByPrefix => { - // Reset buffer if timeout elapsed - if let Some(last_key) = self.type_select_last_key { - if last_key.elapsed() >= tab::TYPE_SELECT_TIMEOUT { - self.type_select_prefix.clear(); - } - } + } + TypeToSearch::SelectByPrefix => { + // Reset buffer if timeout elapsed + if let Some(last_key) = self.type_select_last_key + && last_key.elapsed() >= tab::TYPE_SELECT_TIMEOUT + { + self.type_select_prefix.clear(); + } - // Accumulate character and select - self.type_select_prefix.push_str(&text.to_lowercase()); - self.type_select_last_key = Some(Instant::now()); + // Accumulate character and select + self.type_select_prefix.push_str(&text.to_lowercase()); + self.type_select_last_key = Some(Instant::now()); - if let Some(tab) = self.tab_model.data_mut::(entity) { - tab.select_by_prefix(&self.type_select_prefix); - if let Some(offset) = tab.select_focus_scroll() { - return scrollable::scroll_to( - tab.scrollable_id.clone(), - offset, - ); - } + if let Some(tab) = self.tab_model.data_mut::(entity) { + tab.select_by_prefix(&self.type_select_prefix); + if let Some(offset) = tab.select_focus_scroll() { + return scrollable::scroll_to( + tab.scrollable_id.clone(), + offset, + ); } } } @@ -3106,21 +3097,22 @@ impl Application for App { let mut unmounted = Vec::new(); if let Some(old_items) = self.mounter_items.get(&mounter_key) { for old_item in old_items { - if let Some(old_path) = old_item.path() { - if old_item.is_mounted() { - let mut still_mounted = false; - for item in &mounter_items { - if let Some(path) = item.path() { - if path == old_path && item.is_mounted() { - still_mounted = true; - break; - } - } - } - if !still_mounted { - unmounted.push(old_path); + if let Some(old_path) = old_item.path() + && old_item.is_mounted() + { + let mut still_mounted = false; + for item in &mounter_items { + if let Some(path) = item.path() + && path == old_path + && item.is_mounted() + { + still_mounted = true; + break; } } + if !still_mounted { + unmounted.push(old_path); + } } } } @@ -3254,17 +3246,17 @@ impl Application for App { } Message::NewItem(entity_opt, dir) => { let entity = entity_opt.unwrap_or_else(|| self.tab_model.active()); - if let Some(tab) = self.tab_model.data_mut::(entity) { - if let Some(path) = tab.location.path_opt() { - return Task::batch([ - self.dialog_pages.push_back(DialogPage::NewItem { - parent: path.clone(), - name: String::new(), - dir, - }), - widget::text_input::focus(self.dialog_text_input.clone()), - ]); - } + if let Some(tab) = self.tab_model.data_mut::(entity) + && let Some(path) = tab.location.path_opt() + { + return Task::batch([ + self.dialog_pages.push_back(DialogPage::NewItem { + parent: path.clone(), + name: String::new(), + dir, + }), + widget::text_input::focus(self.dialog_text_input.clone()), + ]); } } #[cfg(feature = "notify")] @@ -3277,57 +3269,57 @@ impl Application for App { let mut needs_reload = Vec::new(); let entities: Box<[_]> = self.tab_model.iter().collect(); for entity in entities { - if let Some(tab) = self.tab_model.data_mut::(entity) { - if let Some(path) = tab.location.path_opt() { - let mut contains_change = false; - for event in &events { - for event_path in &event.paths { - if event_path.starts_with(path) { - if let notify::EventKind::Modify( - notify::event::ModifyKind::Metadata(_) - | notify::event::ModifyKind::Data(_), - ) = event.kind - { - // If metadata or data changed, find the matching item and reload it - //TODO: this could be further optimized by looking at what exactly changed - if let Some(items) = &mut tab.items_opt { - for item in items.iter_mut() { - if item.path_opt() == Some(event_path) { - //TODO: reload more, like mime types? - match fs::metadata(event_path) { - Ok(new_metadata) => { - if let ItemMetadata::Path { - metadata, - .. - } = &mut item.metadata - { - *metadata = new_metadata; - } - } - - Err(err) => { - log::warn!( - "failed to reload metadata for {}: {}", - path.display(), - err - ); + if let Some(tab) = self.tab_model.data_mut::(entity) + && let Some(path) = tab.location.path_opt() + { + let mut contains_change = false; + for event in &events { + for event_path in &event.paths { + if event_path.starts_with(path) { + if let notify::EventKind::Modify( + notify::event::ModifyKind::Metadata(_) + | notify::event::ModifyKind::Data(_), + ) = event.kind + { + // If metadata or data changed, find the matching item and reload it + //TODO: this could be further optimized by looking at what exactly changed + if let Some(items) = &mut tab.items_opt { + for item in items.iter_mut() { + if item.path_opt() == Some(event_path) { + //TODO: reload more, like mime types? + match fs::metadata(event_path) { + Ok(new_metadata) => { + if let ItemMetadata::Path { + metadata, + .. + } = &mut item.metadata + { + *metadata = new_metadata; } } - //TODO item.thumbnail_opt = + + Err(err) => { + log::warn!( + "failed to reload metadata for {}: {}", + path.display(), + err + ); + } } + //TODO item.thumbnail_opt = } } - } else { - // Any other events reload the whole tab - contains_change = true; - break; } + } else { + // Any other events reload the whole tab + contains_change = true; + break; } } } - if contains_change { - needs_reload.push((entity, tab.location.clone())); - } + } + if contains_change { + needs_reload.push((entity, tab.location.clone())); } } } @@ -3351,20 +3343,21 @@ impl Application for App { if let Some(terminal) = self.mime_app_cache.terminal() { let mut paths = Box::from([]); let entity = entity_opt.unwrap_or_else(|| self.tab_model.active()); - if let Some(tab) = self.tab_model.data_mut::(entity) { - if let Some(path) = tab.location.path_opt() { - if let Some(items) = tab.items_opt() { - paths = - items - .iter() - .filter_map(|item| { - if item.selected { item.path_opt() } else { None } - }) - .collect(); - } - if paths.is_empty() { - paths = Box::from([path]); - } + if let Some(tab) = self.tab_model.data_mut::(entity) + && let Some(path) = tab.location.path_opt() + { + if let Some(items) = tab.items_opt() { + paths = items + .iter() + .filter_map( + |item| { + if item.selected { item.path_opt() } else { None } + }, + ) + .collect(); + } + if paths.is_empty() { + paths = Box::from([path]); } } for path in paths { @@ -3454,30 +3447,30 @@ impl Application for App { }, Message::OpenWithDialog(entity_opt) => { let entity = entity_opt.unwrap_or_else(|| self.tab_model.active()); - if let Some(tab) = self.tab_model.data::(entity) { - if let Some(items) = tab.items_opt() { - for item in items { - if !item.selected { - continue; - } - let Some(path) = item.path_opt() else { - continue; - }; - return self.push_dialog( - DialogPage::OpenWith { - path: path.clone(), - mime: item.mime.clone(), - selected: 0, - store_opt: "x-scheme-handler/mime" - .parse::() - .ok() - .and_then(|mime| { - self.mime_app_cache.get(&mime).first().cloned() - }), - }, - Some(CONFIRM_OPEN_WITH_BUTTON_ID.clone()), - ); + if let Some(tab) = self.tab_model.data::(entity) + && let Some(items) = tab.items_opt() + { + for item in items { + if !item.selected { + continue; } + let Some(path) = item.path_opt() else { + continue; + }; + return self.push_dialog( + DialogPage::OpenWith { + path: path.clone(), + mime: item.mime.clone(), + selected: 0, + store_opt: "x-scheme-handler/mime" + .parse::() + .ok() + .and_then(|mime| { + self.mime_app_cache.get(&mime).first().cloned() + }), + }, + Some(CONFIRM_OPEN_WITH_BUTTON_ID.clone()), + ); } } } @@ -3488,19 +3481,18 @@ impl Application for App { } Message::Paste(entity_opt) => { let entity = entity_opt.unwrap_or_else(|| self.tab_model.active()); - if let Some(tab) = self.tab_model.data_mut::(entity) { - if let Some(path) = tab.location.path_opt() { - let to = path.clone(); - return clipboard::read_data::().map(move |contents_opt| { - match contents_opt { - Some(contents) => cosmic::action::app(Message::PasteContents( - to.clone(), - contents, - )), - None => cosmic::action::none(), + if let Some(tab) = self.tab_model.data_mut::(entity) + && let Some(path) = tab.location.path_opt() + { + let to = path.clone(); + return clipboard::read_data::().map(move |contents_opt| { + match contents_opt { + Some(contents) => { + cosmic::action::app(Message::PasteContents(to.clone(), contents)) } - }); - } + None => cosmic::action::none(), + } + }); } } Message::PasteContents(to, mut contents) => { @@ -3733,38 +3725,38 @@ impl Application for App { } Message::Rename(entity_opt) => { let entity = entity_opt.unwrap_or_else(|| self.tab_model.active()); - if let Some(tab) = self.tab_model.data_mut::(entity) { - if let Some(items) = tab.items_opt() { - let selected: Box<[_]> = items - .iter() - .filter_map(|item| { - if item.selected { - item.path_opt().cloned() - } else { - None - } + if let Some(tab) = self.tab_model.data_mut::(entity) + && let Some(items) = tab.items_opt() + { + let selected: Box<[_]> = items + .iter() + .filter_map(|item| { + if item.selected { + item.path_opt().cloned() + } else { + None + } + }) + .collect(); + if !selected.is_empty() { + //TODO: batch rename + let tasks = selected + .into_iter() + .filter_map(|path| { + let parent = path.parent()?.to_path_buf(); + let name = path.file_name()?.to_str()?.to_string(); + let dir = path.is_dir(); + Some(self.dialog_pages.push_back(DialogPage::RenameItem { + from: path, + parent, + name, + dir, + })) }) - .collect(); - if !selected.is_empty() { - //TODO: batch rename - let tasks = selected - .into_iter() - .filter_map(|path| { - let parent = path.parent()?.to_path_buf(); - let name = path.file_name()?.to_str()?.to_string(); - let dir = path.is_dir(); - Some(self.dialog_pages.push_back(DialogPage::RenameItem { - from: path, - parent, - name, - dir, - })) - }) - .chain(std::iter::once(widget::text_input::focus( - self.dialog_text_input.clone(), - ))); - return Task::batch(tasks); - } + .chain(std::iter::once(widget::text_input::focus( + self.dialog_text_input.clone(), + ))); + return Task::batch(tasks); } } } @@ -3787,15 +3779,15 @@ impl Application for App { Message::RestoreFromTrash(entity_opt) => { let mut trash_items = Vec::new(); let entity = entity_opt.unwrap_or_else(|| self.tab_model.active()); - if let Some(tab) = self.tab_model.data_mut::(entity) { - if let Some(items) = tab.items_opt() { - for item in items { - if item.selected { - if let ItemMetadata::Trash { entry, .. } = &item.metadata { - trash_items.push(entry.clone()); - } else { - //TODO: error on trying to restore non-trash file? - } + if let Some(tab) = self.tab_model.data_mut::(entity) + && let Some(items) = tab.items_opt() + { + for item in items { + if item.selected { + if let ItemMetadata::Trash { entry, .. } = &item.metadata { + trash_items.push(entry.clone()); + } else { + //TODO: error on trying to restore non-trash file? } } } @@ -3840,13 +3832,13 @@ impl Application for App { // Close old context menu let active = self.tab_model.active(); - if let Some(tab) = self.tab_model.data_mut::(active) { - if tab.context_menu.is_some() { - tasks.push(self.update(Message::TabMessage( - Some(active), - tab::Message::ContextMenu(None, None), - ))); - } + if let Some(tab) = self.tab_model.data_mut::(active) + && tab.context_menu.is_some() + { + tasks.push(self.update(Message::TabMessage( + Some(active), + tab::Message::ContextMenu(None, None), + ))); } // Activate new tab @@ -4042,10 +4034,10 @@ impl Application for App { // Destroy previous popup let mut window_ids = Vec::new(); for (window_id, window) in &self.windows { - if let WindowKind::ContextMenu(e, _) = &window.kind { - if *e == entity { - window_ids.push(*window_id); - } + if let WindowKind::ContextMenu(e, _) = &window.kind + && *e == entity + { + window_ids.push(*window_id); } } for window_id in window_ids { @@ -4453,12 +4445,12 @@ impl Application for App { } } Message::NavBarClose(entity) => { - if let Some(data) = self.nav_model.data::(entity) { - if let Some(mounter) = MOUNTERS.get(&data.0) { - return mounter - .unmount(data.1.clone()) - .map(|()| cosmic::action::none()); - } + if let Some(data) = self.nav_model.data::(entity) + && let Some(mounter) = MOUNTERS.get(&data.0) + { + return mounter + .unmount(data.1.clone()) + .map(|()| cosmic::action::none()); } } Message::NavBarContext(entity) => { @@ -4755,15 +4747,14 @@ impl Application for App { if let Some(p) = paths.next() { { for (k, mounter_items) in &self.mounter_items { - if let Some(mounter) = MOUNTERS.get(k) { - if let Some(item) = mounter_items + if let Some(mounter) = MOUNTERS.get(k) + && let Some(item) = mounter_items .iter() .find(|&item| item.path().is_some_and(|path| path == p)) - { - return mounter - .unmount(item.clone()) - .map(|()| cosmic::action::none()); - } + { + return mounter + .unmount(item.clone()) + .map(|()| cosmic::action::none()); } } } @@ -4786,15 +4777,14 @@ impl Application for App { } Message::SaveSortNames => { self.must_save_sort_names = false; - if let Some(state_handler) = self.state_handler.as_ref() { - if let Err(err) = state_handler + if let Some(state_handler) = self.state_handler.as_ref() + && let Err(err) = state_handler .set::<&FxOrderMap>( "sort_names", &self.state.sort_names, ) - { - log::warn!("Failed to save sort names: {err:?}"); - } + { + log::warn!("Failed to save sort names: {err:?}"); } } Message::NetworkDriveOpenEntityAfterMount { entity } => { @@ -4890,13 +4880,13 @@ impl Application for App { fn dialog(&self) -> Option> { //TODO: should gallery view just be a dialog? let entity = self.tab_model.active(); - if let Some(tab) = self.tab_model.data::(entity) { - if tab.gallery { - return Some( - tab.gallery_view() - .map(move |x| Message::TabMessage(Some(entity), x)), - ); - } + if let Some(tab) = self.tab_model.data::(entity) + && tab.gallery + { + return Some( + tab.gallery_view() + .map(move |x| Message::TabMessage(Some(entity), x)), + ); } let dialog_page = self.dialog_pages.front()?; @@ -5778,19 +5768,19 @@ impl Application for App { let mut tab_column = widget::column::with_capacity(4); - if self.core.is_condensed() { - if let Some(term) = self.search_get() { - tab_column = tab_column.push( - widget::container( - widget::text_input::search_input("", term) - .width(Length::Fill) - .id(self.search_id.clone()) - .on_clear(Message::SearchClear) - .on_input(Message::SearchInput), - ) - .padding(space_xxs), - ); - } + if self.core.is_condensed() + && let Some(term) = self.search_get() + { + tab_column = tab_column.push( + widget::container( + widget::text_input::search_input("", term) + .width(Length::Fill) + .id(self.search_id.clone()) + .on_clear(Message::SearchClear) + .on_input(Message::SearchInput), + ) + .padding(space_xxs), + ); } if self.tab_model.len() > 1 { @@ -6088,14 +6078,14 @@ impl Application for App { let should_rescan = events.iter().any(|event| !event.kind.is_access()); - if should_rescan { - if let Err(e) = futures::executor::block_on(async { + if should_rescan + && let Err(e) = futures::executor::block_on(async { output.send(Message::RescanTrash).await - }) { - log::warn!( - "trash needs to be rescanned but sending message failed: {e:?}" - ); - } + }) + { + log::warn!( + "trash needs to be rescanned but sending message failed: {e:?}" + ); } } Err(e) => { @@ -6173,14 +6163,12 @@ impl Application for App { || kind.is_modify() || kind.is_remove() || kind.is_other() + }) && let Err(e) = futures::executor::block_on(async { + output.send(Message::RescanRecents).await }) { - if let Err(e) = futures::executor::block_on(async { - output.send(Message::RescanRecents).await - }) { - log::warn!( - "open recents tabs need to be updated but sending message failed: {e:?}" - ); - } + log::warn!( + "open recents tabs need to be updated but sending message failed: {e:?}" + ); } } Err(e) => { @@ -6297,17 +6285,16 @@ impl Application for App { let mut selected_previews = Vec::new(); match self.mode { Mode::App => { - if self.core.window.show_context { - if let ContextPage::Preview(entity_opt, PreviewKind::Selected) = + if self.core.window.show_context + && let ContextPage::Preview(entity_opt, PreviewKind::Selected) = self.context_page - { - selected_previews - .push(Some(entity_opt.unwrap_or_else(|| self.tab_model.active()))); - } + { + selected_previews + .push(Some(entity_opt.unwrap_or_else(|| self.tab_model.active()))); } } Mode::Desktop => { - for window_kind in self.windows.iter().map(|(_, window)| &window.kind) { + for window_kind in self.windows.values().map(|window| &window.kind) { if let WindowKind::Preview(entity_opt, _) = window_kind { selected_previews .push(Some(entity_opt.unwrap_or_else(|| self.tab_model.active()))); @@ -6322,8 +6309,7 @@ impl Application for App { tab.subscription( selected_previews .iter() - .find(|preview| preview.as_ref() == Some(entity).as_ref()) - .is_some(), + .any(|preview| preview.as_ref() == Some(entity).as_ref()), ) .with(entity) .map(|(entity, tab_msg)| Message::TabMessage(Some(entity), tab_msg)), diff --git a/src/dialog.rs b/src/dialog.rs index 4f36ae0..feaa2e5 100644 --- a/src/dialog.rs +++ b/src/dialog.rs @@ -179,11 +179,11 @@ impl> From for DialogLabel { }); } - if let Some(span) = spans.last_mut() { - if underline == span.underline { - span.text.push(c); - continue; - } + if let Some(span) = spans.last_mut() + && underline == span.underline + { + span.text.push(c); + continue; } spans.push(DialogLabelSpan { @@ -718,10 +718,10 @@ impl App { children.push(preview); } - if children.is_empty() { - if let Some(item) = &self.tab.parent_item_opt { - children.push(item.preview_view(None, military_time)); - } + if children.is_empty() + && let Some(item) = &self.tab.parent_item_opt + { + children.push(item.preview_view(None, military_time)); } } } @@ -1279,12 +1279,12 @@ impl Application for App { return self.update(message); } - if let Some(data) = self.nav_model.data::(entity) { - if let Some(mounter) = MOUNTERS.get(&data.0) { - return mounter - .mount(data.1.clone()) - .map(|()| cosmic::action::none()); - } + if let Some(data) = self.nav_model.data::(entity) + && let Some(mounter) = MOUNTERS.get(&data.0) + { + return mounter + .mount(data.1.clone()) + .map(|()| cosmic::action::none()); } Task::none() } @@ -1322,10 +1322,10 @@ impl Application for App { // Close the dialog if the focused widget is the dialog's main text input instead of // unfocussing the widget. - if let operation::Outcome::Some(focused) = operation::focusable::find_focused().finish() { - if self.dialog_text_input == focused { - return self.update(Message::Cancel); - } + if let operation::Outcome::Some(focused) = operation::focusable::find_focused().finish() + && self.dialog_text_input == focused + { + return self.update(Message::Cancel); } self.update(Message::Cancel) @@ -1419,14 +1419,14 @@ impl Application for App { } // Check key binds from accept label - if let Some(key_bind) = &self.accept_label.key_bind_opt { - if key_bind.matches(modifiers, &key) { - return self.update(if self.flags.kind.save() { - Message::Save(false) - } else { - Message::Open - }); - } + if let Some(key_bind) = &self.accept_label.key_bind_opt + && key_bind.matches(modifiers, &key) + { + return self.update(if self.flags.kind.save() { + Message::Save(false) + } else { + Message::Open + }); } // Uncaptured keys with only shift modifiers go to the search or location box @@ -1434,45 +1434,44 @@ impl Application for App { && !modifiers.control() && !modifiers.alt() && matches!(key, Key::Character(_)) + && let Some(text) = text { - if let Some(text) = text { - match self.flags.config.type_to_search { - TypeToSearch::Recursive => { - let mut term = self.search_get().unwrap_or_default().to_string(); - term.push_str(&text); - return self.search_set(Some(term)); + match self.flags.config.type_to_search { + TypeToSearch::Recursive => { + let mut term = self.search_get().unwrap_or_default().to_string(); + term.push_str(&text); + return self.search_set(Some(term)); + } + TypeToSearch::EnterPath => { + let location = (self.tab.edit_location) + .as_ref() + .map_or_else(|| &self.tab.location, |x| &x.location); + // Try to add text to end of location + if let Some(path) = location.path_opt() { + let mut path_string = path.to_string_lossy().to_string(); + path_string.push_str(&text); + self.tab.edit_location = + Some(location.with_path(PathBuf::from(path_string)).into()); } - TypeToSearch::EnterPath => { - let location = (self.tab.edit_location) - .as_ref() - .map_or_else(|| &self.tab.location, |x| &x.location); - // Try to add text to end of location - if let Some(path) = location.path_opt() { - let mut path_string = path.to_string_lossy().to_string(); - path_string.push_str(&text); - self.tab.edit_location = - Some(location.with_path(PathBuf::from(path_string)).into()); - } + } + TypeToSearch::SelectByPrefix => { + // Reset buffer if timeout elapsed + if let Some(last_key) = self.type_select_last_key + && last_key.elapsed() >= tab::TYPE_SELECT_TIMEOUT + { + self.type_select_prefix.clear(); } - TypeToSearch::SelectByPrefix => { - // Reset buffer if timeout elapsed - if let Some(last_key) = self.type_select_last_key { - if last_key.elapsed() >= tab::TYPE_SELECT_TIMEOUT { - self.type_select_prefix.clear(); - } - } - // Accumulate character and select - self.type_select_prefix.push_str(&text.to_lowercase()); - self.type_select_last_key = Some(Instant::now()); + // Accumulate character and select + self.type_select_prefix.push_str(&text.to_lowercase()); + self.type_select_last_key = Some(Instant::now()); - self.tab.select_by_prefix(&self.type_select_prefix); - if let Some(offset) = self.tab.select_focus_scroll() { - return scrollable::scroll_to( - self.tab.scrollable_id.clone(), - offset, - ); - } + self.tab.select_by_prefix(&self.type_select_prefix); + if let Some(offset) = self.tab.select_focus_scroll() { + return scrollable::scroll_to( + self.tab.scrollable_id.clone(), + offset, + ); } } } @@ -1486,21 +1485,22 @@ impl Application for App { let mut unmounted = Vec::new(); if let Some(old_items) = self.mounter_items.get(&mounter_key) { for old_item in old_items { - if let Some(old_path) = old_item.path() { - if old_item.is_mounted() { - let mut still_mounted = false; - for item in &mounter_items { - if let Some(path) = item.path() { - if path == old_path && item.is_mounted() { - still_mounted = true; - break; - } - } - } - if !still_mounted { - unmounted.push(Location::Path(old_path)); + if let Some(old_path) = old_item.path() + && old_item.is_mounted() + { + let mut still_mounted = false; + for item in &mounter_items { + if let Some(path) = item.path() + && path == old_path + && item.is_mounted() + { + still_mounted = true; + break; } } + if !still_mounted { + unmounted.push(Location::Path(old_path)); + } } } } @@ -1601,16 +1601,16 @@ impl Application for App { let mut paths = Vec::new(); if let Some(items) = self.tab.items_opt() { for item in items { - if item.selected { - if let Some(path) = item.path_opt() { - paths.push(path.clone()); - let _ = update_recently_used( - path, - Self::APP_ID.to_string(), - "cosmic-files".to_string(), - None, - ); - } + if item.selected + && let Some(path) = item.path_opt() + { + paths.push(path.clone()); + let _ = update_recently_used( + path, + Self::APP_ID.to_string(), + "cosmic-files".to_string(), + None, + ); } } } @@ -1640,11 +1640,11 @@ impl Application for App { } // If we are in directory mode, return the current directory - if self.flags.kind.is_dir() { - if let Location::Path(tab_path) = &self.tab.location { - self.result_opt = Some(DialogResult::Open(vec![tab_path.clone()])); - return window::close(self.flags.window_id); - } + if self.flags.kind.is_dir() + && let Location::Path(tab_path) = &self.tab.location + { + self.result_opt = Some(DialogResult::Open(vec![tab_path.clone()])); + return window::close(self.flags.window_id); } } Message::Preview => { @@ -1654,26 +1654,24 @@ impl Application for App { }); } Message::Save(replace) => { - if let DialogKind::SaveFile { filename } = &self.flags.kind { - if !filename.is_empty() { - if let Some(tab_path) = self.tab.location.path_opt() { - let path = tab_path.join(filename); - if path.is_dir() { - // cd to directory - let message = Message::TabMessage(tab::Message::Location( - Location::Path(path), - )); - return self.update(message); - } else if !replace && path.exists() { - self.dialog_pages.push_back(DialogPage::Replace { - filename: filename.clone(), - }); - return widget::button::focus(REPLACE_BUTTON_ID.clone()); - } - self.result_opt = Some(DialogResult::Open(vec![path])); - return window::close(self.flags.window_id); - } + if let DialogKind::SaveFile { filename } = &self.flags.kind + && !filename.is_empty() + && let Some(tab_path) = self.tab.location.path_opt() + { + let path = tab_path.join(filename); + if path.is_dir() { + // cd to directory + let message = + Message::TabMessage(tab::Message::Location(Location::Path(path))); + return self.update(message); + } else if !replace && path.exists() { + self.dialog_pages.push_back(DialogPage::Replace { + filename: filename.clone(), + }); + return widget::button::focus(REPLACE_BUTTON_ID.clone()); } + self.result_opt = Some(DialogResult::Open(vec![path])); + return window::close(self.flags.window_id); } } Message::ScrollTab(scroll_speed) => { @@ -1703,16 +1701,14 @@ impl Application for App { let tab_commands = self.tab.update(tab_message, self.modifiers); // Update filename box when anything is selected - if let DialogKind::SaveFile { filename } = &mut self.flags.kind { - if let Some(click_i) = click_i_opt { - if let Some(items) = self.tab.items_opt() { - if let Some(item) = items.get(click_i) { - if item.selected && !item.metadata.is_dir() { - filename.clone_from(&item.name); - } - } - } - } + if let DialogKind::SaveFile { filename } = &mut self.flags.kind + && let Some(click_i) = click_i_opt + && let Some(items) = self.tab.items_opt() + && let Some(item) = items.get(click_i) + && item.selected + && !item.metadata.is_dir() + { + filename.clone_from(&item.name); } let mut commands = Vec::new(); @@ -1840,34 +1836,34 @@ impl Application for App { Message::TabRescan(location, parent_item_opt, mut items, selection_paths) => { if location == self.tab.location { // Filter - if let Some(filter_i) = self.filter_selected { - if let Some(filter) = self.filters.get(filter_i) { - // Parse globs (Mime implements PartialEq with &str, so no need to parse) - let mut parsed_globs = Vec::new(); - let mut mimes = Vec::new(); - for pattern in &filter.patterns { - match pattern { - DialogFilterPattern::Glob(value) => { - match glob::Pattern::new(value) { - Ok(glob) => parsed_globs.push(glob), - Err(err) => { - log::warn!("failed to parse glob {value:?}: {err}"); - } + if let Some(filter_i) = self.filter_selected + && let Some(filter) = self.filters.get(filter_i) + { + // Parse globs (Mime implements PartialEq with &str, so no need to parse) + let mut parsed_globs = Vec::new(); + let mut mimes = Vec::new(); + for pattern in &filter.patterns { + match pattern { + DialogFilterPattern::Glob(value) => { + match glob::Pattern::new(value) { + Ok(glob) => parsed_globs.push(glob), + Err(err) => { + log::warn!("failed to parse glob {value:?}: {err}"); } } - DialogFilterPattern::Mime(value) => mimes.push(value.as_str()), } + DialogFilterPattern::Mime(value) => mimes.push(value.as_str()), } + } - items.retain(|item| { - // Directories are always shown - item.metadata.is_dir() + items.retain(|item| { + // Directories are always shown + item.metadata.is_dir() // Check for mime type match (first because it is faster) || mimes.iter().copied().any(|mime| mime == item.mime) // Check for glob match (last because it is slower) || parsed_globs.iter().any(|glob| glob.matches(&item.name)) - }); - } + }); } // Select based on filename @@ -1944,19 +1940,19 @@ impl Application for App { let mut col = widget::column::with_capacity(2); - if self.core.is_condensed() { - if let Some(term) = self.search_get() { - col = col.push( - widget::container( - widget::text_input::search_input("", term) - .width(Length::Fill) - .id(self.search_id.clone()) - .on_clear(Message::SearchClear) - .on_input(Message::SearchInput), - ) - .padding(space_xxs), - ); - } + if self.core.is_condensed() + && let Some(term) = self.search_get() + { + col = col.push( + widget::container( + widget::text_input::search_input("", term) + .width(Length::Fill) + .id(self.search_id.clone()) + .on_clear(Message::SearchClear) + .on_input(Message::SearchInput), + ) + .padding(space_xxs), + ); } col = col.push( diff --git a/src/large_image.rs b/src/large_image.rs index 6a2cf6b..8686a97 100644 --- a/src/large_image.rs +++ b/src/large_image.rs @@ -392,16 +392,16 @@ impl LargeImageManager { generation: u64, ) -> bool { // Check if this decode is still current (not superseded by a newer one) - if let Some(¤t_gen) = self.decode_generations.get(&path) { - if generation != current_gen { - log::info!( - "Discarding outdated decode for {} (generation {} != current {})", - path.display(), - generation, - current_gen - ); - return false; - } + if let Some(¤t_gen) = self.decode_generations.get(&path) + && generation != current_gen + { + log::info!( + "Discarding outdated decode for {} (generation {} != current {})", + path.display(), + generation, + current_gen + ); + return false; } log::info!( @@ -556,7 +556,7 @@ impl LargeImageManager { /// Check if sufficient memory is available, clearing cache if needed. /// Returns true if memory is available, false otherwise. - fn ensure_memory_available(&mut self, path: &PathBuf, width: u32, height: u32) -> bool { + fn ensure_memory_available(&mut self, path: &Path, width: u32, height: u32) -> bool { let (has_memory, error_opt) = check_memory_available(width, height); if has_memory { @@ -565,7 +565,7 @@ impl LargeImageManager { if self.cache_is_empty() { if let Some(error_msg) = error_opt { - self.store_error(path.clone(), error_msg); + self.store_error(path.to_path_buf(), error_msg); log::warn!( "Cannot load {}: insufficient memory and cache is empty", path.display() @@ -588,7 +588,7 @@ impl LargeImageManager { } if let Some(error_msg) = error_opt_after { - self.store_error(path.clone(), error_msg); + self.store_error(path.to_path_buf(), error_msg); log::warn!( "Cannot load {}: insufficient memory even after cache clear", path.display() diff --git a/src/localize.rs b/src/localize.rs index 1eb11ee..f561a42 100644 --- a/src/localize.rs +++ b/src/localize.rs @@ -62,10 +62,10 @@ pub static LOCALE: LazyLock = LazyLock::new(|| { } // Try language-only fallback (e.g., "en" from "en-US") - if let Some(lang) = cleaned_locale.split('-').next() { - if let Ok(locale) = Locale::try_from_str(lang) { - return locale; - } + if let Some(lang) = cleaned_locale.split('-').next() + && let Ok(locale) = Locale::try_from_str(lang) + { + return locale; } } } diff --git a/src/mime_app.rs b/src/mime_app.rs index cee1456..4a55cdf 100644 --- a/src/mime_app.rs +++ b/src/mime_app.rs @@ -310,7 +310,7 @@ impl MimeAppCache { for (mime, filenames) in list.removed_associations.iter() { for filename in filenames { log::trace!("remove {mime}={filename}"); - if let Some(apps) = self.cache.get_mut(&mime) { + if let Some(apps) = self.cache.get_mut(mime) { apps.retain(|x| !filename_eq(&x.path, filename)); } } @@ -319,7 +319,7 @@ impl MimeAppCache { for (mime, filenames) in list.default_apps.iter() { for filename in filenames { log::trace!("default {mime}={filename}"); - if let Some(apps) = self.cache.get_mut(&mime) { + if let Some(apps) = self.cache.get_mut(mime) { let mut found = false; for app in apps.iter_mut() { if filename_eq(&app.path, filename) { diff --git a/src/mounter/gvfs.rs b/src/mounter/gvfs.rs index 9fdaf12..77fd4eb 100644 --- a/src/mounter/gvfs.rs +++ b/src/mounter/gvfs.rs @@ -23,12 +23,11 @@ fn resolve_uri(uri: &str) -> (String, gio::File) { TARGET_URI_ATTRIBUTE, gio::FileQueryInfoFlags::NONE, gio::Cancellable::NONE, - ) { - if let Some(resolved_uri) = file_info.attribute_as_string(TARGET_URI_ATTRIBUTE) { - let resolved_uri = String::from(resolved_uri); - let file = gio::File::for_uri(&resolved_uri); - return (resolved_uri, file); - } + ) && let Some(resolved_uri) = file_info.attribute_as_string(TARGET_URI_ATTRIBUTE) + { + let resolved_uri = String::from(resolved_uri); + let file = gio::File::for_uri(&resolved_uri); + return (resolved_uri, file); } (uri.to_string(), file) @@ -60,7 +59,7 @@ fn items(monitor: &gio::VolumeMonitor, sizes: IconSizes) -> MounterItems { gio::Cancellable::NONE, ) .ok() - .and_then(|info| Some(info.boolean(gio::FILE_ATTRIBUTE_FILESYSTEM_REMOTE))) + .map(|info| info.boolean(gio::FILE_ATTRIBUTE_FILESYSTEM_REMOTE)) .unwrap_or(true); // Default to remote if query fails MounterItem::Gvfs(Item { @@ -457,9 +456,9 @@ impl Gvfs { log::info!("mount {name}: result {res:?}"); // Update the mounter_item with mount information after successful mount let mut updated_item = mounter_item.clone(); - if res.is_ok() { - if let MounterItem::Gvfs(ref mut item) = updated_item { - if let Some(mount) = volume_for_callback.get_mount() { + if res.is_ok() + && let MounterItem::Gvfs(ref mut item) = updated_item + && let Some(mount) = volume_for_callback.get_mount() { let root = MountExt::root(&mount); item.path_opt = root.path(); item.is_mounted = true; @@ -469,14 +468,9 @@ impl Gvfs { gio::FILE_ATTRIBUTE_FILESYSTEM_REMOTE, gio::Cancellable::NONE, ) - .ok() - .and_then(|info| { - Some(info.boolean(gio::FILE_ATTRIBUTE_FILESYSTEM_REMOTE)) - }) + .ok().map(|info| info.boolean(gio::FILE_ATTRIBUTE_FILESYSTEM_REMOTE)) .unwrap_or(true); } - } - } event_tx.send(Event::MountResult(updated_item, match res { Ok(()) => { _ = complete_tx.send(Ok(())); diff --git a/src/mouse_area.rs b/src/mouse_area.rs index 978861d..173800c 100644 --- a/src/mouse_area.rs +++ b/src/mouse_area.rs @@ -246,19 +246,18 @@ struct State { impl State { fn drag_rect(&self, cursor: mouse::Cursor) -> Option { - if let Some(drag_source) = self.drag_initiated { - if let Some(position) = cursor.position().or(self.last_virtual_position) { - if position.distance(drag_source) > 1.0 { - let min_x = drag_source.x.min(position.x); - let max_x = drag_source.x.max(position.x); - let min_y = drag_source.y.min(position.y); - let max_y = drag_source.y.max(position.y); - return Some(Rectangle::new( - Point::new(min_x, min_y), - Size::new(max_x - min_x, max_y - min_y), - )); - } - } + if let Some(drag_source) = self.drag_initiated + && let Some(position) = cursor.position().or(self.last_virtual_position) + && position.distance(drag_source) > 1.0 + { + let min_x = drag_source.x.min(position.x); + let max_x = drag_source.x.max(position.x); + let min_y = drag_source.y.min(position.y); + let max_y = drag_source.y.max(position.y); + return Some(Rectangle::new( + Point::new(min_x, min_y), + Size::new(max_x - min_x, max_y - min_y), + )); } None } @@ -527,12 +526,12 @@ fn update( let offset = layout.virtual_offset(); let layout_bounds = layout.bounds(); - let viewport_changed = state.viewport.map_or(true, |v| v != *viewport); + let viewport_changed = state.viewport != Some(*viewport); - if let Some(message) = widget.on_resize.as_ref() { - if viewport_changed { - shell.publish(message(*viewport)); - } + if let Some(message) = widget.on_resize.as_ref() + && viewport_changed + { + shell.publish(message(*viewport)); } state.viewport = Some(*viewport); @@ -664,113 +663,112 @@ fn update( } } - if let Some(message) = widget.on_right_press.as_ref() { - if matches!( + if let Some(message) = widget.on_right_press.as_ref() + && matches!( event, Event::Mouse(mouse::Event::ButtonPressed(mouse::Button::Right)) - ) { - let point_opt = if widget.on_right_press_window_position { - cursor.position_over(layout_bounds).map(|mut p| { - p.x -= offset.x; - p.y -= offset.y; - p - }) - } else { - cursor.position_in(layout_bounds) - }; - shell.publish(message(point_opt)); + ) + { + let point_opt = if widget.on_right_press_window_position { + cursor.position_over(layout_bounds).map(|mut p| { + p.x -= offset.x; + p.y -= offset.y; + p + }) + } else { + cursor.position_in(layout_bounds) + }; + shell.publish(message(point_opt)); - if widget.on_right_press_no_capture { - return event::Status::Ignored; - } - return event::Status::Captured; + if widget.on_right_press_no_capture { + return event::Status::Ignored; } + return event::Status::Captured; } - if let Some(message) = widget.on_right_release.as_ref() { - if matches!( + if let Some(message) = widget.on_right_release.as_ref() + && matches!( event, Event::Mouse(mouse::Event::ButtonReleased(mouse::Button::Right)) - ) { - shell.publish(message(cursor.position_in(layout_bounds))); + ) + { + shell.publish(message(cursor.position_in(layout_bounds))); - return event::Status::Captured; - } + return event::Status::Captured; } - if let Some(message) = widget.on_middle_press.as_ref() { - if matches!( + if let Some(message) = widget.on_middle_press.as_ref() + && matches!( event, Event::Mouse(mouse::Event::ButtonPressed(mouse::Button::Middle)) - ) { - shell.publish(message(cursor.position_in(layout_bounds))); + ) + { + shell.publish(message(cursor.position_in(layout_bounds))); - return event::Status::Captured; - } + return event::Status::Captured; } - if let Some(message) = widget.on_middle_release.as_ref() { - if matches!( + if let Some(message) = widget.on_middle_release.as_ref() + && matches!( event, Event::Mouse(mouse::Event::ButtonReleased(mouse::Button::Middle)) - ) { - shell.publish(message(cursor.position_in(layout_bounds))); + ) + { + shell.publish(message(cursor.position_in(layout_bounds))); - return event::Status::Captured; - } + return event::Status::Captured; } - if let Some(message) = widget.on_back_press.as_ref() { - if matches!( + if let Some(message) = widget.on_back_press.as_ref() + && matches!( event, Event::Mouse(mouse::Event::ButtonPressed(mouse::Button::Back)) - ) { - shell.publish(message(cursor.position_in(layout_bounds))); + ) + { + shell.publish(message(cursor.position_in(layout_bounds))); - return event::Status::Captured; - } + return event::Status::Captured; } - if let Some(message) = widget.on_back_release.as_ref() { - if matches!( + if let Some(message) = widget.on_back_release.as_ref() + && matches!( event, Event::Mouse(mouse::Event::ButtonReleased(mouse::Button::Back)) - ) { - shell.publish(message(cursor.position_in(layout_bounds))); + ) + { + shell.publish(message(cursor.position_in(layout_bounds))); - return event::Status::Captured; - } + return event::Status::Captured; } - if let Some(message) = widget.on_forward_press.as_ref() { - if matches!( + if let Some(message) = widget.on_forward_press.as_ref() + && matches!( event, Event::Mouse(mouse::Event::ButtonPressed(mouse::Button::Forward)) - ) { - shell.publish(message(cursor.position_in(layout_bounds))); + ) + { + shell.publish(message(cursor.position_in(layout_bounds))); - return event::Status::Captured; - } + return event::Status::Captured; } - if let Some(message) = widget.on_forward_release.as_ref() { - if matches!( + if let Some(message) = widget.on_forward_release.as_ref() + && matches!( event, Event::Mouse(mouse::Event::ButtonReleased(mouse::Button::Forward)) - ) { - shell.publish(message(cursor.position_in(layout_bounds))); + ) + { + shell.publish(message(cursor.position_in(layout_bounds))); - return event::Status::Captured; - } + return event::Status::Captured; } - if let Some(on_scroll) = widget.on_scroll.as_ref() { - if let Event::Mouse(mouse::Event::WheelScrolled { delta }) = event { - if let Some(message) = on_scroll(*delta) { - shell.publish(message); - return event::Status::Captured; - } - } + if let Some(on_scroll) = widget.on_scroll.as_ref() + && let Event::Mouse(mouse::Event::WheelScrolled { delta }) = event + && let Some(message) = on_scroll(*delta) + { + shell.publish(message); + return event::Status::Captured; } if let Some((message, drag_rect)) = widget.on_drag.as_ref().zip(state.drag_rect(cursor)) { diff --git a/src/operation/mod.rs b/src/operation/mod.rs index b05488b..208d09a 100644 --- a/src/operation/mod.rs +++ b/src/operation/mod.rs @@ -957,10 +957,10 @@ impl Operation { let dir_name = get_directory_name(file_name); let mut new_dir = to.join(dir_name); - if new_dir.exists() { - if let Some(new_dir_parent) = new_dir.parent() { - new_dir = copy_unique_path(&new_dir, new_dir_parent); - } + if new_dir.exists() + && let Some(new_dir_parent) = new_dir.parent() + { + new_dir = copy_unique_path(&new_dir, new_dir_parent); } op_sel.ignored.push(path.clone()); diff --git a/src/operation/recursive.rs b/src/operation/recursive.rs index cc74a43..953a874 100644 --- a/src/operation/recursive.rs +++ b/src/operation/recursive.rs @@ -138,10 +138,10 @@ impl Context { }), is_cleanup: false, }; - if matches!(method, Method::Move { .. }) { - if let Some(cleanup_op) = op.move_cleanup_op() { - cleanup_ops.push(cleanup_op); - } + if matches!(method, Method::Move { .. }) + && let Some(cleanup_op) = op.move_cleanup_op() + { + cleanup_ops.push(cleanup_op); } if let Some(parent) = op.to.parent() { target_dirs.insert(parent.to_path_buf()); diff --git a/src/tab.rs b/src/tab.rs index 508b5cc..430176a 100644 --- a/src/tab.rs +++ b/src/tab.rs @@ -934,43 +934,43 @@ pub fn scan_path(tab_path: &PathBuf, sizes: IconSizes) -> Vec { #[cfg(feature = "gvfs")] { - if let Ok(path_meta) = fs::metadata(tab_path) { - if fs_kind(&path_meta) == FsKind::Gvfs { - let file = gio::File::for_path(tab_path); + if let Ok(path_meta) = fs::metadata(tab_path) + && fs_kind(&path_meta) == FsKind::Gvfs + { + let file = gio::File::for_path(tab_path); - // gio crate expects a comma delimited string - let attr_string = [ - gio::FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME.as_str(), - gio::FILE_ATTRIBUTE_FILESYSTEM_REMOTE.as_str(), - gio::FILE_ATTRIBUTE_TIME_MODIFIED.as_str(), - gio::FILE_ATTRIBUTE_STANDARD_SIZE.as_str(), - gio::FILE_ATTRIBUTE_STANDARD_TYPE.as_str(), - gio::FILE_ATTRIBUTE_STANDARD_NAME.as_str(), - ] - .join(","); + // gio crate expects a comma delimited string + let attr_string = [ + gio::FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME.as_str(), + gio::FILE_ATTRIBUTE_FILESYSTEM_REMOTE.as_str(), + gio::FILE_ATTRIBUTE_TIME_MODIFIED.as_str(), + gio::FILE_ATTRIBUTE_STANDARD_SIZE.as_str(), + gio::FILE_ATTRIBUTE_STANDARD_TYPE.as_str(), + gio::FILE_ATTRIBUTE_STANDARD_NAME.as_str(), + ] + .join(","); - match gio::prelude::FileExt::enumerate_children( - &file, - attr_string.as_str(), - gio::FileQueryInfoFlags::NONE, - gio::Cancellable::NONE, - ) { - Ok(res) => { - remote_scannable = true; - items = res - .filter_map(|file| { - let file = file.ok()?; - Some(item_from_gvfs_info(tab_path.join(file.name()), file, sizes)) - }) - .collect(); - } - Err(err) => { - log::warn!( - "could not enumerate {} via gio: {}", - tab_path.display(), - err - ); - } + match gio::prelude::FileExt::enumerate_children( + &file, + attr_string.as_str(), + gio::FileQueryInfoFlags::NONE, + gio::Cancellable::NONE, + ) { + Ok(res) => { + remote_scannable = true; + items = res + .filter_map(|file| { + let file = file.ok()?; + Some(item_from_gvfs_info(tab_path.join(file.name()), file, sizes)) + }) + .collect(); + } + Err(err) => { + log::warn!( + "could not enumerate {} via gio: {}", + tab_path.display(), + err + ); } } } @@ -1410,11 +1410,11 @@ impl EditLocation { self.selected = Some(selected); // Automatically resolve if there is only one completion - if completions.len() == 1 { - if let Some(resolved) = self.resolve() { - self.location = resolved; - self.selected = None; - } + if completions.len() == 1 + && let Some(resolved) = self.resolve() + { + self.location = resolved; + self.selected = None; } } } else { @@ -2033,10 +2033,10 @@ impl ItemThumbnail { if let Some((item_thumbnail, temp_file)) = Self::generate_thumbnail_external(path, &mime, thumbnail_size, thumbnail_dir) { - if let Ok(cache) = thumbnail_cacher { - if let Err(err) = cache.update_with_temp_file(temp_file) { - log::warn!("failed to update cache for {}: {}", path.display(), err); - } + if let Ok(cache) = thumbnail_cacher + && let Err(err) = cache.update_with_temp_file(temp_file) + { + log::warn!("failed to update cache for {}: {}", path.display(), err); } return item_thumbnail; } @@ -2076,16 +2076,15 @@ impl ItemThumbnail { // If we weren't able to create a thumbnail, but we should have // been able to, create a fail marker so that it isn't tried the // next time. - if let Ok(cacher) = thumbnail_cacher { - if tried_supported_file { - if let Err(err) = cacher.create_fail_marker() { - log::warn!( - "failed to create thumbnail fail marker for {}: {}", - path.display(), - err - ); - } - } + if let Ok(cacher) = thumbnail_cacher + && tried_supported_file + && let Err(err) = cacher.create_fail_marker() + { + log::warn!( + "failed to create thumbnail fail marker for {}: {}", + path.display(), + err + ); } Self::NotImage @@ -2273,13 +2272,13 @@ impl Item { widget::button::icon(widget::icon::from_name("go-next-symbolic")) .on_press(Message::ItemRight), ); - if self.can_gallery() { - if let Some(_path) = self.path_opt() { - row = row.push( - widget::button::icon(widget::icon::from_name("view-fullscreen-symbolic")) - .on_press(Message::Gallery(true)), - ); - } + if self.can_gallery() + && let Some(_path) = self.path_opt() + { + row = row.push( + widget::button::icon(widget::icon::from_name("view-fullscreen-symbolic")) + .on_press(Message::Gallery(true)), + ); } row.into() } @@ -2445,11 +2444,11 @@ impl Item { } } - if let Some(path) = self.path_opt() { - if let Ok(img) = image::image_dimensions(path) { - let (width, height) = img; - details = details.push(widget::text::body(format!("{width}x{height}"))); - } + if let Some(path) = self.path_opt() + && let Ok(img) = image::image_dimensions(path) + { + let (width, height) = img; + details = details.push(widget::text::body(format!("{width}x{height}"))); } column = column.push(details); @@ -2637,12 +2636,11 @@ async fn calculate_dir_size(path: &Path, controller: Controller) -> Result { - if let Some(mut edit_location) = self.edit_location.take() { - if !matches!(edit_location.location, Location::Network(..)) { - edit_location.selected = Some(selected); - cd = edit_location.resolve(); - } + if let Some(mut edit_location) = self.edit_location.take() + && !matches!(edit_location.location, Location::Network(..)) + { + edit_location.selected = Some(selected); + cd = edit_location.resolve(); } } Message::EditLocationEnable => { @@ -3532,11 +3528,11 @@ impl Tab { && edit_location .completions .as_ref() - .map_or(false, |completions| !completions.is_empty()) + .is_some_and(|completions| !completions.is_empty()) && edit_location .location .path_opt() - .map_or(false, |path| !path.exists()) + .is_some_and(|path| !path.exists()) { edit_location.selected = Some(0); } @@ -3634,19 +3630,19 @@ impl Tab { } } Message::GoNext => { - if let Some(history_i) = self.history_i.checked_add(1) { - if let Some(location) = self.history.get(history_i) { - cd = Some(location.clone()); - history_i_opt = Some(history_i); - } + if let Some(history_i) = self.history_i.checked_add(1) + && let Some(location) = self.history.get(history_i) + { + cd = Some(location.clone()); + history_i_opt = Some(history_i); } } Message::GoPrevious => { - if let Some(history_i) = self.history_i.checked_sub(1) { - if let Some(location) = self.history.get(history_i) { - cd = Some(location.clone()); - history_i_opt = Some(history_i); - } + if let Some(history_i) = self.history_i.checked_sub(1) + && let Some(location) = self.history.get(history_i) + { + cd = Some(location.clone()); + history_i_opt = Some(history_i); } } Message::ItemDown => { @@ -3825,10 +3821,10 @@ impl Tab { Message::LocationUp => { // Sets location to the path's parent // Does nothing if path is root or location is Trash - if let Location::Path(ref path) = self.location { - if let Some(parent) = path.parent() { - cd = Some(Location::Path(parent.to_owned())); - } + if let Location::Path(ref path) = self.location + && let Some(parent) = path.parent() + { + cd = Some(Location::Path(parent.to_owned())); } } Message::Open(path_opt) => { @@ -3870,27 +3866,25 @@ impl Tab { match mode { Mode::App => { if is_only_one_selected { - return ResolveResult::Cd(location.clone()); + ResolveResult::Cd(location.clone()) } else { - return ResolveResult::OpenInTab(path_opt.cloned()); + ResolveResult::OpenInTab(path_opt.cloned()) } } - Mode::Desktop => { - return match location { - Location::Trash => ResolveResult::OpenTrash, - _ => ResolveResult::Open(path_opt.cloned()), - }; - } + Mode::Desktop => match location { + Location::Trash => ResolveResult::OpenTrash, + _ => ResolveResult::Open(path_opt.cloned()), + }, Mode::Dialog(_) => { if is_only_one_selected { - return ResolveResult::Cd(location.clone()); + ResolveResult::Cd(location.clone()) } else { - return ResolveResult::Skip; + ResolveResult::Skip } } } } else { - return ResolveResult::Open(path_opt.cloned()); + ResolveResult::Open(path_opt.cloned()) } } let mut open_files = Vec::new(); @@ -3935,14 +3929,13 @@ impl Tab { if mod_ctrl || mod_shift { self.update(Message::Click(click_i_opt), modifiers); } - if let Some(ref mut items) = self.items_opt { - if !click_i_opt + if let Some(ref mut items) = self.items_opt + && !click_i_opt .is_some_and(|click_i| items.get(click_i).is_some_and(|x| x.selected)) - { - // If item not selected, clear selection on other items - for (i, item) in items.iter_mut().enumerate() { - item.selected = Some(i) == click_i_opt; - } + { + // If item not selected, clear selection on other items + for (i, item) in items.iter_mut().enumerate() { + item.selected = Some(i) == click_i_opt; } } //TODO: hack for clearing selecting when right clicking empty space @@ -3990,12 +3983,12 @@ impl Tab { } Message::Resize(viewport) => { // Scroll to ensure focused item still in view - if self.viewport_opt.map(|v| v.size()) != Some(viewport.size()) { - if let Some(offset) = self.select_focus_scroll() { - commands.push(Command::Iced( - scrollable::scroll_to(self.scrollable_id.clone(), offset).into(), - )); - } + if self.viewport_opt.map(|v| v.size()) != Some(viewport.size()) + && let Some(offset) = self.select_focus_scroll() + { + commands.push(Command::Iced( + scrollable::scroll_to(self.scrollable_id.clone(), offset).into(), + )); } self.viewport_opt = Some(viewport); @@ -4099,20 +4092,17 @@ impl Tab { } } Message::SelectLast => { - if let Some(ref items) = self.items_opt { - if let Some(last_pos) = items.iter().filter_map(|item| item.pos_opt.get()).max() - { - if self.select_position(last_pos.0, last_pos.1, mod_shift) { - if let Some(offset) = self.select_focus_scroll() { - commands.push(Command::Iced( - scrollable::scroll_to(self.scrollable_id.clone(), offset) - .into(), - )); - } - if let Some(id) = self.select_focus_id() { - commands.push(Command::Iced(widget::button::focus(id).into())); - } - } + if let Some(ref items) = self.items_opt + && let Some(last_pos) = items.iter().filter_map(|item| item.pos_opt.get()).max() + && self.select_position(last_pos.0, last_pos.1, mod_shift) + { + if let Some(offset) = self.select_focus_scroll() { + commands.push(Command::Iced( + scrollable::scroll_to(self.scrollable_id.clone(), offset).into(), + )); + } + if let Some(id) = self.select_focus_id() { + commands.push(Command::Iced(widget::button::focus(id).into())); } } } @@ -4136,13 +4126,13 @@ impl Tab { } } Message::TabComplete(path, completions) => { - if let Some(edit_location) = &mut self.edit_location { - if edit_location.location.path_opt() == Some(&path) { - edit_location.completions = Some(completions); - commands.push(Command::Iced( - widget::text_input::focus(self.edit_location_id.clone()).into(), - )); - } + if let Some(edit_location) = &mut self.edit_location + && edit_location.location.path_opt() == Some(&path) + { + edit_location.completions = Some(completions); + commands.push(Command::Iced( + widget::text_input::focus(self.edit_location_id.clone()).into(), + )); } } Message::Thumbnail(path, thumbnail) => { @@ -4276,10 +4266,10 @@ impl Tab { } Message::DirectorySize(path, dir_size) => { let location = Location::Path(path); - if let Some(ref mut item) = self.parent_item_opt { - if item.location_opt.as_ref() == Some(&location) { - item.dir_size.clone_from(&dir_size); - } + if let Some(ref mut item) = self.parent_item_opt + && item.location_opt.as_ref() == Some(&location) + { + item.dir_size.clone_from(&dir_size); } if let Some(ref mut items) = self.items_opt { for item in items.iter_mut() { @@ -4317,13 +4307,12 @@ impl Tab { } else { // Select parent if location is not directory let mut selected_paths = None; - if let Some(path) = location.path_opt() { - if !path.is_dir() { - if let Some(parent) = path.parent() { - selected_paths = Some(vec![path.clone()]); - location = location.with_path(parent.to_path_buf()); - } - } + if let Some(path) = location.path_opt() + && !path.is_dir() + && let Some(parent) = path.parent() + { + selected_paths = Some(vec![path.clone()]); + location = location.with_path(parent.to_path_buf()); } if location != self.location || selected_paths.is_some() { if location.path_opt().is_none_or(|path| path.is_dir()) { @@ -4531,99 +4520,93 @@ impl Tab { //TODO: display error messages when image not found? let mut name_opt = None; let mut element_opt: Option> = None; - if let Some(index) = self.select_focus { - if let Some(items) = &self.items_opt { - if let Some(item) = items.get(index) { - name_opt = Some(widget::text::heading(&item.display_name)); - match item - .thumbnail_opt - .as_ref() - .unwrap_or(&ItemThumbnail::NotImage) - { - ItemThumbnail::NotImage => {} - ItemThumbnail::Image(handle, original_dims) => { - // Determine which image to show based on async decode state - let mut is_loading = false; - let mut error_msg_opt = None; - let image_handle = if let Some(path) = item.path_opt() { - if let Some(error_msg) = self.large_image_manager.get_error(path) { - error_msg_opt = Some(error_msg.clone()); - handle.clone() - } else if self.large_image_manager.is_decoding(path) { - // Currently decoding (initial or re-decode) --> show cached/thumbnail with loading indicator - is_loading = true; - // Use decoded handle if available (re-decode), otherwise thumbnail (initial decode) - self.large_image_manager - .get_decoded(path) - .cloned() - .unwrap_or_else(|| handle.clone()) - } else if let Some(decoded_handle) = - self.large_image_manager.get_decoded(path) - { - // Decoded and not currently decoding --> use it - decoded_handle.clone() - } else if let Some((w, h)) = original_dims { - // Check if image needs tiling - if should_use_tiling(*w, *h) { - // Large image --> show thumbnail only - handle.clone() - } else { - // Normal-sized image --> load full resolution directly - widget::image::Handle::from_path(path) - } - } else { - // No dimensions available --> show thumbnail - handle.clone() - } - } else { + if let Some(index) = self.select_focus + && let Some(items) = &self.items_opt + && let Some(item) = items.get(index) + { + name_opt = Some(widget::text::heading(&item.display_name)); + match item + .thumbnail_opt + .as_ref() + .unwrap_or(&ItemThumbnail::NotImage) + { + ItemThumbnail::NotImage => {} + ItemThumbnail::Image(handle, original_dims) => { + // Determine which image to show based on async decode state + let mut is_loading = false; + let mut error_msg_opt = None; + let image_handle = if let Some(path) = item.path_opt() { + if let Some(error_msg) = self.large_image_manager.get_error(path) { + error_msg_opt = Some(error_msg.clone()); + handle.clone() + } else if self.large_image_manager.is_decoding(path) { + // Currently decoding (initial or re-decode) --> show cached/thumbnail with loading indicator + is_loading = true; + // Use decoded handle if available (re-decode), otherwise thumbnail (initial decode) + self.large_image_manager + .get_decoded(path) + .cloned() + .unwrap_or_else(|| handle.clone()) + } else if let Some(decoded_handle) = + self.large_image_manager.get_decoded(path) + { + // Decoded and not currently decoding --> use it + decoded_handle.clone() + } else if let Some((w, h)) = original_dims { + // Check if image needs tiling + if should_use_tiling(*w, *h) { + // Large image --> show thumbnail only handle.clone() - }; + } else { + // Normal-sized image --> load full resolution directly + widget::image::Handle::from_path(path) + } + } else { + // No dimensions available --> show thumbnail + handle.clone() + } + } else { + handle.clone() + }; - let content: cosmic::Element<'_, Message> = - if let Some(error_msg) = error_msg_opt { - widget::column() - .push(widget::image(image_handle)) - .push(widget::text(format!("⚠ {}", error_msg)).size(13)) - .padding(space_xs) - .align_x(cosmic::iced::Alignment::Center) - .into() - } else if is_loading { - widget::column() - .push(widget::image(image_handle)) - .push(widget::text("Loading higher resolution...").size(14)) - .padding(space_xs) - .align_x(cosmic::iced::Alignment::Center) - .into() - } else { - //TODO: use widget::image::viewer, when its zoom can be reset - widget::image(image_handle).into() - }; + let content: cosmic::Element<'_, Message> = + if let Some(error_msg) = error_msg_opt { + widget::column() + .push(widget::image(image_handle)) + .push(widget::text(format!("⚠ {}", error_msg)).size(13)) + .padding(space_xs) + .align_x(cosmic::iced::Alignment::Center) + .into() + } else if is_loading { + widget::column() + .push(widget::image(image_handle)) + .push(widget::text("Loading higher resolution...").size(14)) + .padding(space_xs) + .align_x(cosmic::iced::Alignment::Center) + .into() + } else { + //TODO: use widget::image::viewer, when its zoom can be reset + widget::image(image_handle).into() + }; - element_opt = - Some(widget::container(content).center(Length::Fill).into()); - } - ItemThumbnail::Svg(handle) => { - element_opt = Some( - widget::svg(handle.clone()) - .width(Length::Fill) - .height(Length::Fill) - .into(), - ); - } - ItemThumbnail::Text(text) => { - element_opt = Some( - widget::container( - widget::text_editor(text).padding(space_xxs).class( - cosmic::theme::iced::TextEditor::Custom(Box::new( - text_editor_class, - )), - ), - ) - .center(Length::Fill) - .into(), - ); - } - } + element_opt = Some(widget::container(content).center(Length::Fill).into()); + } + ItemThumbnail::Svg(handle) => { + element_opt = Some( + widget::svg(handle.clone()) + .width(Length::Fill) + .height(Length::Fill) + .into(), + ); + } + ItemThumbnail::Text(text) => { + element_opt = Some( + widget::container(widget::text_editor(text).padding(space_xxs).class( + cosmic::theme::iced::TextEditor::Custom(Box::new(text_editor_class)), + )) + .center(Length::Fill) + .into(), + ); } } } @@ -4862,32 +4845,32 @@ impl Tab { ); let mut popover = widget::popover(text_input).position(widget::popover::Position::Bottom); - if let Some(completions) = &edit_location.completions { - if !completions.is_empty() { - let mut column = - widget::column::with_capacity(completions.len()).padding(space_xxs); - for (i, (name, _path)) in completions.iter().enumerate() { - let selected = edit_location.selected == Some(i); - column = column.push( - widget::button::custom(widget::text::body(name)) - //TODO: match to design - .class(if selected { - theme::Button::Standard - } else { - theme::Button::HeaderBar - }) - .on_press(Message::EditLocationComplete(i)) - .padding(space_xxs) - .width(Length::Fill), - ); - } - popover = popover.popup( - widget::container(column) - .class(theme::Container::Dropdown) - //TODO: This is a hack to get the popover to be the right width - .max_width(size.width - 140.0), + if let Some(completions) = &edit_location.completions + && !completions.is_empty() + { + let mut column = + widget::column::with_capacity(completions.len()).padding(space_xxs); + for (i, (name, _path)) in completions.iter().enumerate() { + let selected = edit_location.selected == Some(i); + column = column.push( + widget::button::custom(widget::text::body(name)) + //TODO: match to design + .class(if selected { + theme::Button::Standard + } else { + theme::Button::HeaderBar + }) + .on_press(Message::EditLocationComplete(i)) + .padding(space_xxs) + .width(Length::Fill), ); } + popover = popover.popup( + widget::container(column) + .class(theme::Container::Dropdown) + //TODO: This is a hack to get the popover to be the right width + .max_width(size.width - 140.0), + ); } row = row.push(popover); let mut column = widget::column::with_capacity(4).padding([0, space_s]); @@ -5913,13 +5896,13 @@ impl Tab { .wayland_on_right_press_window_position(); let mut popover = widget::popover(mouse_area); - if let Some(point) = self.context_menu { - if !cfg!(feature = "wayland") || !crate::is_wayland() { - let context_menu = menu::context_menu(self, key_binds, &modifiers); - popover = popover - .popup(context_menu) - .position(widget::popover::Position::Point(point)); - } + if let Some(point) = self.context_menu + && (!cfg!(feature = "wayland") || !crate::is_wayland()) + { + let context_menu = menu::context_menu(self, key_binds, modifiers); + popover = popover + .popup(context_menu) + .position(widget::popover::Position::Point(point)); } let mut tab_column = widget::column::with_capacity(3); @@ -5939,21 +5922,21 @@ impl Tab { } match &self.location { Location::Trash => { - if let Some(items) = self.items_opt() { - if !items.is_empty() { - tab_column = tab_column.push( - widget::layer_container(widget::row::with_children([ - widget::horizontal_space().into(), - widget::button::standard(fl!("empty-trash")) - .on_press(Message::EmptyTrash) - .into(), - ])) - .padding([space_xxs, space_xs]) - .layer(cosmic_theme::Layer::Primary) - .apply(widget::container) - .padding([0, 0, 7, 0]), - ); - } + if let Some(items) = self.items_opt() + && !items.is_empty() + { + tab_column = tab_column.push( + widget::layer_container(widget::row::with_children([ + widget::horizontal_space().into(), + widget::button::standard(fl!("empty-trash")) + .on_press(Message::EmptyTrash) + .into(), + ])) + .padding([space_xxs, space_xs]) + .layer(cosmic_theme::Layer::Primary) + .apply(widget::container) + .padding([0, 0, 7, 0]), + ); } } Location::Network(uri, _display_name, _path) if uri == "network:///" => { @@ -6250,10 +6233,10 @@ impl Tab { let mut selected_items: Vec<&Item> = items.iter().filter(|item| item.selected).collect(); - if selected_items.is_empty() { - if let Some(p) = self.parent_item_opt.as_ref() { - selected_items.push(p) - } + if selected_items.is_empty() + && let Some(p) = self.parent_item_opt.as_ref() + { + selected_items.push(p) } for item in selected_items { // Item must have a path diff --git a/src/thumbnail_cacher.rs b/src/thumbnail_cacher.rs index 82cafb3..719bfc6 100644 --- a/src/thumbnail_cacher.rs +++ b/src/thumbnail_cacher.rs @@ -66,10 +66,10 @@ impl ThumbnailCacher { if let (Some(cache_base_dir), Ok(metadata)) = ( THUMBNAIL_CACHE_BASE_DIR.as_ref(), std::fs::metadata(&self.file_path), - ) { - if metadata.is_file() && self.file_path.starts_with(cache_base_dir) { - return CachedThumbnail::Valid((self.file_path.clone(), None)); - } + ) && metadata.is_file() + && self.file_path.starts_with(cache_base_dir) + { + return CachedThumbnail::Valid((self.file_path.clone(), None)); } // Use cached thumbnail if it is valid. From b733bf1486253b602d5165582ae9d3e9fc5d33bd Mon Sep 17 00:00:00 2001 From: Hosted Weblate Date: Fri, 30 Jan 2026 21:06:33 +0100 Subject: [PATCH 11/13] i18n: translation updates from weblate Co-authored-by: Hafidz Nasruddin Co-authored-by: Hosted Weblate Co-authored-by: Languages add-on Co-authored-by: Zahid Rizky Fakhri Translate-URL: https://hosted.weblate.org/projects/pop-os/cosmic-files/id/ Translation: Pop OS/COSMIC Files --- i18n/id/cosmic_files.ftl | 306 +++++++++++++++++++++++++++++++++++++++ i18n/ms/cosmic_files.ftl | 0 i18n/uz/cosmic_files.ftl | 0 3 files changed, 306 insertions(+) create mode 100644 i18n/ms/cosmic_files.ftl create mode 100644 i18n/uz/cosmic_files.ftl diff --git a/i18n/id/cosmic_files.ftl b/i18n/id/cosmic_files.ftl index e69de29..3ea0e2d 100644 --- a/i18n/id/cosmic_files.ftl +++ b/i18n/id/cosmic_files.ftl @@ -0,0 +1,306 @@ +empty-folder = Kosongkan map +empty-folder-hidden = Kosongkan map (memiliki item tersembunyi) +no-results = Tidak ada hasil yang ditemukan +filesystem = Sistem berkas +cosmic-files = Berkas COSMIC +home = Beranda +networks = Jaringan +notification-in-progress = Operasi berkas sedang berlangsung +trash = Sampah +recents = Terbaru +undo = Batalkan +today = Hari ini +desktop-view-options = Opsi tampilan desktop... +show-on-desktop = Tampilkan di Desktop +desktop-folder-content = Konten map desktop +mounted-drives = Drive terpasang +trash-folder-icon = Ikon map sampah +icon-size-and-spacing = Ukuran dan jarak ikon +icon-size = Ukuran ikon +name = Nama +grid-spacing = Jarak antar kisi +modified = Dimodifikasi +trashed-on = Dibuang +size = Ukuran +details = Rincian +dismiss = Abaikan pesan +operations-running = + { $running } { $running -> + [one] operasi + *[other] operasi + } berjalan ({ $percent }%)... +operations-running-finished = + { $running } { $running -> + [one] operasi + *[other] operasi + } berjalan ({ $percent }%), { $finished } selesai... +pause = Jeda +resume = Lanjutkan +create-archive = Buat arsip +extract-password-required = Kata sandi diperlukan +extract-to = Ekstrak ke... +extract-to-title = Ekstrak ke map +empty-trash = Kosongkan sampah +empty-trash-title = Kosongkan sampah? +empty-trash-warning = Item di map Sampah akan dihapus permanen +emptying-trash = Mengosongkan { trash } ({ $progress })... +mount-error = Tidak dapat mengakses drive +create-new-file = Buat berkas baru +create-new-folder = Buat map baru +permanently-delete-question = Hapus secara permanen? +delete = Hapus +sort-by-trashed = Urutkan berdasarkan waktu penghapusan +delete-permanently = Hapus secara permanen +permanently-delete-warning = { $target } akan dihapus secara permanen. Tindakan ini tidak dapat dibatalkan. +deleted = + { $items } { $items -> + [one] item + *[other] item + } dihapus dari { trash } +permanently-deleted = + { $items } { $items -> + [one] item + *[other] item + } dihapus secara permanen +file-name = Nama berkas +folder-name = Nama map +file-already-exists = Berkas dengan nama tersebut sudah ada +folder-already-exists = Map dengan nama tersebut sudah ada +name-hidden = Nama yang diawali dengan "." akan disembunyikan +name-invalid = Nama tidak boleh "{ $filename }" +name-no-slashes = Nama tidak boleh berisi garis miring +cancel = Batalkan +create = Buat +open = Buka +open-file = Buka berkas +open-folder = Buka map +open-in-new-tab = Buka di tab baru +open-in-new-window = Buka di jendela baru +open-item-location = Buka lokasi item +open-multiple-files = Buka beberapa berkas +open-multiple-folders = Buka beberapa map +save = Simpan +save-file = Simpan berkas +open-with-title = Bagaimana anda ingin membuka "{ $name }"? +browse-store = Telusuri { $store } +other-apps = Aplikasi lainnya +related-apps = Aplikasi terkait +rename-file = Ganti nama berkas +rename-folder = Ganti nama map +replace = Ganti +replace-title = "{ $filename }" sudah ada di lokasi ini +replace-warning-operation = Apakah anda ingin menggantinya? Menggantinya akan menimpa konten tersebut. +original-file = Berkas asli +replace-with = Ganti dengan +apply-to-all = Terapkan ke semua +replace-warning = Apakah anda ingin menggantinya dengan yang sedang anda simpan? Menggantinya akan menimpa konten tersebut. +keep-both = Pertahankan keduanya +skip = Lewati +set-executable-and-launch = Atur sebagai dijalankan dan luncurkan +set-and-launch = Atur dan luncurkan +set-executable-and-launch-description = Apakah anda ingin mengatur "{ $name }" sebagai dijalankan dan luncurkan? +open-with = Buka dengan +owner = Pemilik +group = Grup +other = Lainnya +none = Tidak ada +execute-only = Hanya jalankan +write-only = Hanya tulis +write-execute = Tulis dan jalankan +read-only = Hanya baca +read-execute = Baca dan jalankan +read-write = Baca dan tulis +read-write-execute = Baca, tulis, dan jalankan +favorite-path-error = Galat membuka direktori +remove = Hapus +keep = Pertahankan +repository = Repositori +favorite-path-error-description = + Tidak dapat membuka "{ $path }" + "{ $path }" mungkin tidak ada atau anda mungkin tidak memiliki izin untuk membuka + + Apakah anda ingin menghapus dari bilah sisi? +support = Dukungan +add-network-drive = Tambahkan drive jaringan +connect = Sambungkan +connect-anonymously = Sambungkan secara anonim +connecting = Menyambungkan... +domain = Domain +enter-server-address = Masukkan alamat server +network-drive-description = + Alamat server mencakup awalan protokol dan alamat. + Contoh: ssh://192.168.0.1, ftp://[2001:db8::1] +network-drive-schemes = + Protokol yang tersedia,Awalan + AppleTalk,afp:// + File Transfer Protocol,ftp:// atau ftps:// + Network File System,nfs:// + Server Message Block,smb:// + SSH File Transfer Protocol,sftp:// atau ssh:// + WebDAV,dav:// atau davs:// +network-drive-error = Tidak dapat mengakses drive jaringan +password = Kata sandi +remember-password = Ingat kata sandi +try-again = Coba lagi +username = Nama pengguna +cancelled = Dibatalkan +edit-history = Sunting riwayat +history = Riwayat +no-history = Tidak ada item dalam riwayat. +pending = Menunggu +progress = { $percent }% +progress-cancelled = { $percent }%, dibatalkan +progress-failed = { $percent }%, gagal +progress-paused = { $percent }%, dijeda +failed = Gagal +complete = Selesai +copy_noun = Salin +creating = Membuat "{ $name }" di "{ $parent }" +created = "{ $name }" dibuat di "{ $parent }" +compressing = + Mengompres { $items } { $items -> + [one] item + *[other] item + } dari "{ $from }" ke "{ $to }" ({ $progress })... +compressed = + { $items } { $items -> + [one] item + *[other] item + } dikompres dari "{ $from }" ke "{ $to }" +copied = + { $items } { $items -> + [one] item + *[other] item + } disalin dari "{ $from }" ke "{ $to }" +copying = + Menyalin { $items } { $items -> + [one] item + *[other] item + } dari "{ $from }" ke "{ $to }" ({ $progress })... +deleting = + Menghapus { $items } { $items -> + [one] item + *[other] item + } dari { trash } ({ $progress })... +emptied-trash = { trash } telah dikosongkan +extracting = + Mengekstrak { $items } { $items -> + [one] item + *[other] item + } dari "{ $from }" ke "{ $to }" ({ $progress })... +extracted = + { $items } { $items -> + [one] item + *[other] item + } diekstrak dari "{ $from }" ke "{ $to }" +setting-executable-and-launching = Mengatur "{ $name }" sebagai dijalankan dan meluncurkan +set-executable-and-launched = Atur "{ $name }" sebagai dijalankan dan diluncurkan +setting-permissions = Mengatur izin untuk "{ $name }" ke { $mode } +set-permissions = Atur izin untuk "{ $name }" ke { $mode } +menu-open-with = Buka dengan... +unknown-folder = map yang tidak diketahui +default-app = { $name } (bawaan) +show-details = Tampilkan rincian +type = Jenis: { $mime } +items = Item: { $items } +item-size = Ukuran: { $size } +moving = + Memindahkan { $items } { $items -> + [one] item + *[other] item + } dari "{ $from }" ke "{ $to }" ({ $progress })... +moved = + { $items } { $items -> + [one] item + *[other] item + } dipindahkan dari "{ $from }" ke "{ $to }" +permanently-deleting = + Menghapus { $items } { $items -> + [one] item + *[other] item + } secara permanen +removing-from-recents = + Menghapus { $items } { $items -> + [one] item + *[other] item + } dari { recents } +removed-from-recents = + { $items } { $items -> + [one] item + *[other] item + } dihapus dari { recents } +renaming = Mengganti nama "{ $from }" ke "{ $to }" +renamed = Nama diganti "{ $from }" ke "{ $to }" +restoring = + Memulihkan { $items } { $items -> + [one] item + *[other] item + } dari { trash } ({ $progress })... +restored = + { $items } { $items -> + [one] item + *[other] item + } dipulihkan dari { trash } +item-created = Dibuat: { $created } +item-modified = Dimodifikasi: { $modified } +item-accessed = Diakses: { $accessed } +calculating = Menghitung... +settings = Pengaturan +single-click = Klik sekali untuk membuka +appearance = Tampilan +theme = Tema +match-desktop = Cocokkan desktop +dark = Gelap +light = Terang +type-to-search = Ketik untuk mencari +type-to-search-recursive = Mencari di map saat ini dan semua submap +type-to-search-enter-path = Memasukkan jalur ke direktori atau berkas +add-to-sidebar = Tambahkan ke bilah sisi +compress = Kompres +eject = Keluarkan +extract-here = Ekstrak +new-file = Berkas baru... +new-folder = Map baru... +open-in-terminal = Buka di terminal +move-to-trash = Pindahkan ke sampah +restore-from-trash = Pulihkan dari sampah +remove-from-sidebar = Hapus dari bilah sisi +sort-by-name = Urutkan berdasarkan nama +sort-by-modified = Urutkan berdasarkan dimodifikasi +sort-by-size = Urutkan berdasarkan ukuran +remove-from-recents = Hapus dari terbaru +change-wallpaper = Ubah wallpaper... +desktop-appearance = Tampilan desktop... +display-settings = Pengaturan layar... +file = Berkas +new-tab = Tab baru +new-window = Jendela baru +reload-folder = Muat ulang map +rename = Ganti nama... +close-tab = Tutup tab +quit = Keluar +edit = Sunting +cut = Potong +copy = Salin +paste = Tempel +select-all = Pilih semua +zoom-in = Perbesar +default-size = Ukuran bawaan +zoom-out = Perkecil +view = Tampilan +grid-view = Tampilan kisi +list-view = Tampilan daftar +gallery-preview = Tampilan galeri +show-hidden-files = Tampilkan berkas tersembunyi +list-directories-first = Daftar direktori terlebih dahulu +menu-settings = Pengaturan... +menu-about = Tentang Berkas COSMIC... +sort = Urutkan +sort-a-z = A-Z +sort-z-a = Z-A +sort-newest-first = Terbaru terlebih dahulu +sort-oldest-first = Tertua terlebih dahulu +sort-smallest-to-largest = Terkecil hingga terbesar +sort-largest-to-smallest = Terbesar hingga terkecil +selected-items = { $items } item yang dipilih +type-to-search-select = Memilih berkas atau map pertama yang cocok diff --git a/i18n/ms/cosmic_files.ftl b/i18n/ms/cosmic_files.ftl new file mode 100644 index 0000000..e69de29 diff --git a/i18n/uz/cosmic_files.ftl b/i18n/uz/cosmic_files.ftl new file mode 100644 index 0000000..e69de29 From fcaf6c7e30b48f4d1857f9303a78f9a87b402336 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vuka=C5=A1in=20Vojinovi=C4=87?= <150025636+git-f0x@users.noreply.github.com> Date: Sat, 24 Jan 2026 16:49:12 +0100 Subject: [PATCH 12/13] chore: update dependencies --- Cargo.lock | 190 +++++++++++++++---------------------- Cargo.toml | 21 ++-- src/app.rs | 16 ++-- src/archive.rs | 1 + src/operation/mod.rs | 24 ++--- src/operation/reader.rs | 2 +- src/operation/recursive.rs | 2 +- src/tab.rs | 30 +++--- src/thumbnailer.rs | 15 ++- 9 files changed, 136 insertions(+), 165 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index affa134..385b532 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -976,9 +976,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.2.54" +version = "1.2.55" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6354c81bbfd62d9cfa9cb3c773c2b7b2a3a482d569de977fd0e961f6e7c00583" +checksum = "47b26a0954ae34af09b50f0de26458fa95369a0d478d8236d3f93082b219bd29" dependencies = [ "find-msvc-tools", "jobserver", @@ -1457,8 +1457,6 @@ dependencies = [ "fastrand 2.3.0", "flate2", "fork", - "freedesktop_entry_parser", - "futures", "gio", "glib", "glob", @@ -1575,8 +1573,8 @@ dependencies = [ [[package]] name = "cosmic-text" -version = "0.16.0" -source = "git+https://github.com/pop-os/cosmic-text.git#ee702e50901d90cd842dbd88154687bd2512b52c" +version = "0.17.0" +source = "git+https://github.com/pop-os/cosmic-text.git#bdd6657fd7268dc8882214f540a6150eb78cfae0" dependencies = [ "bitflags 2.10.0", "fontdb 0.23.0", @@ -1584,10 +1582,10 @@ dependencies = [ "linebender_resource_handle", "log", "rangemap", - "rustc-hash 1.1.0", + "rustc-hash 2.1.1", "self_cell", - "skrifa 0.39.0", - "smol_str", + "skrifa 0.36.0", + "smol_str 0.3.5", "swash", "sys-locale", "unicode-bidi", @@ -1736,38 +1734,14 @@ dependencies = [ "winapi", ] -[[package]] -name = "darling" -version = "0.20.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc7f46116c46ff9ab3eb1597a45688b6715c6e628b5c133e288e709a29bcb4ee" -dependencies = [ - "darling_core 0.20.11", - "darling_macro 0.20.11", -] - [[package]] name = "darling" version = "0.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9cdf337090841a411e2a7f3deb9187445851f91b309c0c0a29e05f74a00a48c0" dependencies = [ - "darling_core 0.21.3", - "darling_macro 0.21.3", -] - -[[package]] -name = "darling_core" -version = "0.20.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d00b9596d185e565c2207a0b01f8bd1a135483d02d9b7b0a54b11da8d53412e" -dependencies = [ - "fnv", - "ident_case", - "proc-macro2", - "quote", - "strsim", - "syn 2.0.114", + "darling_core", + "darling_macro", ] [[package]] @@ -1784,24 +1758,13 @@ dependencies = [ "syn 2.0.114", ] -[[package]] -name = "darling_macro" -version = "0.20.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc34b93ccb385b40dc71c6fceac4b2ad23662c7eeb248cf10d529b7e055b6ead" -dependencies = [ - "darling_core 0.20.11", - "quote", - "syn 2.0.114", -] - [[package]] name = "darling_macro" version = "0.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d38308df82d1080de0afee5d069fa14b0326a88c14f15c5ccda35b4a6c414c81" dependencies = [ - "darling_core 0.21.3", + "darling_core", "quote", "syn 2.0.114", ] @@ -1841,11 +1804,11 @@ dependencies = [ [[package]] name = "derive_setters" -version = "0.1.8" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae5c625eda104c228c06ecaf988d1c60e542176bd7a490e60eeda3493244c0c9" +checksum = "b7e6f6fa1f03c14ae082120b84b3c7fbd7b8588d924cf2d7c3daf9afd49df8b9" dependencies = [ - "darling 0.20.11", + "darling", "proc-macro2", "quote", "syn 2.0.114", @@ -2302,9 +2265,9 @@ dependencies = [ [[package]] name = "find-msvc-tools" -version = "0.1.8" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8591b0bcc8a98a64310a2fae1bb3e9b8564dd10e381e6e28010fde8e8e8568db" +checksum = "5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582" [[package]] name = "fixed_decimal" @@ -2406,6 +2369,15 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" +[[package]] +name = "font-types" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02a596f5713680923a2080d86de50fe472fb290693cf0f701187a1c8b36996b7" +dependencies = [ + "bytemuck", +] + [[package]] name = "font-types" version = "0.10.1" @@ -2527,16 +2499,6 @@ dependencies = [ "xdg", ] -[[package]] -name = "freedesktop_entry_parser" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db9c27b72f19a99a895f8ca89e2d26e4ef31013376e56fdafef697627306c3e4" -dependencies = [ - "nom 7.1.3", - "thiserror 1.0.69", -] - [[package]] name = "fsevent-sys" version = "4.1.0" @@ -2972,14 +2934,14 @@ dependencies = [ [[package]] name = "harfrust" -version = "0.4.1" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0caaee032384c10dd597af4579c67dee16650d862a9ccbe1233ff1a379abc07" +checksum = "75a4c970f1a00edc1626f1e3cc039492b15b73df28b9fff70f95404a571b4fae" dependencies = [ "bitflags 2.10.0", "bytemuck", "core_maths", - "read-fonts 0.36.0", + "read-fonts 0.34.0", "smallvec", ] @@ -3200,7 +3162,7 @@ dependencies = [ "raw-window-handle", "rustc-hash 2.1.1", "serde", - "smol_str", + "smol_str 0.2.2", "thiserror 1.0.69", "web-time", "window_clipboard", @@ -3835,7 +3797,7 @@ dependencies = [ "rgb", "tiff", "zune-core 0.5.1", - "zune-jpeg 0.5.11", + "zune-jpeg 0.5.12", ] [[package]] @@ -4947,9 +4909,9 @@ dependencies = [ [[package]] name = "notify-debouncer-full" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "375bd3a138be7bfeff3480e4a623df4cbfb55b79df617c055cd810ba466fa078" +checksum = "c02b49179cfebc9932238d04d6079912d26de0379328872846118a0fa0dbb302" dependencies = [ "file-id", "log", @@ -5002,9 +4964,9 @@ dependencies = [ [[package]] name = "num-conv" -version = "0.1.0" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" +checksum = "cf97ec579c3c42f953ef76dbf8d55ac91fb219dde70e49aa4a6b7d74e9919050" [[package]] name = "num-derive" @@ -6155,6 +6117,17 @@ dependencies = [ "crossbeam-utils", ] +[[package]] +name = "read-fonts" +version = "0.34.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8941f8e9d5f8ad3aebea330d01ac68c0167600eb31a86ecd86e97be4d13b51f5" +dependencies = [ + "bytemuck", + "core_maths", + "font-types 0.9.0", +] + [[package]] name = "read-fonts" version = "0.35.0" @@ -6162,18 +6135,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6717cf23b488adf64b9d711329542ba34de147df262370221940dfabc2c91358" dependencies = [ "bytemuck", - "font-types", -] - -[[package]] -name = "read-fonts" -version = "0.36.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5eaa2941a4c05443ee3a7b26ab076a553c343ad5995230cc2b1d3e993bdc6345" -dependencies = [ - "bytemuck", - "core_maths", - "font-types", + "font-types 0.10.1", ] [[package]] @@ -6638,7 +6600,7 @@ version = "3.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "52a8e3ca0ca629121f70ab50f95249e5a6f925cc0f6ffe8256c45b728875706c" dependencies = [ - "darling 0.21.3", + "darling", "proc-macro2", "quote", "syn 2.0.114", @@ -6721,6 +6683,16 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b2aa850e253778c88a04c3d7323b043aeda9d3e30d5971937c1855769763678e" +[[package]] +name = "skrifa" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37004372610e83ee2a4c69c7d896b41f33da6a3dc1a4fe07dd9b2629a549b1dc" +dependencies = [ + "bytemuck", + "read-fonts 0.34.0", +] + [[package]] name = "skrifa" version = "0.37.0" @@ -6731,16 +6703,6 @@ dependencies = [ "read-fonts 0.35.0", ] -[[package]] -name = "skrifa" -version = "0.39.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c9eb0b904a04d09bd68c65d946617b8ff733009999050f3b851c32fb3cfb60e" -dependencies = [ - "bytemuck", - "read-fonts 0.36.0", -] - [[package]] name = "slab" version = "0.4.11" @@ -6837,6 +6799,12 @@ dependencies = [ "serde", ] +[[package]] +name = "smol_str" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f7a918bd2a9951d18ee6e48f076843e8e73a9a5d22cf05bcd4b7a81bdd04e17" + [[package]] name = "socket2" version = "0.4.10" @@ -7211,9 +7179,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.45" +version = "0.3.46" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9e442fc33d7fdb45aa9bfeb312c095964abdf596f7567261062b2a7107aaabd" +checksum = "9da98b7d9b7dad93488a84b8248efc35352b0b2657397d4167e7ad67e5d535e5" dependencies = [ "deranged", "itoa", @@ -7227,15 +7195,15 @@ dependencies = [ [[package]] name = "time-core" -version = "0.1.7" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b36ee98fd31ec7426d599183e8fe26932a8dc1fb76ddb6214d05493377d34ca" +checksum = "7694e1cfe791f8d31026952abf09c69ca6f6fa4e1a1229e18988f06a04a12dca" [[package]] name = "time-macros" -version = "0.2.25" +version = "0.2.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71e552d1249bf61ac2a52db88179fd0673def1e1ad8243a00d9ec9ed71fee3dd" +checksum = "78cc610bac2dcee56805c99642447d4c5dbde4d01f752ffea0199aee1f601dc4" dependencies = [ "num-conv", "time-core", @@ -7791,9 +7759,9 @@ checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" [[package]] name = "wasip2" -version = "1.0.1+wasi-0.2.4" +version = "1.0.2+wasi-0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0562428422c63773dad2c345a1882263bbf4d65cf3f42e90921f787ef5ad58e7" +checksum = "9517f9239f02c069db75e65f174b3da828fe5f5b945c4dd26bd25d89c03ebcf5" dependencies = [ "wit-bindgen", ] @@ -8811,7 +8779,7 @@ dependencies = [ "rustix 0.38.44", "sctk-adwaita", "smithay-client-toolkit 0.19.2", - "smol_str", + "smol_str 0.2.2", "tracing", "unicode-segmentation", "wasm-bindgen", @@ -8848,9 +8816,9 @@ dependencies = [ [[package]] name = "wit-bindgen" -version = "0.46.0" +version = "0.51.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f17a85883d4e6d00e8a97c586de764dabcc06133f7f1d55dce5cdc070ad7fe59" +checksum = "d7249219f66ced02969388cf2bb044a09756a083d0fab1e566056b04d9fbcaa5" [[package]] name = "write16" @@ -9245,18 +9213,18 @@ checksum = "6df3dc4292935e51816d896edcd52aa30bc297907c26167fec31e2b0c6a32524" [[package]] name = "zerocopy" -version = "0.8.35" +version = "0.8.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdea86ddd5568519879b8187e1cf04e24fce28f7fe046ceecbce472ff19a2572" +checksum = "7456cf00f0685ad319c5b1693f291a650eaf345e941d082fc4e03df8a03996ac" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.8.35" +version = "0.8.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c15e1b46eff7c6c91195752e0eeed8ef040e391cdece7c25376957d5f15df22" +checksum = "1328722bbf2115db7e19d69ebcc15e795719e2d66b60827c6a69a117365e37a0" dependencies = [ "proc-macro2", "quote", @@ -9450,9 +9418,9 @@ dependencies = [ [[package]] name = "zune-jpeg" -version = "0.5.11" +version = "0.5.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2959ca473aae96a14ecedf501d20b3608d2825ba280d5adb57d651721885b0c2" +checksum = "410e9ecef634c709e3831c2cfdb8d9c32164fae1c67496d5b68fff728eec37fe" dependencies = [ "zune-core 0.5.1", ] diff --git a/Cargo.toml b/Cargo.toml index 89e2156..6c6e6ec 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,7 +4,7 @@ version = "1.0.4" authors = ["Jeremy Soller "] edition = "2024" license = "GPL-3.0-only" -rust-version = "1.85" +rust-version = "1.90" [dependencies] anyhow = "1" @@ -14,8 +14,6 @@ cctk = { git = "https://github.com/pop-os/cosmic-protocols", package = "cosmic-c cosmic-mime-apps = { git = "https://github.com/pop-os/cosmic-mime-apps.git", optional = true } dirs = "6.0.0" env_logger = "0.11" -freedesktop_entry_parser = "1.3" -futures = "0.3.31" gio = { version = "0.21", optional = true } glib = { version = "0.21", optional = true } glob = "0.3" @@ -24,9 +22,9 @@ image = "0.25" libc = "0.2" log = "0.4" mime_guess = "2" -notify-debouncer-full = "0.6" +notify-debouncer-full = "0.7" notify-rust = { version = "4", optional = true } -open = "5.3.2" +open = "5.3.3" paste = "1.0" regex = "1" rustc-hash = "2.1" @@ -38,15 +36,15 @@ tokio = { version = "1", features = ["process", "sync"] } trash = { git = "https://github.com/jackpot51/trash-rs.git", branch = "cosmic" } url = "2.5" walkdir = "2.5.0" -wayland-client = { version = "0.31.11", optional = true } +wayland-client = { version = "0.31.12", optional = true } xdg = { version = "3.0", optional = true } xdg-mime = { git = "https://github.com/ebassi/xdg-mime-rs" } # Compression bzip2 = { version = "0.6", optional = true } #TODO: replace with pure Rust crate flate2 = "1.1" tar = "0.4.44" -lzma-rust2 = { version = "0.15.4", optional = true } -ordermap = { version = "1.0.0", features = ["serde"] } +lzma-rust2 = { version = "0.15.7", optional = true } +ordermap = { version = "1.1.0", features = ["serde"] } # Internationalization i18n-embed = { version = "0.16", features = [ "fluent-system", @@ -54,10 +52,10 @@ i18n-embed = { version = "0.16", features = [ ] } i18n-embed-fl = "0.10" rust-embed = "8" -slotmap = "1.0.7" +slotmap = "1.1.1" recently-used-xbel = { git = "https://github.com/pop-os/recently-used-xbel.git" } zip = "7" -uzers = "0.12.1" +uzers = "0.12.2" md-5 = "0.10.6" png = "0.18" jxl-oxide = { version = "0.12.5", features = ["image"] } @@ -76,6 +74,7 @@ default-features = false features = [ "about", "autosize", + "desktop", "multi-window", "tokio", "winit", @@ -107,7 +106,7 @@ default = [ "wayland", ] dbus-config = ["libcosmic/dbus-config"] -desktop = ["libcosmic/desktop", "dep:cosmic-mime-apps", "dep:xdg"] +desktop = ["dep:cosmic-mime-apps", "dep:xdg"] desktop-applet = [] gvfs = ["dep:gio", "dep:glib"] io-uring = ["compio/io-uring"] diff --git a/src/app.rs b/src/app.rs index a85b098..52eddca 100644 --- a/src/app.rs +++ b/src/app.rs @@ -18,7 +18,9 @@ use cosmic::{ Application, ApplicationExt, Element, app::{self, Core, Task, context_drawer}, cosmic_config::{self, ConfigSet}, - cosmic_theme, executor, + cosmic_theme, + desktop::fde::DesktopEntry, + executor, iced::{ self, Alignment, Event, Length, Rectangle, Size, Subscription, clipboard::dnd::DndAction, @@ -72,10 +74,10 @@ use crate::{ FxOrderMap, clipboard::{ClipboardCopy, ClipboardKind, ClipboardPaste}, config::{ - AppTheme, Config, DesktopConfig, Favorite, IconSizes, TIME_CONFIG_ID, TabConfig, + AppTheme, Config, DesktopConfig, Favorite, IconSizes, State, TIME_CONFIG_ID, TabConfig, TimeConfig, TypeToSearch, }, - dialog::{Dialog, DialogKind, DialogMessage, DialogResult}, + dialog::{Dialog, DialogKind, DialogMessage, DialogResult, DialogSettings}, fl, home_dir, key_bind::key_binds, localize::LANGUAGE_SORTER, @@ -91,10 +93,6 @@ use crate::{ tab::{ self, HOVER_DURATION, HeadingOptions, ItemMetadata, Location, SORT_OPTION_FALLBACK, Tab, }, -}; -use crate::{ - config::State, - dialog::DialogSettings, zoom::{zoom_in_view, zoom_out_view, zoom_to_default}, }; @@ -846,8 +844,8 @@ impl App { fn launch_desktop_entries(paths: &[impl AsRef]) { for path in paths.iter().map(AsRef::as_ref) { - match freedesktop_entry_parser::parse_entry(path) { - Ok(entry) => match entry.section("Desktop Entry").attr("Exec") { + match DesktopEntry::from_path::<&str>(path, None) { + Ok(entry) => match entry.exec() { Some(exec) => match mime_app::exec_to_command(exec, &[] as &[&str; 0]) { Some(commands) => { for mut command in commands { diff --git a/src/archive.rs b/src/archive.rs index 8684bb8..7374941 100644 --- a/src/archive.rs +++ b/src/archive.rs @@ -2,6 +2,7 @@ use crate::{ mime_icon::mime_for_path, operation::{Controller, OpReader, OperationError, OperationErrorType, sync_to_disk}, }; +use cosmic::iced::futures; use std::{ collections::HashSet, fs, diff --git a/src/operation/mod.rs b/src/operation/mod.rs index 208d09a..d17ef5d 100644 --- a/src/operation/mod.rs +++ b/src/operation/mod.rs @@ -5,7 +5,7 @@ use crate::{ spawn_detached::spawn_detached, tab, }; -use cosmic::iced::futures::{SinkExt, channel::mpsc::Sender}; +use cosmic::iced::futures::{self, SinkExt, StreamExt, channel::mpsc::Sender, stream}; use std::{ borrow::Cow, fmt::Formatter, @@ -200,23 +200,25 @@ pub async fn sync_to_disk( written_files: Vec, target_dirs: std::collections::HashSet, ) { - use futures::{StreamExt, stream}; - // Sync files to disk - let file_stream = stream::iter(written_files.into_iter().map(|path| async move { + stream::iter(written_files.into_iter().map(|path| async move { if let Ok(file) = compio::fs::OpenOptions::new().write(true).open(&path).await { let _ = file.sync_all().await; } - })); - file_stream.buffer_unordered(32).collect::>().await; + })) + .buffer_unordered(32) + .collect::>() + .await; // Sync directories to disk - let dir_stream = stream::iter(target_dirs.into_iter().map(|path| async move { + stream::iter(target_dirs.into_iter().map(|path| async move { if let Ok(dir) = compio::fs::OpenOptions::new().read(true).open(&path).await { let _ = dir.sync_all().await; } - })); - dir_stream.buffer_unordered(16).collect::>().await; + })) + .buffer_unordered(16) + .collect::>() + .await; } fn copy_unique_path(from: &Path, to: &Path) -> PathBuf { @@ -1208,7 +1210,7 @@ mod tests { path::PathBuf, }; - use cosmic::iced::futures::{StreamExt, channel::mpsc}; + use cosmic::iced::futures::{StreamExt, channel::mpsc, future}; use log::debug; use test_log::test; use tokio::sync; @@ -1262,7 +1264,7 @@ mod tests { } }; - futures::future::join(handle_messages, handle_copy).await.1 + future::join(handle_messages, handle_copy).await.1 } #[test(compio::test)] diff --git a/src/operation/reader.rs b/src/operation/reader.rs index 6447a1e..75088df 100644 --- a/src/operation/reader.rs +++ b/src/operation/reader.rs @@ -27,7 +27,7 @@ impl OpReader { impl io::Read for OpReader { fn read(&mut self, buf: &mut [u8]) -> io::Result { - futures::executor::block_on(async { + cosmic::iced::futures::executor::block_on(async { self.controller .check() .await diff --git a/src/operation/recursive.rs b/src/operation/recursive.rs index 953a874..076a4b2 100644 --- a/src/operation/recursive.rs +++ b/src/operation/recursive.rs @@ -322,7 +322,7 @@ impl Op { } } - let (from_file, metadata, mut to_file) = futures::try_join!( + let (from_file, metadata, mut to_file) = cosmic::iced::futures::try_join!( async { compio::fs::OpenOptions::new() .read(true) diff --git a/src/tab.rs b/src/tab.rs index 430176a..8b6faa7 100644 --- a/src/tab.rs +++ b/src/tab.rs @@ -1,5 +1,8 @@ +use chrono::{Datelike, Timelike, Utc}; use cosmic::{ - Apply, Element, cosmic_theme, font, + Apply, Element, cosmic_theme, + desktop::fde::{DesktopEntry, get_languages_from_env}, + font, iced::{ Alignment, Border, @@ -37,8 +40,6 @@ use cosmic::{ menu::{action::MenuAction, key_bind::KeyBind}, }, }; - -use chrono::{Datelike, Timelike, Utc}; use i18n_embed::LanguageLoader; use icu::{ datetime::{ @@ -615,7 +616,8 @@ pub fn fs_kind(_metadata: &Metadata) -> FsKind { } fn get_desktop_file_display_name(path: &Path) -> Option { - let entry = match freedesktop_entry_parser::parse_entry(path) { + let locales = get_languages_from_env(); + let entry = match DesktopEntry::from_path(path, Some(&locales)) { Ok(ok) => ok, Err(err) => { log::warn!("failed to parse {}: {}", path.display(), err); @@ -623,14 +625,11 @@ fn get_desktop_file_display_name(path: &Path) -> Option { } }; - entry - .section("Desktop Entry") - .attr("Name") - .map(str::to_string) + entry.name(&locales).map(|s| s.into_owned()) } fn get_desktop_file_icon(path: &Path) -> Option { - let entry = match freedesktop_entry_parser::parse_entry(path) { + let entry = match DesktopEntry::from_path::<&str>(path, None) { Ok(ok) => ok, Err(err) => { log::warn!("failed to parse {}: {}", path.display(), err); @@ -638,10 +637,7 @@ fn get_desktop_file_icon(path: &Path) -> Option { } }; - entry - .section("Desktop Entry") - .attr("Icon") - .map(str::to_string) + entry.icon().map(str::to_string) } /// Creates an icon handle from a desktop file's Icon field value. @@ -656,17 +652,17 @@ fn desktop_icon_handle(icon: &str, size: u16) -> widget::icon::Handle { } pub fn parse_desktop_file(path: &Path) -> (Option, Option) { - let entry = match freedesktop_entry_parser::parse_entry(path) { + let locales = get_languages_from_env(); + let entry = match DesktopEntry::from_path(path, Some(&locales)) { Ok(ok) => ok, Err(err) => { log::warn!("failed to parse {}: {}", path.display(), err); return (None, None); } }; - let section = entry.section("Desktop Entry"); ( - section.attr("Name").map(str::to_string), - section.attr("Icon").map(str::to_string), + entry.name(&locales).map(|s| s.into_owned()), + entry.icon().map(str::to_string), ) } diff --git a/src/thumbnailer.rs b/src/thumbnailer.rs index 8a22ba9..f996f03 100644 --- a/src/thumbnailer.rs +++ b/src/thumbnailer.rs @@ -1,6 +1,7 @@ // Copyright 2023 System76 // SPDX-License-Identifier: GPL-3.0-only +use cosmic::desktop::fde::GenericEntry; use mime_guess::Mime; use rustc_hash::FxHashMap; use std::{ @@ -115,7 +116,7 @@ impl ThumbnailerCache { //TODO: handle directory specific behavior for path in thumbnailer_paths { - let entry = match freedesktop_entry_parser::parse_entry(&path) { + let entry = match GenericEntry::from_path(&path) { Ok(ok) => ok, Err(err) => { log::warn!("failed to parse {}: {}", path.display(), err); @@ -124,12 +125,18 @@ impl ThumbnailerCache { }; //TODO: use TryExec? - let section = entry.section("Thumbnailer Entry"); - let Some(exec) = section.attr("Exec") else { + let Some(section) = entry.group("Thumbnailer Entry") else { + log::warn!( + "missing Thumbnailer Entry section for thumbnailer {}", + path.display() + ); + continue; + }; + let Some(exec) = section.entry("Exec") else { log::warn!("missing Exec attribute for thumbnailer {}", path.display()); continue; }; - let Some(mime_types) = section.attr("MimeType") else { + let Some(mime_types) = section.entry("MimeType") else { log::warn!( "missing MimeType attribute for thumbnailer {}", path.display() From ec25d44df1e57d99e642b73f5d2b223554d22bb1 Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Fri, 30 Jan 2026 17:16:32 -0700 Subject: [PATCH 13/13] Epoch 1.0.5 version update Generated by cosmic-epoch scripts/version-update.sh --- Cargo.lock | 70 +++++++++++++++++----------------- Cargo.toml | 2 +- cosmic-files-applet/Cargo.toml | 2 +- debian/changelog | 6 +++ 4 files changed, 43 insertions(+), 37 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 385b532..cdfca36 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1444,7 +1444,7 @@ dependencies = [ [[package]] name = "cosmic-files" -version = "1.0.4" +version = "1.0.5" dependencies = [ "anyhow", "bzip2", @@ -1504,7 +1504,7 @@ dependencies = [ [[package]] name = "cosmic-files-applet" -version = "1.0.4" +version = "1.0.5" dependencies = [ "cosmic-files", "log", @@ -1573,8 +1573,8 @@ dependencies = [ [[package]] name = "cosmic-text" -version = "0.17.0" -source = "git+https://github.com/pop-os/cosmic-text.git#bdd6657fd7268dc8882214f540a6150eb78cfae0" +version = "0.17.1" +source = "git+https://github.com/pop-os/cosmic-text.git#d7dc22dd20773c132814e256fd38fe071ab1b742" dependencies = [ "bitflags 2.10.0", "fontdb 0.23.0", @@ -1584,7 +1584,7 @@ dependencies = [ "rangemap", "rustc-hash 2.1.1", "self_cell", - "skrifa 0.36.0", + "skrifa 0.40.0", "smol_str 0.3.5", "swash", "sys-locale", @@ -2371,18 +2371,18 @@ checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" [[package]] name = "font-types" -version = "0.9.0" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02a596f5713680923a2080d86de50fe472fb290693cf0f701187a1c8b36996b7" +checksum = "39a654f404bbcbd48ea58c617c2993ee91d1cb63727a37bf2323a4edeed1b8c5" dependencies = [ "bytemuck", ] [[package]] name = "font-types" -version = "0.10.1" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39a654f404bbcbd48ea58c617c2993ee91d1cb63727a37bf2323a4edeed1b8c5" +checksum = "b1e4d2d0cf79d38430cc9dc9aadec84774bff2e1ba30ae2bf6c16cfce9385a23" dependencies = [ "bytemuck", ] @@ -2934,14 +2934,14 @@ dependencies = [ [[package]] name = "harfrust" -version = "0.2.1" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75a4c970f1a00edc1626f1e3cc039492b15b73df28b9fff70f95404a571b4fae" +checksum = "4f9f40651a03bc0f7316bd75267ff5767e93017ef3cfffe76c6aa7252cc5a31c" dependencies = [ "bitflags 2.10.0", "bytemuck", "core_maths", - "read-fonts 0.34.0", + "read-fonts 0.37.0", "smallvec", ] @@ -6117,17 +6117,6 @@ dependencies = [ "crossbeam-utils", ] -[[package]] -name = "read-fonts" -version = "0.34.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8941f8e9d5f8ad3aebea330d01ac68c0167600eb31a86ecd86e97be4d13b51f5" -dependencies = [ - "bytemuck", - "core_maths", - "font-types 0.9.0", -] - [[package]] name = "read-fonts" version = "0.35.0" @@ -6138,6 +6127,17 @@ dependencies = [ "font-types 0.10.1", ] +[[package]] +name = "read-fonts" +version = "0.37.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b634fabf032fab15307ffd272149b622260f55974d9fad689292a5d33df02e5" +dependencies = [ + "bytemuck", + "core_maths", + "font-types 0.11.0", +] + [[package]] name = "recently-used-xbel" version = "1.1.0" @@ -6683,16 +6683,6 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b2aa850e253778c88a04c3d7323b043aeda9d3e30d5971937c1855769763678e" -[[package]] -name = "skrifa" -version = "0.36.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37004372610e83ee2a4c69c7d896b41f33da6a3dc1a4fe07dd9b2629a549b1dc" -dependencies = [ - "bytemuck", - "read-fonts 0.34.0", -] - [[package]] name = "skrifa" version = "0.37.0" @@ -6703,6 +6693,16 @@ dependencies = [ "read-fonts 0.35.0", ] +[[package]] +name = "skrifa" +version = "0.40.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fbdfe3d2475fbd7ddd1f3e5cf8288a30eb3e5f95832829570cd88115a7434ac" +dependencies = [ + "bytemuck", + "read-fonts 0.37.0", +] + [[package]] name = "slab" version = "0.4.11" @@ -9342,9 +9342,9 @@ checksum = "40990edd51aae2c2b6907af74ffb635029d5788228222c4bb811e9351c0caad3" [[package]] name = "zmij" -version = "1.0.17" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02aae0f83f69aafc94776e879363e9771d7ecbffe2c7fbb6c14c5e00dfe88439" +checksum = "1966f8ac2c1f76987d69a74d0e0f929241c10e78136434e3be70ff7f58f64214" [[package]] name = "zopfli" diff --git a/Cargo.toml b/Cargo.toml index 6c6e6ec..87cc477 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmic-files" -version = "1.0.4" +version = "1.0.5" authors = ["Jeremy Soller "] edition = "2024" license = "GPL-3.0-only" diff --git a/cosmic-files-applet/Cargo.toml b/cosmic-files-applet/Cargo.toml index a6358bc..34d83b1 100644 --- a/cosmic-files-applet/Cargo.toml +++ b/cosmic-files-applet/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmic-files-applet" -version = "1.0.4" +version = "1.0.5" edition = "2024" [dependencies] diff --git a/debian/changelog b/debian/changelog index 8febe43..be7bbbb 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +cosmic-files (1.0.5) noble; urgency=medium + + * Epoch 1.0.5 version update + + -- Jeremy Soller Fri, 30 Jan 2026 17:16:28 -0700 + cosmic-files (1.0.4) noble; urgency=medium * Epoch 1.0.4 version update