From 3ee1a07f09e3e2985f9bd086d06b326ec09a77d4 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: Thu, 4 Sep 2025 01:13:08 +0200 Subject: [PATCH] chore: update dependencies Updates all dependencies other than ICU. Enables the `dbus-config` libcosmic feature to fix theming responsiveness. Also prevents the trash and network drive layer container from touching the edge of the window. --- Cargo.lock | 690 +++++++++++----------------------------- Cargo.toml | 43 ++- src/app.rs | 28 +- src/archive.rs | 8 +- src/dialog.rs | 18 +- src/localize.rs | 11 +- src/mime_app.rs | 37 +-- src/mime_icon.rs | 11 +- src/mounter/mod.rs | 10 +- src/tab.rs | 17 +- src/thumbnail_cacher.rs | 11 +- src/thumbnailer.rs | 31 +- 12 files changed, 296 insertions(+), 619 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 5435d8a..8cbcb79 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -152,15 +152,6 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "250f629c0161ad8107cf89319e990051fae62832fd343083bea452d93e2205fd" -[[package]] -name = "aligned-array" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e05c92d086290f52938013f6242ac62bf7d401fab8ad36798a609faa65c3fd2c" -dependencies = [ - "generic-array", -] - [[package]] name = "aligned-vec" version = "0.6.4" @@ -218,12 +209,6 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc7eb209b1518d6bb87b283c20095f5228ecda460da70b44f0802523dea6da04" -[[package]] -name = "android-tzdata" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" - [[package]] name = "android_system_properties" version = "0.1.5" @@ -909,21 +894,11 @@ checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" [[package]] name = "bzip2" -version = "0.5.2" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49ecfb22d906f800d4fe833b6282cf4dc1c298f5057ca0b5445e5c209735ca47" +checksum = "bea8dcd42434048e4f7a304411d9273a411f647446c1234a65ce0554923f4cff" dependencies = [ - "bzip2-sys", -] - -[[package]] -name = "bzip2-sys" -version = "0.1.13+1.0.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "225bff33b2141874fe80d71e07d6eec4f85c5c216453dd96388240f96e1acc14" -dependencies = [ - "cc", - "pkg-config", + "libbz2-rs-sys", ] [[package]] @@ -1065,18 +1040,17 @@ checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" [[package]] name = "chrono" -version = "0.4.41" +version = "0.4.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c469d952047f47f91b68d1cba3f10d63c11d73e4636f24f08daf0278abf01c4d" +checksum = "145052bdd345b87320e369255277e3fb5152762ad123a901ef5c262dd38fe8d2" dependencies = [ - "android-tzdata", "iana-time-zone", "js-sys", "num-traits", "pure-rust-locales", "serde", "wasm-bindgen", - "windows-link 0.1.3", + "windows-link 0.2.0", ] [[package]] @@ -1233,54 +1207,37 @@ dependencies = [ [[package]] name = "compio" -version = "0.14.0" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c52183b7eefcaa6441fe810885a34fcdec7378e2883673fc3d74ca6e9ff738b" +checksum = "362c95e8e1a569b50b7e6642156eccd3678f03b4afa59834f18fad8af5649587" dependencies = [ "compio-buf", - "compio-dispatcher", "compio-driver", "compio-fs", "compio-io", "compio-log", "compio-macros", "compio-net", - "compio-process", - "compio-quic", "compio-runtime", - "compio-signal", ] [[package]] name = "compio-buf" -version = "0.5.1" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d14413106aad7dd931df3c4724110dabd731c81d52ba18edb4f2d57e7beb611b" +checksum = "5881ed3b06004d5e505746e6780dbbaf76fc508201e57bb5c84fcb4d69b8c23e" dependencies = [ "arrayvec", "bytes", "libc", ] -[[package]] -name = "compio-dispatcher" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ae8fab55190537c8634232f395302011ce39c18facbd4b85363df41114677ac" -dependencies = [ - "compio-driver", - "compio-runtime", - "flume", - "futures-channel", -] - [[package]] name = "compio-driver" -version = "0.7.1" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "469f8e58596d82e2a0e17cb8216094cc75e8285fc7048907767cdb0337286f19" +checksum = "3c15d472da8b8f80cc8068b030fb439dc1cb300ffdf9041a054d226ea3825f1d" dependencies = [ - "aligned-array", "cfg-if", "cfg_aliases 0.2.1", "compio-buf", @@ -1289,19 +1246,21 @@ dependencies = [ "crossbeam-queue", "futures-util", "io-uring", + "io_uring_buf_ring", "libc", "once_cell", "paste", "polling 3.10.0", - "socket2 0.5.10", - "windows-sys 0.52.0", + "slab", + "socket2 0.6.0", + "windows-sys 0.61.0", ] [[package]] name = "compio-fs" -version = "0.7.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dee2c5ba7c96f0caf3d62ed745278b26eebd4e9296817c4ef2ad6c359629f8ab" +checksum = "ea585c274239b9fd350a484c75a31fd0df5f031805b6664d83a98f5e8b019e2f" dependencies = [ "cfg-if", "cfg_aliases 0.2.1", @@ -1312,14 +1271,14 @@ dependencies = [ "libc", "os_pipe", "widestring", - "windows-sys 0.52.0", + "windows-sys 0.61.0", ] [[package]] name = "compio-io" -version = "0.6.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c18b1d7d4c058e3e92e9265d59f74981fda2693809b1e45f8ed7717d892c8ac" +checksum = "11d44edc43b3d69badbe7d398e61b5910b90aba580eae1ba3a821b11e2daf249" dependencies = [ "compio-buf", "futures-util", @@ -1349,9 +1308,9 @@ dependencies = [ [[package]] name = "compio-net" -version = "0.7.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0882a85c535c7b5d6ea3b9b37cc7421ec3f8ae8b83a09eb53f4295fb87b54995" +checksum = "2e6ea7aa4a9f38d68dd0098a11232236cb3efd0ef3cab50ecdada3d745f1f776" dependencies = [ "cfg-if", "compio-buf", @@ -1361,83 +1320,30 @@ dependencies = [ "either", "libc", "once_cell", - "socket2 0.5.10", + "socket2 0.6.0", "widestring", - "windows-sys 0.52.0", -] - -[[package]] -name = "compio-process" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9dc299e4c0a2cdc4455bb4df86c554845d1abe611a1922e4b12a8af2a0fadc35" -dependencies = [ - "cfg-if", - "compio-buf", - "compio-driver", - "compio-io", - "compio-runtime", - "futures-util", - "windows-sys 0.52.0", -] - -[[package]] -name = "compio-quic" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8ab46b819ec5d08936218e9afc64f51ae660d128cd408458b08b457223a0541" -dependencies = [ - "cfg_aliases 0.2.1", - "compio-buf", - "compio-io", - "compio-log", - "compio-net", - "compio-runtime", - "flume", - "futures-util", - "libc", - "quinn-proto", - "rustc-hash 2.1.1", - "rustls", - "thiserror 2.0.16", - "windows-sys 0.52.0", + "windows-sys 0.61.0", ] [[package]] name = "compio-runtime" -version = "0.7.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a95ef126945a166879ef37d494015be13a1e4e452419bc4e5c4c5799f441756a" +checksum = "bd8edfe2c092d238f9eba7d795fcece2a2f0826f69134496dd03a9aa02e59916" dependencies = [ "async-task", "cfg-if", "compio-buf", "compio-driver", "compio-log", + "core_affinity", "crossbeam-queue", "futures-util", "libc", "once_cell", "scoped-tls", - "slab", - "socket2 0.5.10", - "windows-sys 0.52.0", -] - -[[package]] -name = "compio-signal" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd30ba3a28cd73fa49a6e4f1c31c1ad4742fb33802662aadf9ed188ae8a8f0e4" -dependencies = [ - "compio-buf", - "compio-driver", - "compio-runtime", - "libc", - "once_cell", - "os_pipe", - "slab", - "windows-sys 0.52.0", + "socket2 0.6.0", + "windows-sys 0.61.0", ] [[package]] @@ -1495,6 +1401,17 @@ dependencies = [ "libc", ] +[[package]] +name = "core_affinity" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a034b3a7b624016c6e13f5df875747cc25f884156aad2abd12b6c46797971342" +dependencies = [ + "libc", + "num_cpus", + "winapi", +] + [[package]] name = "core_maths" version = "0.1.1" @@ -1504,25 +1421,13 @@ dependencies = [ "libm", ] -[[package]] -name = "cosmic-client-toolkit" -version = "0.1.0" -source = "git+https://github.com/pop-os/cosmic-protocols?rev=178eb0b#178eb0b14a0e5c192f64f6dee6c40341a8e5ee51" -dependencies = [ - "cosmic-protocols 0.1.0 (git+https://github.com/pop-os/cosmic-protocols?rev=178eb0b)", - "libc", - "smithay-client-toolkit 0.19.2", - "wayland-client", - "wayland-protocols", -] - [[package]] name = "cosmic-client-toolkit" version = "0.1.0" source = "git+https://github.com/pop-os/cosmic-protocols?rev=6254f50#6254f50abc6dbfccadc6939f80e20081ab5f9d51" dependencies = [ "bitflags 2.9.4", - "cosmic-protocols 0.1.0 (git+https://github.com/pop-os/cosmic-protocols?rev=6254f50)", + "cosmic-protocols", "libc", "smithay-client-toolkit 0.20.0", "wayland-client", @@ -1541,7 +1446,7 @@ dependencies = [ "futures-util", "iced_futures", "known-folders", - "notify 8.2.0", + "notify", "ron 0.11.0", "serde", "tokio", @@ -1567,7 +1472,7 @@ dependencies = [ "bzip2", "chrono", "compio", - "cosmic-client-toolkit 0.1.0 (git+https://github.com/pop-os/cosmic-protocols?rev=178eb0b)", + "cosmic-client-toolkit", "cosmic-mime-apps", "dirs 6.0.0", "env_logger", @@ -1579,8 +1484,8 @@ dependencies = [ "gio", "glib", "glob", - "i18n-embed 0.15.4", - "i18n-embed-fl 0.9.4", + "i18n-embed", + "i18n-embed-fl", "icu", "icu_collator", "icu_provider 1.5.0", @@ -1590,17 +1495,17 @@ dependencies = [ "jxl-oxide", "libc", "libcosmic", + "liblzma", "log", "md-5", "mime_guess", "notify-debouncer-full", "notify-rust", "num_cpus", - "once_cell", "open", "ordermap", "paste", - "png 0.17.16", + "png 0.18.0", "procfs", "recently-used-xbel", "regex", @@ -1616,12 +1521,10 @@ dependencies = [ "trash", "url", "uzers", - "vergen", "walkdir", "wayland-client", - "xdg 2.5.2", + "xdg 3.0.0", "xdg-mime", - "xz2", "zip", ] @@ -1658,20 +1561,6 @@ dependencies = [ "xdg 2.5.2", ] -[[package]] -name = "cosmic-protocols" -version = "0.1.0" -source = "git+https://github.com/pop-os/cosmic-protocols?rev=178eb0b#178eb0b14a0e5c192f64f6dee6c40341a8e5ee51" -dependencies = [ - "bitflags 2.9.4", - "wayland-backend", - "wayland-client", - "wayland-protocols", - "wayland-protocols-wlr", - "wayland-scanner", - "wayland-server", -] - [[package]] name = "cosmic-protocols" version = "0.1.0" @@ -1719,7 +1608,7 @@ dependencies = [ "rangemap", "rustc-hash 1.1.0", "rustybuzz", - "self_cell 1.2.0", + "self_cell", "smol_str", "swash", "sys-locale", @@ -2442,6 +2331,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4a3d7db9596fecd151c5f638c0ee5d5bd487b6e0ea232e5dc96d5250f6f94b1d" dependencies = [ "crc32fast", + "libz-rs-sys", "miniz_oxide", ] @@ -2457,39 +2347,13 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8bf7cc16383c4b8d58b9905a8509f02926ce3058053c056376248d958c9df1e8" -[[package]] -name = "fluent" -version = "0.16.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb74634707bebd0ce645a981148e8fb8c7bccd4c33c652aeffd28bf2f96d555a" -dependencies = [ - "fluent-bundle 0.15.3", - "unic-langid", -] - [[package]] name = "fluent" version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8137a6d5a2c50d6b0ebfcb9aaa91a28154e0a70605f112d30cb0cd4a78670477" dependencies = [ - "fluent-bundle 0.16.0", - "unic-langid", -] - -[[package]] -name = "fluent-bundle" -version = "0.15.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fe0a21ee80050c678013f82edf4b705fe2f26f1f9877593d13198612503f493" -dependencies = [ - "fluent-langneg", - "fluent-syntax 0.11.1", - "intl-memoizer", - "intl_pluralrules", - "rustc-hash 1.1.0", - "self_cell 0.10.3", - "smallvec", + "fluent-bundle", "unic-langid", ] @@ -2500,11 +2364,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "01203cb8918f5711e73891b347816d932046f95f54207710bda99beaeb423bf4" dependencies = [ "fluent-langneg", - "fluent-syntax 0.12.0", + "fluent-syntax", "intl-memoizer", "intl_pluralrules", "rustc-hash 2.1.1", - "self_cell 1.2.0", + "self_cell", "smallvec", "unic-langid", ] @@ -2518,15 +2382,6 @@ dependencies = [ "unic-langid", ] -[[package]] -name = "fluent-syntax" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a530c4694a6a8d528794ee9bbd8ba0122e779629ac908d15ad5a7ae7763a33d" -dependencies = [ - "thiserror 1.0.69", -] - [[package]] name = "fluent-syntax" version = "0.12.0" @@ -2537,18 +2392,6 @@ dependencies = [ "thiserror 2.0.16", ] -[[package]] -name = "flume" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da0e4dd2a88388a1f4ccc7c9ce104604dab68d9f408dc34cd45823d5a9069095" -dependencies = [ - "futures-core", - "futures-sink", - "nanorand", - "spin", -] - [[package]] name = "fnv" version = "1.0.7" @@ -2830,10 +2673,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592" dependencies = [ "cfg-if", - "js-sys", "libc", "wasi 0.11.1+wasi-snapshot-preview1", - "wasm-bindgen", ] [[package]] @@ -2843,11 +2684,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "26145e563e54f2cadc477553f1ec5ee650b00862f0a58bcd12cbdc5f0ea2d2f4" dependencies = [ "cfg-if", - "js-sys", "libc", "r-efi", "wasi 0.14.4+wasi-0.2.4", - "wasm-bindgen", ] [[package]] @@ -2888,9 +2727,9 @@ checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" [[package]] name = "gio" -version = "0.20.12" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e27e276e7b6b8d50f6376ee7769a71133e80d093bdc363bd0af71664228b831" +checksum = "52b5e3f390d01b79e30da451dd00e27cd1ac2de81658e3abf6c1fc3229b24c5f" dependencies = [ "futures-channel", "futures-core", @@ -2905,15 +2744,15 @@ dependencies = [ [[package]] name = "gio-sys" -version = "0.20.10" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "521e93a7e56fc89e84aea9a52cfc9436816a4b363b030260b699950ff1336c83" +checksum = "a03f2234671e5a588cfe1f59c2b22c103f5772ea351be9cc824a9ce0d06d99fd" dependencies = [ "glib-sys", "gobject-sys", "libc", "system-deps 7.0.5", - "windows-sys 0.59.0", + "windows-sys 0.60.2", ] [[package]] @@ -2935,9 +2774,9 @@ checksum = "151665d9be52f9bb40fc7966565d39666f2d1e69233571b71b87791c7e0528b3" [[package]] name = "glib" -version = "0.20.12" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffc4b6e352d4716d84d7dde562dd9aee2a7d48beb872dd9ece7f2d1515b2d683" +checksum = "60bdc26493257b5794ba9301f7cbaf7ab0d69a570bfbefa4d7d360e781cb5205" dependencies = [ "bitflags 2.9.4", "futures-channel", @@ -2956,9 +2795,9 @@ dependencies = [ [[package]] name = "glib-macros" -version = "0.20.12" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8084af62f09475a3f529b1629c10c429d7600ee1398ae12dd3bf175d74e7145" +checksum = "e772291ebea14c28eb11bb75741f62f4a4894f25e60ce80100797b6b010ef0f9" dependencies = [ "heck 0.5.0", "proc-macro-crate 3.3.0", @@ -2969,9 +2808,9 @@ dependencies = [ [[package]] name = "glib-sys" -version = "0.20.10" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ab79e1ed126803a8fb827e3de0e2ff95191912b8db65cee467edb56fc4cc215" +checksum = "dc7c43cff6a7dc43821e45ebf172399437acd6716fa2186b6852d2b397bf622d" dependencies = [ "libc", "system-deps 7.0.5", @@ -3019,9 +2858,9 @@ dependencies = [ [[package]] name = "gobject-sys" -version = "0.20.10" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec9aca94bb73989e3cfdbf8f2e0f1f6da04db4d291c431f444838925c4c63eda" +checksum = "3e9a190eef2bce144a6aa8434e306974c6062c398e0a33a146d60238f9062d5c" dependencies = [ "glib-sys", "libc", @@ -3204,27 +3043,6 @@ dependencies = [ "unic-langid", ] -[[package]] -name = "i18n-embed" -version = "0.15.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "669ffc2c93f97e6ddf06ddbe999fcd6782e3342978bb85f7d3c087c7978404c4" -dependencies = [ - "arc-swap", - "fluent 0.16.1", - "fluent-langneg", - "fluent-syntax 0.11.1", - "i18n-embed-impl", - "intl-memoizer", - "locale_config", - "log", - "parking_lot 0.12.4", - "rust-embed", - "thiserror 1.0.69", - "unic-langid", - "walkdir", -] - [[package]] name = "i18n-embed" version = "0.16.0" @@ -3232,9 +3050,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a217bbb075dcaefb292efa78897fc0678245ca67f265d12c351e42268fcb0305" dependencies = [ "arc-swap", - "fluent 0.17.0", + "fluent", "fluent-langneg", - "fluent-syntax 0.12.0", + "fluent-syntax", "i18n-embed-impl", "intl-memoizer", "log", @@ -3246,25 +3064,6 @@ dependencies = [ "walkdir", ] -[[package]] -name = "i18n-embed-fl" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04b2969d0b3fc6143776c535184c19722032b43e6a642d710fa3f88faec53c2d" -dependencies = [ - "find-crate", - "fluent 0.16.1", - "fluent-syntax 0.11.1", - "i18n-config", - "i18n-embed 0.15.4", - "proc-macro-error2", - "proc-macro2", - "quote", - "strsim", - "syn 2.0.106", - "unic-langid", -] - [[package]] name = "i18n-embed-fl" version = "0.10.0" @@ -3272,10 +3071,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e598ed73b67db92f61e04672e599eef2991a262a40e1666735b8a86d2e7e9f30" dependencies = [ "find-crate", - "fluent 0.17.0", - "fluent-syntax 0.12.0", + "fluent", + "fluent-syntax", "i18n-config", - "i18n-embed 0.16.0", + "i18n-embed", "proc-macro-error2", "proc-macro2", "quote", @@ -3355,7 +3154,7 @@ source = "git+https://github.com/pop-os/libcosmic.git#ac18f009b4fd2a20d18e2f656c dependencies = [ "bitflags 2.9.4", "bytes", - "cosmic-client-toolkit 0.1.0 (git+https://github.com/pop-os/cosmic-protocols?rev=6254f50)", + "cosmic-client-toolkit", "dnd", "glam", "log", @@ -3438,7 +3237,7 @@ version = "0.14.0-dev" source = "git+https://github.com/pop-os/libcosmic.git#ac18f009b4fd2a20d18e2f656cd668c320ba58fd" dependencies = [ "bytes", - "cosmic-client-toolkit 0.1.0 (git+https://github.com/pop-os/cosmic-protocols?rev=6254f50)", + "cosmic-client-toolkit", "dnd", "iced_core", "iced_futures", @@ -3471,7 +3270,7 @@ dependencies = [ "as-raw-xcb-connection", "bitflags 2.9.4", "bytemuck", - "cosmic-client-toolkit 0.1.0 (git+https://github.com/pop-os/cosmic-protocols?rev=6254f50)", + "cosmic-client-toolkit", "futures", "glam", "guillotiere", @@ -3499,7 +3298,7 @@ name = "iced_widget" version = "0.14.0-dev" source = "git+https://github.com/pop-os/libcosmic.git#ac18f009b4fd2a20d18e2f656cd668c320ba58fd" dependencies = [ - "cosmic-client-toolkit 0.1.0 (git+https://github.com/pop-os/cosmic-protocols?rev=6254f50)", + "cosmic-client-toolkit", "dnd", "iced_renderer", "iced_runtime", @@ -3518,7 +3317,7 @@ name = "iced_winit" version = "0.14.0-dev" source = "git+https://github.com/pop-os/libcosmic.git#ac18f009b4fd2a20d18e2f656cd668c320ba58fd" dependencies = [ - "cosmic-client-toolkit 0.1.0 (git+https://github.com/pop-os/cosmic-protocols?rev=6254f50)", + "cosmic-client-toolkit", "dnd", "iced_futures", "iced_graphics", @@ -4160,17 +3959,6 @@ dependencies = [ "cfg-if", ] -[[package]] -name = "inotify" -version = "0.9.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8069d3ec154eb856955c1c0fbffefbf5f3c40a104ec912d4797314c1801abff" -dependencies = [ - "bitflags 1.3.2", - "inotify-sys", - "libc", -] - [[package]] name = "inotify" version = "0.11.0" @@ -4262,6 +4050,17 @@ dependencies = [ "libc", ] +[[package]] +name = "io_uring_buf_ring" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a8867874ff5758b47c1dac069e6e86541432f9da8be9111c5e94154134f07d0" +dependencies = [ + "bytes", + "io-uring", + "rustix 1.0.8", +] + [[package]] name = "is-docker" version = "0.2.0" @@ -4648,6 +4447,12 @@ version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a79a3332a6609480d7d0c9eab957bca6b455b91bb84e66d19f5ff66294b85b8" +[[package]] +name = "libbz2-rs-sys" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c4a545a15244c7d945065b5d392b2d2d7f21526fba56ce51467b06ed445e8f7" + [[package]] name = "libc" version = "0.2.175" @@ -4663,7 +4468,7 @@ dependencies = [ "ashpd 0.12.0", "auto_enums", "chrono", - "cosmic-client-toolkit 0.1.0 (git+https://github.com/pop-os/cosmic-protocols?rev=6254f50)", + "cosmic-client-toolkit", "cosmic-config", "cosmic-freedesktop-icons", "cosmic-settings-config", @@ -4673,8 +4478,8 @@ dependencies = [ "derive_setters", "freedesktop-desktop-entry", "futures", - "i18n-embed 0.16.0", - "i18n-embed-fl 0.10.0", + "i18n-embed", + "i18n-embed-fl", "iced", "iced_core", "iced_futures", @@ -4686,6 +4491,7 @@ dependencies = [ "iced_winit", "image", "libc", + "license", "mime 0.3.17", "palette", "raw-window-handle", @@ -4724,6 +4530,26 @@ dependencies = [ "windows-targets 0.53.3", ] +[[package]] +name = "liblzma" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10bf66f4598dc77ff96677c8e763655494f00ff9c1cf79e2eb5bb07bc31f807d" +dependencies = [ + "liblzma-sys", +] + +[[package]] +name = "liblzma-sys" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01b9596486f6d60c3bbe644c0e1be1aa6ccc472ad630fe8927b456973d7cb736" +dependencies = [ + "cc", + "libc", + "pkg-config", +] + [[package]] name = "libm" version = "0.2.15" @@ -4741,6 +4567,26 @@ dependencies = [ "redox_syscall 0.5.17", ] +[[package]] +name = "libz-rs-sys" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "840db8cf39d9ec4dd794376f38acc40d0fc65eec2a8f484f7fd375b84602becd" +dependencies = [ + "zlib-rs", +] + +[[package]] +name = "license" +version = "3.7.0+3.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2db9430f1c0c6079d5650a97674467ff3934cb852400817eeb6c216b0a4eddb" +dependencies = [ + "reword", + "serde", + "serde_json", +] + [[package]] name = "linux-raw-sys" version = "0.3.8" @@ -4827,12 +4673,6 @@ version = "0.12.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "234cf4f4a04dc1f57e24b96cc0cd600cf2af460d4161ac5ecdd0af8e1f3b2a38" -[[package]] -name = "lru-slab" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "112b39cec0b298b6c1999fee3e31427f74f676e4cb9879ed1a121b43661a4154" - [[package]] name = "lyon" version = "1.0.1" @@ -4886,24 +4726,13 @@ dependencies = [ ] [[package]] -name = "lzma-rs" -version = "0.3.0" +name = "lzma-rust2" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "297e814c836ae64db86b36cf2a557ba54368d03f6afcd7d947c266692f71115e" +checksum = "c60a23ffb90d527e23192f1246b14746e2f7f071cb84476dd879071696c18a4a" dependencies = [ - "byteorder", "crc", -] - -[[package]] -name = "lzma-sys" -version = "0.1.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fda04ab3764e6cde78b9974eec4f779acaba7c4e84b36eca3cf77c581b85d27" -dependencies = [ - "cc", - "libc", - "pkg-config", + "sha2", ] [[package]] @@ -5053,18 +4882,6 @@ dependencies = [ "simd-adler32", ] -[[package]] -name = "mio" -version = "0.8.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" -dependencies = [ - "libc", - "log", - "wasi 0.11.1+wasi-snapshot-preview1", - "windows-sys 0.48.0", -] - [[package]] name = "mio" version = "1.0.4" @@ -5114,15 +4931,6 @@ dependencies = [ "unicode-xid", ] -[[package]] -name = "nanorand" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a51313c5820b0b02bd422f4b44776fbf47961755c74ce64afc73bfad10226c3" -dependencies = [ - "getrandom 0.2.16", -] - [[package]] name = "ndk" version = "0.9.0" @@ -5209,25 +5017,6 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0676bb32a98c1a483ce53e500a81ad9c3d5b3f7c920c28c24e9cb0980d0b5bc8" -[[package]] -name = "notify" -version = "6.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6205bd8bb1e454ad2e27422015fb5e4f2bcc7e08fa8f27058670d208324a4d2d" -dependencies = [ - "bitflags 2.9.4", - "crossbeam-channel", - "filetime", - "fsevent-sys", - "inotify 0.9.6", - "kqueue", - "libc", - "log", - "mio 0.8.11", - "walkdir", - "windows-sys 0.48.0", -] - [[package]] name = "notify" version = "8.2.0" @@ -5236,11 +5025,11 @@ checksum = "4d3d07927151ff8575b7087f245456e549fea62edf0ec4e565a5ee50c8402bc3" dependencies = [ "bitflags 2.9.4", "fsevent-sys", - "inotify 0.11.0", + "inotify", "kqueue", "libc", "log", - "mio 1.0.4", + "mio", "notify-types", "walkdir", "windows-sys 0.60.2", @@ -5248,15 +5037,14 @@ dependencies = [ [[package]] name = "notify-debouncer-full" -version = "0.3.2" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb7fd166739789c9ff169e654dc1501373db9d80a4c3f972817c8a4d7cf8f34e" +checksum = "375bd3a138be7bfeff3480e4a623df4cbfb55b79df617c055cd810ba466fa078" dependencies = [ - "crossbeam-channel", "file-id", "log", - "notify 6.1.1", - "parking_lot 0.12.4", + "notify", + "notify-types", "walkdir", ] @@ -5378,15 +5166,6 @@ dependencies = [ "syn 2.0.106", ] -[[package]] -name = "num_threads" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c7398b9c8b70908f6371f47ed36737907c87c52af34c268fed0bf0ceb92ead9" -dependencies = [ - "libc", -] - [[package]] name = "objc" version = "0.2.7" @@ -6070,6 +5849,12 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" +[[package]] +name = "ppmd-rust" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c834641d8ad1b348c9ee86dec3b9840d805acd5f24daa5f90c788951a52ff59b" + [[package]] name = "ppv-lite86" version = "0.2.21" @@ -6160,23 +5945,22 @@ dependencies = [ [[package]] name = "procfs" -version = "0.17.0" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc5b72d8145275d844d4b5f6d4e1eef00c8cd889edb6035c21675d1bb1f45c9f" +checksum = "25485360a54d6861439d60facef26de713b1e126bf015ec8f98239467a2b82f7" dependencies = [ "bitflags 2.9.4", "chrono", "flate2", - "hex", "procfs-core", - "rustix 0.38.44", + "rustix 1.0.8", ] [[package]] name = "procfs-core" -version = "0.17.0" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "239df02d8349b06fc07398a3a1697b06418223b1c7725085e801e7c0fc6a12ec" +checksum = "e6401bf7b6af22f78b563665d15a22e9aef27775b79b149a66ca022468a4e405" dependencies = [ "bitflags 2.9.4", "chrono", @@ -6251,26 +6035,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "quinn-proto" -version = "0.11.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1906b49b0c3bc04b5fe5d86a77925ae6524a19b816ae38ce1e426255f1d8a31" -dependencies = [ - "bytes", - "getrandom 0.3.3", - "lru-slab", - "rand 0.9.2", - "ring", - "rustc-hash 2.1.1", - "rustls-pki-types", - "slab", - "thiserror 2.0.16", - "tinyvec", - "tracing", - "web-time", -] - [[package]] name = "quote" version = "1.0.40" @@ -6578,6 +6342,15 @@ dependencies = [ "usvg", ] +[[package]] +name = "reword" +version = "7.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2de73ec80cfacafa51b73b0db31d6c3a4718fc6b0d479ef445609704020c1b0" +dependencies = [ + "unicode-segmentation", +] + [[package]] name = "rfd" version = "0.15.4" @@ -6611,20 +6384,6 @@ dependencies = [ "bytemuck", ] -[[package]] -name = "ring" -version = "0.17.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" -dependencies = [ - "cc", - "cfg-if", - "getrandom 0.2.16", - "libc", - "untrusted", - "windows-sys 0.52.0", -] - [[package]] name = "ron" version = "0.9.0" @@ -6749,40 +6508,6 @@ dependencies = [ "windows-sys 0.60.2", ] -[[package]] -name = "rustls" -version = "0.23.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0ebcbd2f03de0fc1122ad9bb24b127a5a6cd51d72604a3f3c50ac459762b6cc" -dependencies = [ - "once_cell", - "rustls-pki-types", - "rustls-webpki", - "subtle", - "zeroize", -] - -[[package]] -name = "rustls-pki-types" -version = "1.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "229a4a4c221013e7e1f1a043678c5cc39fe5171437c88fb47151a21e6f5b5c79" -dependencies = [ - "web-time", - "zeroize", -] - -[[package]] -name = "rustls-webpki" -version = "0.103.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a17884ae0c1b773f1ccd2bd4a8c72f16da897310a98b0e84bf349ad5ead92fc" -dependencies = [ - "ring", - "rustls-pki-types", - "untrusted", -] - [[package]] name = "rustversion" version = "1.0.22" @@ -6870,15 +6595,6 @@ dependencies = [ "tiny-skia", ] -[[package]] -name = "self_cell" -version = "0.10.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e14e4d63b804dc0c7ec4a1e52bcb63f02c7ac94476755aa579edac21e01f915d" -dependencies = [ - "self_cell 1.2.0", -] - [[package]] name = "self_cell" version = "1.2.0" @@ -7084,14 +6800,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3457dea1f0eb631b4034d61d4d8c32074caa6cd1ab2d59f2327bd8461e2c0016" dependencies = [ "bitflags 2.9.4", - "bytemuck", "calloop 0.13.0", "calloop-wayland-source 0.3.0", "cursor-icon", "libc", "log", "memmap2 0.9.8", - "pkg-config", "rustix 0.38.44", "thiserror 1.0.69", "wayland-backend", @@ -7101,7 +6815,6 @@ dependencies = [ "wayland-protocols", "wayland-protocols-wlr", "wayland-scanner", - "xkbcommon 0.7.0", "xkeysym", ] @@ -7165,16 +6878,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "socket2" -version = "0.5.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e22376abed350d73dd1cd119b57ffccad95b4e585a7cda43e286245ce23c0678" -dependencies = [ - "libc", - "windows-sys 0.52.0", -] - [[package]] name = "socket2" version = "0.6.0" @@ -7215,15 +6918,6 @@ dependencies = [ "x11rb", ] -[[package]] -name = "spin" -version = "0.9.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" -dependencies = [ - "lock_api", -] - [[package]] name = "spirv" version = "0.3.0+sdk-1.3.268.0" @@ -7547,9 +7241,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "83bde6f1ec10e72d583d91623c939f623002284ef622b87de38cfd546cbf2031" dependencies = [ "deranged", - "libc", "num-conv", - "num_threads", "powerfmt", "serde", "time-core", @@ -7656,7 +7348,7 @@ dependencies = [ "bytes", "io-uring", "libc", - "mio 1.0.4", + "mio", "pin-project-lite", "signal-hook-registry", "slab", @@ -7952,12 +7644,6 @@ version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" -[[package]] -name = "untrusted" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" - [[package]] name = "url" version = "2.5.7" @@ -8058,18 +7744,6 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65" -[[package]] -name = "vergen" -version = "8.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2990d9ea5967266ea0ccf413a4aa5c42a93dbcfda9cb49a97de6931726b12566" -dependencies = [ - "anyhow", - "cfg-if", - "rustversion", - "time", -] - [[package]] name = "version-compare" version = "0.2.0" @@ -9320,15 +8994,6 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec7a2a501ed189703dba8b08142f057e887dfc4b2cc4db2d343ac6376ba3e0b9" -[[package]] -name = "xz2" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "388c44dc09d76f1536602ead6d325eb532f5c122f17782bd57fb47baeeb767e2" -dependencies = [ - "lzma-sys", -] - [[package]] name = "yansi" version = "1.0.1" @@ -9646,34 +9311,37 @@ dependencies = [ [[package]] name = "zip" -version = "2.4.2" +version = "5.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fabe6324e908f85a1c52063ce7aa26b68dcb7eb6dbc83a2d148403c9bc3eba50" +checksum = "b9fdfa5f34b5980f2c21b3a2c68c09ade4debddc7be52c51056695effc73a08c" dependencies = [ "aes", "arbitrary", "bzip2", "constant_time_eq", "crc32fast", - "crossbeam-utils", "deflate64", - "displaydoc", "flate2", "getrandom 0.3.3", "hmac", "indexmap 2.11.0", - "lzma-rs", + "lzma-rust2", "memchr", "pbkdf2", + "ppmd-rust", "sha1", - "thiserror 2.0.16", "time", - "xz2", "zeroize", "zopfli", "zstd", ] +[[package]] +name = "zlib-rs" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f06ae92f42f5e5c42443fd094f245eb656abf56dd7cce9b8b263236565e00f2" + [[package]] name = "zopfli" version = "0.8.2" diff --git a/Cargo.toml b/Cargo.toml index f9ab9ef..3eda9fc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,14 +14,14 @@ icu = { version = "1.5.0", features = [ "compiled_data", "icu_datetime_experimental", ] } -cctk = { git = "https://github.com/pop-os/cosmic-protocols", package = "cosmic-client-toolkit", rev = "178eb0b", optional = true } +cctk = { git = "https://github.com/pop-os/cosmic-protocols", package = "cosmic-client-toolkit", rev = "6254f50", optional = true } 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.20", optional = true } -glib = { version = "0.20", optional = true } +gio = { version = "0.21", optional = true } +glib = { version = "0.21", optional = true } glob = "0.3" icu_collator = "1.5" icu_provider = { version = "1.5", features = ["sync"] } @@ -30,9 +30,8 @@ image = "0.25" libc = "0.2" log = "0.4" mime_guess = "2" -notify-debouncer-full = "0.3" +notify-debouncer-full = "0.6" notify-rust = { version = "4", optional = true } -once_cell = "1.20" open = "5.3.2" paste = "1.0" regex = "1" @@ -44,40 +43,40 @@ 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.8", optional = true } -xdg = { version = "2.5.2", optional = true } +wayland-client = { version = "0.31.11", optional = true } +xdg = { version = "3.0", optional = true } # https://github.com/ebassi/xdg-mime-rs/pull/31 xdg-mime = { git = "https://github.com/ellieplayswow/xdg-mime-rs", branch = "feature/get-same-as" } # Compression -bzip2 = { version = "0.5", optional = true } #TODO: replace with pure Rust crate -flate2 = "1.0" -tar = "0.4.43" -xz2 = { version = "0.1", optional = true } #TODO: replace with pure Rust crate -ordermap = { version = "0.5.8", features = ["serde"] } +bzip2 = { version = "0.6", optional = true } #TODO: replace with pure Rust crate +flate2 = "1.1" +tar = "0.4.44" +liblzma = { version = "0.4.4", optional = true } #TODO: replace with pure Rust crate +ordermap = { version = "0.5.9", features = ["serde"] } # Internationalization -i18n-embed = { version = "0.15", features = [ +i18n-embed = { version = "0.16", features = [ "fluent-system", "desktop-requester", ] } -i18n-embed-fl = "0.9" +i18n-embed-fl = "0.10" rust-embed = "8" slotmap = "1.0.7" recently-used-xbel = { git = "https://github.com/pop-os/recently-used-xbel.git" } -zip = "2.2.2" +zip = "5.0.0" uzers = "0.12.1" md-5 = "0.10.6" -png = "0.17.16" -jxl-oxide = { version = "0.12.2", features = ["image"] } +png = "0.18" +jxl-oxide = { version = "0.12.4", features = ["image"] } num_cpus = "1.17.0" # Completion-based IO runtime to enable io_uring / IOCP file IO support. [dependencies.compio] -version = "0.14.0" +version = "0.16.0" default-features = false features = ["io", "macros", "polling", "runtime"] [dependencies.io-uring] -version = "0.7.6" +version = "0.7.10" default-features = false optional = true @@ -85,7 +84,7 @@ optional = true git = "https://github.com/pop-os/libcosmic.git" default-features = false #TODO: a11y feature crashes -features = ["autosize", "multi-window", "tokio", "winit", "surface-message"] +features = ["autosize", "dbus-config", "multi-window", "tokio", "winit", "surface-message"] [features] default = [ @@ -96,7 +95,7 @@ default = [ "notify", "wgpu", "wayland", - "xz2", + "liblzma", ] dbus-config = ["libcosmic/dbus-config"] desktop = [ @@ -125,7 +124,7 @@ debug = true fork = "0.2" [target.'cfg(target_os = "linux")'.dependencies] -procfs = "0.17" +procfs = "0.18" [dev-dependencies] # cap-std = "3" diff --git a/src/app.rs b/src/app.rs index 9126964..e4e0777 100644 --- a/src/app.rs +++ b/src/app.rs @@ -44,8 +44,8 @@ use cosmic::{ }; use mime_guess::Mime; use notify_debouncer_full::{ - DebouncedEvent, Debouncer, FileIdMap, new_debouncer, - notify::{self, RecommendedWatcher, Watcher}, + DebouncedEvent, Debouncer, RecommendedCache, new_debouncer, + notify::{self, RecommendedWatcher}, }; use slotmap::Key as SlotMapKey; use std::{ @@ -611,7 +611,7 @@ pub enum WindowKind { } pub struct WatcherWrapper { - watcher_opt: Option>, + watcher_opt: Option>, } impl Clone for WatcherWrapper { @@ -673,7 +673,10 @@ pub struct App { #[cfg(all(feature = "wayland", feature = "desktop-applet"))] surface_names: HashMap, toasts: widget::toaster::Toasts, - watcher_opt: Option<(Debouncer, HashSet)>, + watcher_opt: Option<( + Debouncer, + HashSet, + )>, windows: HashMap, nav_dnd_hover: Option<(Location, Instant)>, tab_dnd_hover: Option<(Entity, Instant)>, @@ -1583,7 +1586,7 @@ impl App { // Unwatch paths no longer used for path in old_paths.iter() { if !new_paths.contains(path) { - match watcher.watcher().unwatch(path) { + match watcher.unwatch(path) { Ok(()) => { log::debug!("unwatching {:?}", path); } @@ -1597,10 +1600,7 @@ impl App { // Watch new paths for path in new_paths.iter() { if !old_paths.contains(path) { - match watcher - .watcher() - .watch(path, notify::RecursiveMode::NonRecursive) - { + match watcher.watch(path, notify::RecursiveMode::NonRecursive) { Ok(()) => { log::debug!("watching {:?}", path); } @@ -5983,9 +5983,8 @@ impl Application for App { .map(|path| [path.join("files"), path]) .flatten(); for path in trash_paths { - if let Err(e) = watcher - .watcher() - .watch(&path, notify::RecursiveMode::NonRecursive) + if let Err(e) = + watcher.watch(&path, notify::RecursiveMode::NonRecursive) { log::warn!( "failed to add trash bin `{}` to watcher: {e:?}", @@ -6055,9 +6054,8 @@ impl Application for App { match watcher_res { Ok(mut watcher) => { - if let Err(e) = watcher - .watcher() - .watch(&recents_path, notify::RecursiveMode::NonRecursive) + if let Err(e) = + watcher.watch(&recents_path, notify::RecursiveMode::NonRecursive) { log::warn!( "failed to add recents file `{}` to watcher: {}", diff --git a/src/archive.rs b/src/archive.rs index e35ee46..f08c634 100644 --- a/src/archive.rs +++ b/src/archive.rs @@ -24,9 +24,9 @@ pub const SUPPORTED_ARCHIVE_TYPES: &[&str] = &[ "application/x-bzip2", #[cfg(feature = "bzip2")] "application/x-bzip2-compressed-tar", - #[cfg(feature = "xz2")] + #[cfg(feature = "liblzma")] "application/x-xz", - #[cfg(feature = "xz2")] + #[cfg(feature = "liblzma")] "application/x-xz-compressed-tar", ]; @@ -86,11 +86,11 @@ pub fn extract( .map(tar::Archive::new) .and_then(|mut archive| archive.unpack(new_dir)) .map_err(|e| OperationError::from_err(e, controller))?, - #[cfg(feature = "xz2")] + #[cfg(feature = "liblzma")] "application/x-xz" | "application/x-xz-compressed-tar" => { OpReader::new(path, controller.clone()) .map(io::BufReader::new) - .map(xz2::read::XzDecoder::new) + .map(liblzma::read::XzDecoder::new) .map(tar::Archive::new) .and_then(|mut archive| archive.unpack(new_dir)) .map_err(|e| OperationError::from_err(e, controller))? diff --git a/src/dialog.rs b/src/dialog.rs index d78e683..9bc2f76 100644 --- a/src/dialog.rs +++ b/src/dialog.rs @@ -19,8 +19,8 @@ use cosmic::{ }, }; use notify_debouncer_full::{ - DebouncedEvent, Debouncer, FileIdMap, new_debouncer, - notify::{self, RecommendedWatcher, Watcher}, + DebouncedEvent, Debouncer, RecommendedCache, new_debouncer, + notify::{self, RecommendedWatcher}, }; use recently_used_xbel::update_recently_used; use std::{ @@ -468,7 +468,7 @@ impl From for Message { pub struct MounterData(MounterKey, MounterItem); struct WatcherWrapper { - watcher_opt: Option>, + watcher_opt: Option>, } impl Clone for WatcherWrapper { @@ -510,7 +510,10 @@ struct App { search_id: widget::Id, tab: Tab, key_binds: HashMap, - watcher_opt: Option<(Debouncer, HashSet)>, + watcher_opt: Option<( + Debouncer, + HashSet, + )>, auto_scroll_speed: Option, } @@ -866,7 +869,7 @@ impl App { // Unwatch paths no longer used for path in old_paths.iter() { if !new_paths.contains(path) { - match watcher.watcher().unwatch(path) { + match watcher.unwatch(path) { Ok(()) => { log::debug!("unwatching {:?}", path); } @@ -881,10 +884,7 @@ impl App { for path in new_paths.iter() { if !old_paths.contains(path) { //TODO: should this be recursive? - match watcher - .watcher() - .watch(path, notify::RecursiveMode::NonRecursive) - { + match watcher.watch(path, notify::RecursiveMode::NonRecursive) { Ok(()) => { log::debug!("watching {:?}", path); } diff --git a/src/localize.rs b/src/localize.rs index f436a61..a338693 100644 --- a/src/localize.rs +++ b/src/localize.rs @@ -1,7 +1,5 @@ // SPDX-License-Identifier: GPL-3.0-only -use std::str::FromStr; - use i18n_embed::{ DefaultLocalizer, LanguageLoader, Localizer, fluent::{FluentLanguageLoader, fluent_language_loader}, @@ -9,14 +7,15 @@ use i18n_embed::{ use icu::locid::Locale; use icu_collator::{Collator, CollatorOptions, Numeric}; use icu_provider::DataLocale; -use once_cell::sync::Lazy; use rust_embed::RustEmbed; +use std::str::FromStr; +use std::sync::LazyLock; #[derive(RustEmbed)] #[folder = "i18n/"] struct Localizations; -pub static LANGUAGE_LOADER: Lazy = Lazy::new(|| { +pub static LANGUAGE_LOADER: LazyLock = LazyLock::new(|| { let loader: FluentLanguageLoader = fluent_language_loader!(); loader @@ -26,7 +25,7 @@ pub static LANGUAGE_LOADER: Lazy = Lazy::new(|| { loader }); -pub static LANGUAGE_SORTER: Lazy = Lazy::new(|| { +pub static LANGUAGE_SORTER: LazyLock = LazyLock::new(|| { let mut options = CollatorOptions::new(); options.numeric = Some(Numeric::On); @@ -41,7 +40,7 @@ pub static LANGUAGE_SORTER: Lazy = Lazy::new(|| { .expect("Creating a collator from the system's current language, the fallback language, or American English should succeed") }); -pub static LOCALE: Lazy = Lazy::new(|| { +pub static LOCALE: LazyLock = LazyLock::new(|| { fn get_local() -> Result> { let locale = std::env::var("LC_TIME").or_else(|_| std::env::var("LANG"))?; diff --git a/src/mime_app.rs b/src/mime_app.rs index e3f8c78..e8ed809 100644 --- a/src/mime_app.rs +++ b/src/mime_app.rs @@ -291,29 +291,22 @@ impl MimeAppCache { // https://specifications.freedesktop.org/mime-apps-spec/mime-apps-spec-latest.html //TODO: ensure correct lookup order let mut mimeapps_paths = Vec::new(); - match xdg::BaseDirectories::new() { - Ok(xdg_dirs) => { - for path in xdg_dirs.find_data_files("applications/mimeapps.list") { - mimeapps_paths.push(path); - } - for desktop in desktops.iter().rev() { - for path in - xdg_dirs.find_data_files(format!("applications/{desktop}-mimeapps.list")) - { - mimeapps_paths.push(path); - } - } - for path in xdg_dirs.find_config_files("mimeapps.list") { - mimeapps_paths.push(path); - } - for desktop in desktops.iter().rev() { - for path in xdg_dirs.find_config_files(format!("{desktop}-mimeapps.list")) { - mimeapps_paths.push(path); - } - } + let xdg_dirs = xdg::BaseDirectories::new(); + + for path in xdg_dirs.find_data_files("applications/mimeapps.list") { + mimeapps_paths.push(path); + } + for desktop in desktops.iter().rev() { + for path in xdg_dirs.find_data_files(format!("applications/{desktop}-mimeapps.list")) { + mimeapps_paths.push(path); } - Err(err) => { - log::warn!("failed to get xdg base directories: {}", err); + } + for path in xdg_dirs.find_config_files("mimeapps.list") { + mimeapps_paths.push(path); + } + for desktop in desktops.iter().rev() { + for path in xdg_dirs.find_config_files(format!("{desktop}-mimeapps.list")) { + mimeapps_paths.push(path); } } diff --git a/src/mime_icon.rs b/src/mime_icon.rs index 4879e0a..a697911 100644 --- a/src/mime_icon.rs +++ b/src/mime_icon.rs @@ -2,8 +2,12 @@ use cosmic::widget::icon; use mime_guess::Mime; -use once_cell::sync::Lazy; -use std::{collections::HashMap, fs, path::Path, sync::Mutex}; +use std::{ + collections::HashMap, + fs, + path::Path, + sync::{LazyLock, Mutex}, +}; pub const FALLBACK_MIME_ICON: &str = "text-x-generic"; @@ -48,7 +52,8 @@ impl MimeIconCache { .clone() } } -static MIME_ICON_CACHE: Lazy> = Lazy::new(|| Mutex::new(MimeIconCache::new())); +static MIME_ICON_CACHE: LazyLock> = + LazyLock::new(|| Mutex::new(MimeIconCache::new())); pub fn mime_for_path>( path: P, diff --git a/src/mounter/mod.rs b/src/mounter/mod.rs index 81bb22b..caaba72 100644 --- a/src/mounter/mod.rs +++ b/src/mounter/mod.rs @@ -1,6 +1,10 @@ use cosmic::{Task, iced::Subscription, widget}; -use once_cell::sync::Lazy; -use std::{collections::BTreeMap, fmt, path::PathBuf, sync::Arc}; +use std::{ + collections::BTreeMap, + fmt, + path::PathBuf, + sync::{Arc, LazyLock}, +}; use tokio::sync::mpsc; use crate::{config::IconSizes, tab}; @@ -125,4 +129,4 @@ pub fn mounters() -> Mounters { Mounters::new(mounters) } -pub static MOUNTERS: Lazy = Lazy::new(mounters); +pub static MOUNTERS: LazyLock = LazyLock::new(mounters); diff --git a/src/tab.rs b/src/tab.rs index b4ec12d..e4f7987 100644 --- a/src/tab.rs +++ b/src/tab.rs @@ -1,5 +1,5 @@ use cosmic::{ - Element, cosmic_theme, font, + Apply, Element, cosmic_theme, font, iced::{ Alignment, Border, @@ -45,7 +45,6 @@ use icu::datetime::{ use image::ImageDecoder; use jxl_oxide::integration::JxlDecoder; use mime_guess::{Mime, mime}; -use once_cell::sync::Lazy; use ordermap::OrderMap; use serde::{Deserialize, Serialize}; use std::{ @@ -106,7 +105,7 @@ pub(crate) static SORT_OPTION_FALLBACK: LazyLock> = Lazy::new(|| { +static MODE_NAMES: LazyLock> = LazyLock::new(|| { vec![ // Mode 0 fl!("none"), @@ -127,7 +126,7 @@ static MODE_NAMES: Lazy> = Lazy::new(|| { ] }); -static SPECIAL_DIRS: Lazy> = Lazy::new(|| { +static SPECIAL_DIRS: LazyLock> = LazyLock::new(|| { let mut special_dirs = HashMap::new(); if let Some(dir) = dirs::document_dir() { special_dirs.insert(dir, "folder-documents"); @@ -533,7 +532,7 @@ pub enum FsKind { pub fn fs_kind(metadata: &Metadata) -> FsKind { //TODO: method to reload remote filesystems dynamically //TODO: fix for https://github.com/eminence/procfs/issues/262 - static DEVICES: Lazy> = Lazy::new(|| { + static DEVICES: LazyLock> = LazyLock::new(|| { let mut devices = HashMap::new(); match procfs::process::Process::myself() { Ok(process) => match process.mountinfo() { @@ -5520,7 +5519,9 @@ impl Tab { .into(), ])) .padding([space_xxs, space_xs]) - .layer(cosmic_theme::Layer::Primary), + .layer(cosmic_theme::Layer::Primary) + .apply(widget::container) + .padding([0, 0, 7, 0]), ); } } @@ -5534,7 +5535,9 @@ impl Tab { .into(), ])) .padding([space_xxs, space_xs]) - .layer(cosmic_theme::Layer::Primary), + .layer(cosmic_theme::Layer::Primary) + .apply(widget::container) + .padding([0, 0, 7, 0]), ); } _ => {} diff --git a/src/thumbnail_cacher.rs b/src/thumbnail_cacher.rs index 4cb0f41..6337354 100644 --- a/src/thumbnail_cacher.rs +++ b/src/thumbnail_cacher.rs @@ -1,6 +1,5 @@ use image::DynamicImage; use md5::{Digest, Md5}; -use once_cell::sync::Lazy; use std::{ collections::HashMap, error::Error, @@ -8,6 +7,7 @@ use std::{ io::{self, BufReader, BufWriter}, os::unix::fs::PermissionsExt, path::{Path, PathBuf}, + sync::LazyLock, time::UNIX_EPOCH, }; use tempfile::NamedTempFile; @@ -158,7 +158,12 @@ impl ThumbnailCacher { ) }; - let mut image_data = vec![0; reader.output_buffer_size()]; + let mut image_data = vec![ + 0; + reader.output_buffer_size().ok_or_else( + || "The required image buffer size is too large." + )? + ]; reader.next_frame(&mut image_data)?; let file = File::create(path)?; @@ -340,7 +345,7 @@ pub enum CachedThumbnail { Failed, } -static THUMBNAIL_CACHE_BASE_DIR: Lazy> = Lazy::new(|| { +static THUMBNAIL_CACHE_BASE_DIR: LazyLock> = LazyLock::new(|| { if let Some(cache_dir) = dirs::cache_dir() { return Some(cache_dir.join("thumbnails")); } diff --git a/src/thumbnailer.rs b/src/thumbnailer.rs index 36dbd0a..d0cacac 100644 --- a/src/thumbnailer.rs +++ b/src/thumbnailer.rs @@ -2,8 +2,14 @@ // SPDX-License-Identifier: GPL-3.0-only use mime_guess::Mime; -use once_cell::sync::Lazy; -use std::{collections::HashMap, fs, path::Path, process, sync::Mutex, time::Instant}; +use std::{ + collections::HashMap, + fs, + path::Path, + process, + sync::{LazyLock, Mutex}, + time::Instant, +}; #[derive(Clone, Debug)] pub struct Thumbnailer { @@ -72,16 +78,13 @@ impl ThumbnailerCache { self.cache.clear(); let mut search_dirs = Vec::new(); - match xdg::BaseDirectories::new() { - Ok(xdg_dirs) => { - search_dirs.push(xdg_dirs.get_data_home().join("thumbnailers")); - for data_dir in xdg_dirs.get_data_dirs() { - search_dirs.push(data_dir.join("thumbnailers")); - } - } - Err(err) => { - log::warn!("failed to get xdg base directories: {}", err); - } + let xdg_dirs = xdg::BaseDirectories::new(); + + if let Some(data_home) = xdg_dirs.get_data_home() { + search_dirs.push(data_home.join("thumbnailers")); + } + for data_dir in xdg_dirs.get_data_dirs() { + search_dirs.push(data_dir.join("thumbnailers")); } let mut thumbnailer_paths = Vec::new(); @@ -148,8 +151,8 @@ impl ThumbnailerCache { } } -static THUMBNAILER_CACHE: Lazy> = - Lazy::new(|| Mutex::new(ThumbnailerCache::new())); +static THUMBNAILER_CACHE: LazyLock> = + LazyLock::new(|| Mutex::new(ThumbnailerCache::new())); pub fn thumbnailer(mime: &Mime) -> Vec { let thumbnailer_cache = THUMBNAILER_CACHE.lock().unwrap();