From 48e14d4add4df6d1234de2a8875c2a9ddcee7f9c Mon Sep 17 00:00:00 2001 From: Michael Aaron Murphy Date: Mon, 17 Mar 2025 12:53:25 +0100 Subject: [PATCH] improv(keyboard): shortcuts UI improvements --- Cargo.lock | 682 +++++++++--------- cosmic-settings/Cargo.toml | 24 +- cosmic-settings/src/app.rs | 19 +- cosmic-settings/src/localize.rs | 1 + .../pages/input/keyboard/shortcuts/common.rs | 270 ++++--- .../pages/input/keyboard/shortcuts/custom.rs | 89 ++- .../keyboard/shortcuts/manage_windows.rs | 6 +- .../src/pages/input/keyboard/shortcuts/mod.rs | 10 +- .../input/keyboard/shortcuts/move_window.rs | 6 +- .../src/pages/input/keyboard/shortcuts/nav.rs | 6 +- .../pages/input/keyboard/shortcuts/system.rs | 6 +- .../pages/input/keyboard/shortcuts/tiling.rs | 6 +- cosmic-settings/src/pages/system/about.rs | 6 +- i18n/en/cosmic_settings.ftl | 2 +- page/Cargo.toml | 1 - page/src/binder.rs | 26 +- page/src/insert.rs | 12 +- page/src/lib.rs | 20 +- page/src/section.rs | 4 + pages/wallpapers/Cargo.toml | 4 +- 20 files changed, 703 insertions(+), 497 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8e4b490..481d665 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -151,7 +151,7 @@ dependencies = [ "getrandom 0.2.15", "once_cell", "version_check", - "zerocopy", + "zerocopy 0.7.35", ] [[package]] @@ -209,7 +209,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ef6978589202a00cd7e118380c448a08b6ed394c3a8df3a430d0898e3a42d046" dependencies = [ "android-properties", - "bitflags 2.8.0", + "bitflags 2.9.0", "cc", "cesu8", "jni", @@ -306,9 +306,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.96" +version = "1.0.97" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b964d184e89d9b6b67dd2715bc8e74cf3107fb2b529990c90cf517326150bf4" +checksum = "dcfed56ad506cb2c684a14971b8861fdc3baaaae314b9e5f9bb532cbe3ba7a4f" [[package]] name = "apply" @@ -345,7 +345,7 @@ checksum = "0ae92a5119aa49cdbcf6b9f893fe4e1d98b04ccbf82ee0584ad948a44a734dea" dependencies = [ "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.100", ] [[package]] @@ -599,7 +599,7 @@ checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11" dependencies = [ "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.100", ] [[package]] @@ -628,13 +628,13 @@ checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de" [[package]] name = "async-trait" -version = "0.1.86" +version = "0.1.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "644dd749086bf3771a2fbc5f256fdb982d53f011c7d5d560304eafeecebce79d" +checksum = "e539d3fca749fcee5236ab05e93a52867dd549cc157c8cb7f99595f3cedffdb5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.100", ] [[package]] @@ -723,9 +723,9 @@ dependencies = [ [[package]] name = "avif-serialize" -version = "0.8.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e335041290c43101ca215eed6f43ec437eb5a42125573f600fc3fa42b9bddd62" +checksum = "98922d6a4cfbcb08820c69d8eeccc05bb1f29bfa06b4f5b1dbfe9a868bd7608e" dependencies = [ "arrayvec", ] @@ -759,9 +759,9 @@ checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" [[package]] name = "basic-toml" -version = "0.1.9" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "823388e228f614e9558c6804262db37960ec8821856535f5c3f59913140558f8" +checksum = "ba62675e8242a4c4e806d12f11d136e626e6c8361d6b829310732241652a178a" dependencies = [ "serde", ] @@ -773,7 +773,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "271383c67ccabffb7381723dea0672a673f292304fcb45c01cc648c7a8d58088" dependencies = [ "annotate-snippets", - "bitflags 2.8.0", + "bitflags 2.9.0", "cexpr", "clang-sys", "itertools 0.12.1", @@ -784,7 +784,7 @@ dependencies = [ "regex", "rustc-hash 1.1.0", "shlex", - "syn 2.0.98", + "syn 2.0.100", ] [[package]] @@ -816,9 +816,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.8.0" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f68f53c83ab957f72c32642f3868eec03eb974d1fb82e453128456482613d36" +checksum = "5c8214115b7bf84099f1309324e63141d4c5d7cc26862f97a0a857dbefe165bd" dependencies = [ "serde", ] @@ -891,9 +891,9 @@ dependencies = [ [[package]] name = "borsh" -version = "1.5.5" +version = "1.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5430e3be710b68d984d1391c854eb431a9d548640711faa54eecb1df93db91cc" +checksum = "ad8646f98db542e39fc66e68a20b2144f6a732636df7c2354e74645faaa433ce" dependencies = [ "borsh-derive", "cfg_aliases 0.2.1", @@ -901,15 +901,15 @@ dependencies = [ [[package]] name = "borsh-derive" -version = "1.5.5" +version = "1.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8b668d39970baad5356d7c83a86fee3a539e6f93bf6764c97368243e17a0487" +checksum = "fdd1d3c0c2f5833f22386f252fe8ed005c7f59fdcddeef025c01b4c3b9fd9ac3" dependencies = [ "once_cell", - "proc-macro-crate 3.2.0", + "proc-macro-crate 3.3.0", "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.100", ] [[package]] @@ -975,22 +975,22 @@ dependencies = [ [[package]] name = "bytemuck" -version = "1.21.0" +version = "1.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef657dfab802224e671f5818e9a4935f9b1957ed18e58292690cc39e7a4092a3" +checksum = "b6b1fc10dbac614ebc03540c9dbd60e83887fda27794998c6528f1782047d540" dependencies = [ "bytemuck_derive", ] [[package]] name = "bytemuck_derive" -version = "1.8.1" +version = "1.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fa76293b4f7bb636ab88fd78228235b5248b4d05cc589aed610f954af5d7c7a" +checksum = "7ecc273b49b3205b83d648f0690daa588925572cc5063745bfe547fe7ec8e1a1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.100", ] [[package]] @@ -1007,9 +1007,9 @@ checksum = "8f1fe948ff07f4bd06c30984e69f5b4899c516a3ef74f34df92a2df2ab535495" [[package]] name = "bytes" -version = "1.10.0" +version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f61dac84819c6588b558454b194026eb1f09c293b9036ae9b159e74e73ab6cf9" +checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" [[package]] name = "cached" @@ -1035,7 +1035,7 @@ dependencies = [ "darling 0.20.10", "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.100", ] [[package]] @@ -1046,9 +1046,9 @@ checksum = "ade8366b8bd5ba243f0a58f036cc0ca8a2f069cff1a2351ef1cac6b083e16fc0" [[package]] name = "calendrical_calculations" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f27ca2b6e2f7d75f43e001ded6f25e79b80bded5abbe764cbdf78c25a3051f4b" +checksum = "e97f73e95d668625c9b28a3072e6326773785a0cf807de9f3d632778438f3d38" dependencies = [ "core_maths", "displaydoc", @@ -1060,7 +1060,7 @@ version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b99da2f8558ca23c71f4fd15dc57c906239752dd27ff3c00a1d56b685b7cbfec" dependencies = [ - "bitflags 2.8.0", + "bitflags 2.9.0", "log", "polling 3.7.4", "rustix 0.38.44", @@ -1082,9 +1082,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.2.14" +version = "1.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c3d1b2e905a3a7b00a6141adb0e4c0bb941d11caf55349d863942a1cc44e3c9" +checksum = "1fcb57c740ae1daf453ae85f16e37396f672b039e00d9d866e07ddb24e328e3a" dependencies = [ "jobserver", "libc", @@ -1173,9 +1173,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.30" +version = "4.5.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92b7b18d71fad5313a1e320fa9897994228ce274b60faa4d694fe0ea89cd9e6d" +checksum = "e958897981290da2a852763fe9cdb89cd36977a5d729023127095fa94d95e2ff" dependencies = [ "clap_builder", "clap_derive", @@ -1183,9 +1183,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.30" +version = "4.5.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a35db2071778a7344791a4fb4f95308b5673d219dee3ae348b86642574ecc90c" +checksum = "83b0f35019843db2160b5bb19ae09b4e6411ac33fc6a712003c33e03090e2489" dependencies = [ "anstream", "anstyle", @@ -1195,14 +1195,14 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.28" +version = "4.5.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf4ced95c6f4a675af3da73304b9ac4ed991640c36374e4b46795c49e17cf1ed" +checksum = "09176aae279615badda0765c0c0b3f6ed53f4709118af73cf4655d85d1530cd7" dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.100", ] [[package]] @@ -1499,7 +1499,7 @@ name = "cosmic-client-toolkit" version = "0.1.0" source = "git+https://github.com/pop-os/cosmic-protocols//?rev=ee0d46f#ee0d46f4b7e1508011a98225f14c4a0528ab2914" dependencies = [ - "bitflags 2.8.0", + "bitflags 2.9.0", "cosmic-protocols", "libc", "smithay-client-toolkit", @@ -1510,7 +1510,7 @@ dependencies = [ [[package]] name = "cosmic-comp-config" version = "0.1.0" -source = "git+https://github.com/pop-os/cosmic-comp#9042f0adf46c2b88f6199d0dbb448ed457d8bbc6" +source = "git+https://github.com/pop-os/cosmic-comp#b0d0bfb034150bed134d3c4f29d49a6a22f4454c" dependencies = [ "cosmic-config", "input", @@ -1520,7 +1520,7 @@ dependencies = [ [[package]] name = "cosmic-config" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic#cb682be3c887bcbf591309d350bac4d4710e104b" +source = "git+https://github.com/pop-os/libcosmic#f16bc4a7640a8895add431899b50eb4ec731b570" dependencies = [ "atomicwrites", "cosmic-config-derive", @@ -1542,7 +1542,7 @@ dependencies = [ [[package]] name = "cosmic-config-derive" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic#cb682be3c887bcbf591309d350bac4d4710e104b" +source = "git+https://github.com/pop-os/libcosmic#f16bc4a7640a8895add431899b50eb4ec731b570" dependencies = [ "quote", "syn 1.0.109", @@ -1553,7 +1553,7 @@ name = "cosmic-dbus-networkmanager" version = "0.1.0" source = "git+https://github.com/pop-os/dbus-settings-bindings#0eee63a96c8b1f6555ca797b5c12545c372b1a1b" dependencies = [ - "bitflags 2.8.0", + "bitflags 2.9.0", "derive_builder", "procfs", "thiserror 1.0.69", @@ -1578,7 +1578,7 @@ dependencies = [ [[package]] name = "cosmic-idle-config" version = "0.1.0" -source = "git+https://github.com/pop-os/cosmic-idle#7899fccbbe3d6746982178d3eff48ce8943b0f71" +source = "git+https://github.com/pop-os/cosmic-idle#267bb837f127eb805a17250ebcad02db57eb72cb" dependencies = [ "cosmic-config", "serde", @@ -1598,7 +1598,7 @@ dependencies = [ [[package]] name = "cosmic-panel-config" version = "0.1.0" -source = "git+https://github.com/pop-os/cosmic-panel#dc429bc571393624a72ce91c6dd864849c3812ae" +source = "git+https://github.com/pop-os/cosmic-panel#bf028e2bbc803f5523617c7f6d947d3dabf9582e" dependencies = [ "anyhow", "cosmic-config", @@ -1615,7 +1615,7 @@ name = "cosmic-protocols" version = "0.1.0" source = "git+https://github.com/pop-os/cosmic-protocols//?rev=ee0d46f#ee0d46f4b7e1508011a98225f14c4a0528ab2914" dependencies = [ - "bitflags 2.8.0", + "bitflags 2.9.0", "wayland-backend", "wayland-client", "wayland-protocols", @@ -1627,11 +1627,11 @@ dependencies = [ [[package]] name = "cosmic-randr" version = "0.1.0" -source = "git+https://github.com/pop-os/cosmic-randr#4ad6fed387b84228067b96b1e9ca246280598375" +source = "git+https://github.com/pop-os/cosmic-randr#c247019230c5d820dd1c3d47bc4e3c52fb03b42f" dependencies = [ "cosmic-protocols", "futures-lite 2.6.0", - "indexmap 2.7.1", + "indexmap 2.8.0", "tachyonix", "thiserror 2.0.12", "tokio", @@ -1643,7 +1643,7 @@ dependencies = [ [[package]] name = "cosmic-randr-shell" version = "0.1.0" -source = "git+https://github.com/pop-os/cosmic-randr#4ad6fed387b84228067b96b1e9ca246280598375" +source = "git+https://github.com/pop-os/cosmic-randr#c247019230c5d820dd1c3d47bc4e3c52fb03b42f" dependencies = [ "kdl", "slotmap", @@ -1697,7 +1697,7 @@ dependencies = [ "i18n-embed-fl", "icu", "image", - "indexmap 2.7.1", + "indexmap 2.8.0", "itertools 0.13.0", "itoa", "libcosmic", @@ -1709,9 +1709,9 @@ dependencies = [ "num-traits", "once_cell", "regex", - "ron 0.8.1", + "ron 0.9.0", "rust-embed", - "rustix 0.38.44", + "rustix 1.0.3", "secure-string", "serde", "slab", @@ -1735,13 +1735,13 @@ dependencies = [ [[package]] name = "cosmic-settings-config" version = "0.1.0" -source = "git+https://github.com/pop-os/cosmic-settings-daemon#e2aa1056900d6f8c9c7555c0401aa7c99281eb06" +source = "git+https://github.com/pop-os/cosmic-settings-daemon#4a64bba4f103a5d4cc5c8d60382f06ef662eca02" dependencies = [ "cosmic-config", "ron 0.9.0", "serde", "serde_with", - "thiserror 1.0.69", + "thiserror 2.0.12", "tracing", "xkbcommon", ] @@ -1771,7 +1771,6 @@ dependencies = [ "derive_setters", "downcast-rs", "libcosmic", - "once_cell", "regex", "slab", "slotmap", @@ -1839,7 +1838,7 @@ name = "cosmic-text" version = "0.13.2" source = "git+https://github.com/pop-os/cosmic-text.git#500a8fc6d172de5c9e08c6013070b6b7fcdf79dd" dependencies = [ - "bitflags 2.8.0", + "bitflags 2.9.0", "fontdb 0.16.2", "log", "rangemap", @@ -1859,7 +1858,7 @@ dependencies = [ [[package]] name = "cosmic-theme" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic#cb682be3c887bcbf591309d350bac4d4710e104b" +source = "git+https://github.com/pop-os/libcosmic#f16bc4a7640a8895add431899b50eb4ec731b570" dependencies = [ "almost", "cosmic-config", @@ -1984,7 +1983,7 @@ version = "22.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bdbd1f579714e3c809ebd822c81ef148b1ceaeb3d535352afc73fd0c4c6a0017" dependencies = [ - "bitflags 2.8.0", + "bitflags 2.9.0", "libloading", "winapi", ] @@ -2034,7 +2033,7 @@ dependencies = [ "proc-macro2", "quote", "strsim 0.11.1", - "syn 2.0.98", + "syn 2.0.100", ] [[package]] @@ -2056,7 +2055,7 @@ checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core 0.20.10", "quote", - "syn 2.0.98", + "syn 2.0.100", ] [[package]] @@ -2081,9 +2080,9 @@ checksum = "5c297a1c74b71ae29df00c3e22dd9534821d60eb9af5a0192823fa2acea70c2a" [[package]] name = "deranged" -version = "0.3.11" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" +checksum = "28cfac68e08048ae1883171632c2aef3ebc555621ae56fbccce1cbf22dd7f058" dependencies = [ "powerfmt", "serde", @@ -2140,7 +2139,7 @@ dependencies = [ "darling 0.20.10", "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.100", ] [[package]] @@ -2219,7 +2218,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.100", ] [[package]] @@ -2236,7 +2235,7 @@ name = "dnd" version = "0.1.0" source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-0.13-2#6b9faab87bea9cebec6ae036906fd67fed254f5f" dependencies = [ - "bitflags 2.8.0", + "bitflags 2.9.0", "mime 0.1.0", "raw-window-handle", "smithay-client-toolkit", @@ -2269,7 +2268,7 @@ version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a0f8a69e60d75ae7dab4ef26a59ca99f2a89d4c142089b537775ae0c198bdcde" dependencies = [ - "bitflags 2.8.0", + "bitflags 2.9.0", "bytemuck", "drm-ffi", "drm-fourcc", @@ -2304,9 +2303,9 @@ dependencies = [ [[package]] name = "either" -version = "1.13.0" +version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" +checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" [[package]] name = "endi" @@ -2332,7 +2331,7 @@ checksum = "fc4caf64a58d7a6d65ab00639b046ff54399a39f5f2554728895ace4b297cd79" dependencies = [ "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.100", ] [[package]] @@ -2406,9 +2405,9 @@ dependencies = [ [[package]] name = "event-listener-strategy" -version = "0.5.3" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c3e4e0dd3673c1139bf041f3008816d9cf2946bbfac2945c09e523b8d7b05b2" +checksum = "8be9f3dfaaffdae2972880079a491a1a8bb7cbed0b8dd7a347f668b4150a3b93" dependencies = [ "event-listener 5.4.0", "pin-project-lite", @@ -2423,7 +2422,7 @@ dependencies = [ "bit_field", "half", "lebe", - "miniz_oxide 0.8.4", + "miniz_oxide 0.8.5", "rayon-core", "smallvec", "zune-inflate", @@ -2516,12 +2515,12 @@ dependencies = [ [[package]] name = "flate2" -version = "1.0.35" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c936bfdafb507ebbf50b8074c54fa31c5be9a1e7e5f467dd659697041407d07c" +checksum = "11faaf5a5236997af9848be0bef4db95824b1d534ebc64d0f0c6cf3e67bd38dc" dependencies = [ "crc32fast", - "miniz_oxide 0.8.4", + "miniz_oxide 0.8.5", ] [[package]] @@ -2588,9 +2587,9 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "foldhash" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0d2fde1f7b3d48b8395d5f2de76c18a528bd6a9cdde438df747bfcba3e05d6f" +checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" [[package]] name = "font-types" @@ -2656,7 +2655,7 @@ checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" dependencies = [ "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.100", ] [[package]] @@ -2676,9 +2675,9 @@ dependencies = [ [[package]] name = "freedesktop-desktop-entry" -version = "0.7.8" +version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6a4cdc5571033a6a329b9e8a8430594d1e3b60f42bb79e79686cadef34740ea" +checksum = "7e5e2bd2e383df08a8439c2e096be16d5355aa00f976b295cf8e077ea5953d5d" dependencies = [ "cached", "gettext-rs", @@ -2799,7 +2798,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.100", ] [[package]] @@ -2878,14 +2877,14 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a49c392881ce6d5c3b8cb70f98717b7c07aabbdff06687b9030dbfbe2725f8" +checksum = "73fea8450eea4bac3940448fb7ae50d91f034f941199fcd9d909a5a07aa455f0" dependencies = [ "cfg-if", "libc", - "wasi 0.13.3+wasi-0.2.2", - "windows-targets 0.52.6", + "r-efi", + "wasi 0.14.2+wasi-0.2.4", ] [[package]] @@ -2974,7 +2973,7 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fbcd2dba93594b227a1f57ee09b8b9da8892c34d55aa332e034a228d0fe6a171" dependencies = [ - "bitflags 2.8.0", + "bitflags 2.9.0", "gpu-alloc-types", ] @@ -2984,7 +2983,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "98ff03b468aa837d70984d55f5d3f846f6ec31fe34bbb97c4f85219caeee1ca4" dependencies = [ - "bitflags 2.8.0", + "bitflags 2.9.0", ] [[package]] @@ -3006,7 +3005,7 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dcf29e94d6d243368b7a56caa16bc213e4f9f8ed38c4d9557069527b5d5281ca" dependencies = [ - "bitflags 2.8.0", + "bitflags 2.9.0", "gpu-descriptor-types", "hashbrown 0.15.2", ] @@ -3017,7 +3016,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fdf242682df893b86f33a73828fb09ca4b2d3bb6cc95249707fc684d27484b91" dependencies = [ - "bitflags 2.8.0", + "bitflags 2.9.0", ] [[package]] @@ -3038,9 +3037,9 @@ dependencies = [ [[package]] name = "half" -version = "2.4.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6dd08c532ae367adf81c312a4580bc67f1d0fe8bc9c460520283f4c0ff277888" +checksum = "7db2ff139bba50379da6aa0766b52fdcb62cb5b263009b09ed58ba604e14bbd1" dependencies = [ "cfg-if", "crunchy", @@ -3080,7 +3079,7 @@ version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "af2a7e73e1f34c48da31fb668a907f250794837e08faa144fd24f0b8b741e890" dependencies = [ - "bitflags 2.8.0", + "bitflags 2.9.0", "com", "libc", "libloading", @@ -3190,7 +3189,7 @@ dependencies = [ "proc-macro2", "quote", "strsim 0.11.1", - "syn 2.0.98", + "syn 2.0.100", "unic-langid", ] @@ -3204,19 +3203,20 @@ dependencies = [ "i18n-config", "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.100", ] [[package]] name = "iana-time-zone" -version = "0.1.61" +version = "0.1.62" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220" +checksum = "b2fd658b06e56721792c5df4475705b6cda790e9298d19d2f8af083457bcd127" dependencies = [ "android_system_properties", "core-foundation-sys", "iana-time-zone-haiku", "js-sys", + "log", "wasm-bindgen", "windows-core 0.52.0", ] @@ -3233,7 +3233,7 @@ dependencies = [ [[package]] name = "iced" version = "0.14.0-dev" -source = "git+https://github.com/pop-os/libcosmic#cb682be3c887bcbf591309d350bac4d4710e104b" +source = "git+https://github.com/pop-os/libcosmic#f16bc4a7640a8895add431899b50eb4ec731b570" dependencies = [ "dnd", "iced_accessibility", @@ -3262,7 +3262,7 @@ name = "iced_core" version = "0.14.0-dev" source = "git+https://github.com/pop-os/libcosmic#f16bc4a7640a8895add431899b50eb4ec731b570" dependencies = [ - "bitflags 2.8.0", + "bitflags 2.9.0", "bytes", "cosmic-client-toolkit", "dnd", @@ -3285,7 +3285,7 @@ dependencies = [ [[package]] name = "iced_futures" version = "0.14.0-dev" -source = "git+https://github.com/pop-os/libcosmic#cb682be3c887bcbf591309d350bac4d4710e104b" +source = "git+https://github.com/pop-os/libcosmic#f16bc4a7640a8895add431899b50eb4ec731b570" dependencies = [ "futures", "iced_core", @@ -3311,9 +3311,9 @@ dependencies = [ [[package]] name = "iced_graphics" version = "0.14.0-dev" -source = "git+https://github.com/pop-os/libcosmic#cb682be3c887bcbf591309d350bac4d4710e104b" +source = "git+https://github.com/pop-os/libcosmic#f16bc4a7640a8895add431899b50eb4ec731b570" dependencies = [ - "bitflags 2.8.0", + "bitflags 2.9.0", "bytemuck", "cosmic-text", "half", @@ -3333,7 +3333,7 @@ dependencies = [ [[package]] name = "iced_renderer" version = "0.14.0-dev" -source = "git+https://github.com/pop-os/libcosmic#cb682be3c887bcbf591309d350bac4d4710e104b" +source = "git+https://github.com/pop-os/libcosmic#f16bc4a7640a8895add431899b50eb4ec731b570" dependencies = [ "iced_graphics", "iced_tiny_skia", @@ -3345,7 +3345,7 @@ dependencies = [ [[package]] name = "iced_runtime" version = "0.14.0-dev" -source = "git+https://github.com/pop-os/libcosmic#cb682be3c887bcbf591309d350bac4d4710e104b" +source = "git+https://github.com/pop-os/libcosmic#f16bc4a7640a8895add431899b50eb4ec731b570" dependencies = [ "bytes", "cosmic-client-toolkit", @@ -3361,7 +3361,7 @@ dependencies = [ [[package]] name = "iced_tiny_skia" version = "0.14.0-dev" -source = "git+https://github.com/pop-os/libcosmic#cb682be3c887bcbf591309d350bac4d4710e104b" +source = "git+https://github.com/pop-os/libcosmic#f16bc4a7640a8895add431899b50eb4ec731b570" dependencies = [ "bytemuck", "cosmic-text", @@ -3377,10 +3377,10 @@ dependencies = [ [[package]] name = "iced_wgpu" version = "0.14.0-dev" -source = "git+https://github.com/pop-os/libcosmic#cb682be3c887bcbf591309d350bac4d4710e104b" +source = "git+https://github.com/pop-os/libcosmic#f16bc4a7640a8895add431899b50eb4ec731b570" dependencies = [ "as-raw-xcb-connection", - "bitflags 2.8.0", + "bitflags 2.9.0", "bytemuck", "cosmic-client-toolkit", "futures", @@ -3408,7 +3408,7 @@ dependencies = [ [[package]] name = "iced_widget" version = "0.14.0-dev" -source = "git+https://github.com/pop-os/libcosmic#cb682be3c887bcbf591309d350bac4d4710e104b" +source = "git+https://github.com/pop-os/libcosmic#f16bc4a7640a8895add431899b50eb4ec731b570" dependencies = [ "cosmic-client-toolkit", "dnd", @@ -3427,7 +3427,7 @@ dependencies = [ [[package]] name = "iced_winit" version = "0.14.0-dev" -source = "git+https://github.com/pop-os/libcosmic#cb682be3c887bcbf591309d350bac4d4710e104b" +source = "git+https://github.com/pop-os/libcosmic#f16bc4a7640a8895add431899b50eb4ec731b570" dependencies = [ "cosmic-client-toolkit", "dnd", @@ -3497,9 +3497,9 @@ dependencies = [ [[package]] name = "icu_calendar_data" -version = "1.5.0" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e009b7f0151ee6fb28c40b1283594397e0b7183820793e9ace3dcd13db126d0" +checksum = "820499e77e852162190608b4f444e7b4552619150eafc39a9e39333d9efae9e1" [[package]] name = "icu_casemap" @@ -3519,9 +3519,9 @@ dependencies = [ [[package]] name = "icu_casemap_data" -version = "1.5.0" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d57966d5ab748f74513be4046867f9a20e801e2775d41f91d04a0f560b61f08" +checksum = "02bd9f6276270c85a5cd54611adbbf94e993ec464a2a86a452a6c565b7ded5d9" [[package]] name = "icu_collator" @@ -3544,9 +3544,9 @@ dependencies = [ [[package]] name = "icu_collator_data" -version = "1.5.0" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ee3f88741364b7d6269cce6827a3e6a8a2cf408a78f766c9224ab479d5e4ae5" +checksum = "7b353986d77d28991eca4dea5ef2b8982f639342ae19ca81edc44f048bc38ebb" [[package]] name = "icu_collections" @@ -3586,9 +3586,9 @@ dependencies = [ [[package]] name = "icu_datetime_data" -version = "1.5.0" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ba7e7f7a01269b9afb0a39eff4f8676f693b55f509b3120e43a0350a9f88bea" +checksum = "bef5f04076123cab1b7a926a7083db27fe0d7a0e575adb984854aae3f3a6507d" [[package]] name = "icu_decimal" @@ -3606,9 +3606,9 @@ dependencies = [ [[package]] name = "icu_decimal_data" -version = "1.5.0" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d424c994071c6f5644f999925fc868c85fec82295326e75ad5017bc94b41523" +checksum = "67c95dd97f5ccf6d837a9c115496ec7d36646fa86ca18e7f1412115b4c820ae2" [[package]] name = "icu_experimental" @@ -3642,9 +3642,9 @@ dependencies = [ [[package]] name = "icu_experimental_data" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c178b9a34083fca5bd70d61f647575335e9c197d0f30c38e8ccd187babc69d0" +checksum = "121df92eafb8f5286d4e8ff401c1e7db8384377f806db3f8db77b91e5b7bd4dd" [[package]] name = "icu_list" @@ -3662,9 +3662,9 @@ dependencies = [ [[package]] name = "icu_list_data" -version = "1.5.0" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1825170d2c6679cb20dbd96a589d034e49f698aed9a2ef4fafc9a0101ed298f" +checksum = "52b1a7fbdbf3958f1be8354cb59ac73f165b7b7082d447ff2090355c9a069120" [[package]] name = "icu_locid" @@ -3695,9 +3695,9 @@ dependencies = [ [[package]] name = "icu_locid_transform_data" -version = "1.5.0" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdc8ff3388f852bede6b579ad4e978ab004f139284d7b28715f773507b946f6e" +checksum = "7515e6d781098bf9f7205ab3fc7e9709d34554ae0b21ddbcb5febfa4bc7df11d" [[package]] name = "icu_normalizer" @@ -3719,9 +3719,9 @@ dependencies = [ [[package]] name = "icu_normalizer_data" -version = "1.5.0" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8cafbf7aa791e9b22bec55a167906f9e1215fd475cd22adfcf660e03e989516" +checksum = "c5e8338228bdc8ab83303f16b797e177953730f601a96c25d10cb3ab0daa0cb7" [[package]] name = "icu_pattern" @@ -3752,9 +3752,9 @@ dependencies = [ [[package]] name = "icu_plurals_data" -version = "1.5.0" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e3e8f775b215d45838814a090a2227247a7431d74e9156407d9c37f6ef0f208" +checksum = "a483403238cb7d6a876a77a5f8191780336d80fe7b8b00bfdeb20be6abbfd112" [[package]] name = "icu_properties" @@ -3773,9 +3773,9 @@ dependencies = [ [[package]] name = "icu_properties_data" -version = "1.5.0" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569" +checksum = "85fb8799753b75aee8d2a21d7c14d9f38921b54b3dbda10f5a3c7a7b82dba5e2" [[package]] name = "icu_provider" @@ -3802,7 +3802,7 @@ checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.100", ] [[package]] @@ -3823,9 +3823,9 @@ dependencies = [ [[package]] name = "icu_segmenter_data" -version = "1.5.0" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f739ee737260d955e330bc83fdeaaf1631f7fb7ed218761d3c04bb13bb7d79df" +checksum = "a1e52775179941363cc594e49ce99284d13d6948928d8e72c755f55e98caa1eb" [[package]] name = "icu_timezone" @@ -3844,9 +3844,9 @@ dependencies = [ [[package]] name = "icu_timezone_data" -version = "1.5.0" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c588878c508a3e2ace333b3c50296053e6483c6a7541251b546cc59dcd6ced8e" +checksum = "1adcf7b613a268af025bc2a2532b4b9ee294e6051c5c0832d8bff20ac0232e68" [[package]] name = "ident_case" @@ -3877,9 +3877,9 @@ dependencies = [ [[package]] name = "image" -version = "0.25.5" +version = "0.25.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd6f44aed642f18953a158afeb30206f4d50da59fbc66ecb53c66488de73563b" +checksum = "db35664ce6b9810857a38a906215e75a9c879f0696556a39f59c62829710251a" dependencies = [ "bytemuck", "byteorder-lite", @@ -3948,9 +3948,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.7.1" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c9c992b02b5b4c94ea26e32fe5bccb7aa7d9f390ab5c1221ff895bc7ea8b652" +checksum = "3954d50fe15b02142bf25d3b8bdadb634ec3948f103d04ffe3031bc8fe9d7058" dependencies = [ "equivalent", "hashbrown 0.15.2", @@ -3992,7 +3992,7 @@ version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f37dccff2791ab604f9babef0ba14fbe0be30bd368dc541e2b08d07c8aa908f3" dependencies = [ - "bitflags 2.8.0", + "bitflags 2.9.0", "inotify-sys", "libc", ] @@ -4012,7 +4012,7 @@ version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fbdc09524a91f9cacd26f16734ff63d7dc650daffadd2b6f84d17a285bd875a9" dependencies = [ - "bitflags 2.8.0", + "bitflags 2.9.0", "input-sys", "libc", "log", @@ -4042,7 +4042,7 @@ checksum = "c34819042dc3d3971c46c2190835914dfbe0c3c13f61449b2997f4e9722dfa60" dependencies = [ "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.100", ] [[package]] @@ -4110,9 +4110,9 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.14" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674" +checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" [[package]] name = "jni" @@ -4182,9 +4182,9 @@ dependencies = [ [[package]] name = "jxl-color" -version = "0.10.0" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60c359391e571ef990c06e7af6131d305281402ca8d6d278660990544d89d263" +checksum = "09119032d7a4c6c761d5c32190d5327c443d991a2f244b09eb3818c18bb698f8" dependencies = [ "jxl-bitstream", "jxl-coding", @@ -4235,9 +4235,9 @@ dependencies = [ [[package]] name = "jxl-jbr" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a806dbd24f1dfb0cd620c08395010243c7098a0b5900ca2a8c9b896519ffded6" +checksum = "56cbdbec115aa2f0b22ca3719dec2902b4c75da904cda7a2cdfc21df21b44f24" dependencies = [ "brotli-decompressor", "jxl-bitstream", @@ -4267,9 +4267,9 @@ dependencies = [ [[package]] name = "jxl-oxide" -version = "0.11.2" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "063c51c4a90c90c3766180b9884aff0ca340cae0a591889c115472340be7cb6c" +checksum = "d89502ca4416ff03c95a3c8d14725a6a76a60f6b8add4bd32132a935d34bca34" dependencies = [ "brotli-decompressor", "jxl-bitstream", @@ -4295,9 +4295,9 @@ dependencies = [ [[package]] name = "jxl-render" -version = "0.11.1" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "875d942b09d468f78c7bc9e0ee005666b64e44cc74efd8f1b46858418da39fe4" +checksum = "0e657d102d2d6cf95042bcaa7d79361d8d055f83c12d594786968f370a9b3819" dependencies = [ "bytemuck", "jxl-bitstream", @@ -4446,14 +4446,14 @@ checksum = "03087c2bad5e1034e8cace5926dec053fb3790248370865f5117a7d0213354c8" [[package]] name = "libc" -version = "0.2.169" +version = "0.2.171" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a" +checksum = "c19937216e9d3aa9956d9bb8dfc0b0c8beb6058fc4f7a4dc4d850edf86a237d6" [[package]] name = "libcosmic" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic#cb682be3c887bcbf591309d350bac4d4710e104b" +source = "git+https://github.com/pop-os/libcosmic#f16bc4a7640a8895add431899b50eb4ec731b570" dependencies = [ "apply", "ashpd 0.9.2", @@ -4524,7 +4524,7 @@ version = "2.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "441092fb2d05962d74246a00c1b2f8c87c60fb6b38a5cc42227c229a702c0ce5" dependencies = [ - "bitflags 2.8.0", + "bitflags 2.9.0", "libc", "libpulse-sys", "num-derive", @@ -4551,9 +4551,9 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" dependencies = [ - "bitflags 2.8.0", + "bitflags 2.9.0", "libc", - "redox_syscall 0.5.8", + "redox_syscall 0.5.10", ] [[package]] @@ -4562,7 +4562,7 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "65f3a4b81b2a2d8c7f300643676202debd1b7c929dbf5c9bb89402ea11d19810" dependencies = [ - "bitflags 2.8.0", + "bitflags 2.9.0", "cc", "convert_case", "cookie-factory", @@ -4620,9 +4620,9 @@ checksum = "fe7db12097d22ec582439daf8618b8fdd1a7bef6270e9af3b1ebcd30893cf413" [[package]] name = "litemap" -version = "0.7.4" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ee93343901ab17bd981295f2cf0026d4ad018c7c31ba84549a4ddbb47a45104" +checksum = "23fb14cb19457329c82206317a5663005a4d404783dc74f4252769b0d5f42856" [[package]] name = "litrs" @@ -4674,9 +4674,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.25" +version = "0.4.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04cbf5b083de1c7e0222a7a51dbfdba1cbe1c6ab0b15e29fff3f6c077fd9cd9f" +checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94" [[package]] name = "loom" @@ -4739,9 +4739,9 @@ dependencies = [ [[package]] name = "lyon_path" -version = "1.0.6" +version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e0b8aec2f58586f6eef237985b9a9b7cb3a3aff4417c575075cf95bf925252e" +checksum = "0047f508cd7a85ad6bad9518f68cce7b1bf6b943fb71f6da0ee3bc1e8cb75f25" dependencies = [ "lyon_geom", "num-traits", @@ -4834,7 +4834,7 @@ version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ecfd3296f8c56b7c1f6fbac3c71cefa9d78ce009850c45000015f206dc7fa21" dependencies = [ - "bitflags 2.8.0", + "bitflags 2.9.0", "block", "core-graphics-types", "foreign-types", @@ -4863,7 +4863,7 @@ checksum = "bf45bf44ab49be92fd1227a3be6fc6f617f1a337c06af54981048574d8783147" dependencies = [ "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.100", ] [[package]] @@ -4897,9 +4897,9 @@ dependencies = [ [[package]] name = "miniz_oxide" -version = "0.8.4" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3b1c9bd4fe1f0f8b387f6eb9eb3b4a1aa26185e5750efb9140301703f62cd1b" +checksum = "8e3e04debbb59698c15bacbb6d93584a8c0ca9cc3213cb423d31f760d8843ce5" dependencies = [ "adler2", "simd-adler32", @@ -4943,11 +4943,11 @@ checksum = "8bd5a652b6faf21496f2cfd88fc49989c8db0825d1f6746b1a71a6ede24a63ad" dependencies = [ "arrayvec", "bit-set", - "bitflags 2.8.0", + "bitflags 2.9.0", "cfg_aliases 0.1.1", "codespan-reporting", "hexf-parse", - "indexmap 2.7.1", + "indexmap 2.8.0", "log", "rustc-hash 1.1.0", "spirv", @@ -4962,7 +4962,7 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3f42e7bbe13d351b6bead8286a43aac9534b82bd3cc43e47037f012ebfd62d4" dependencies = [ - "bitflags 2.8.0", + "bitflags 2.9.0", "jni-sys", "log", "ndk-sys 0.6.0+11769913", @@ -5019,7 +5019,7 @@ version = "0.27.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2eb04e9c688eff1c89d72b407f168cf79bb9e867a9d3323ed6c01519eb9cc053" dependencies = [ - "bitflags 2.8.0", + "bitflags 2.9.0", "cfg-if", "libc", ] @@ -5030,7 +5030,7 @@ version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "71e2746dc3a24dd78b3cfcb7be93368c6de9963d30f43a6a73998a9cf4b17b46" dependencies = [ - "bitflags 2.8.0", + "bitflags 2.9.0", "cfg-if", "cfg_aliases 0.2.1", "libc", @@ -5059,7 +5059,7 @@ version = "6.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6205bd8bb1e454ad2e27422015fb5e4f2bcc7e08fa8f27058670d208324a4d2d" dependencies = [ - "bitflags 2.8.0", + "bitflags 2.9.0", "crossbeam-channel", "filetime", "fsevent-sys", @@ -5078,7 +5078,7 @@ version = "8.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2fee8403b3d66ac7b26aee6e40a897d85dc5ce26f44da36b8b73e987cc52e943" dependencies = [ - "bitflags 2.8.0", + "bitflags 2.9.0", "filetime", "fsevent-sys", "inotify 0.11.0", @@ -5163,7 +5163,7 @@ checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" dependencies = [ "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.100", ] [[package]] @@ -5232,10 +5232,10 @@ version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56" dependencies = [ - "proc-macro-crate 3.2.0", + "proc-macro-crate 3.3.0", "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.100", ] [[package]] @@ -5280,7 +5280,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e4e89ad9e3d7d297152b17d39ed92cd50ca8063a89a9fa569046d41568891eff" dependencies = [ - "bitflags 2.8.0", + "bitflags 2.9.0", "block2", "libc", "objc2", @@ -5296,7 +5296,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "74dd3b56391c7a0596a295029734d3c1c5e7e510a4cb30245f8221ccea96b009" dependencies = [ - "bitflags 2.8.0", + "bitflags 2.9.0", "block2", "objc2", "objc2-core-location", @@ -5320,7 +5320,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "617fbf49e071c178c0b24c080767db52958f716d9eabdf0890523aeae54773ef" dependencies = [ - "bitflags 2.8.0", + "bitflags 2.9.0", "block2", "objc2", "objc2-foundation", @@ -5362,7 +5362,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ee638a5da3799329310ad4cfa62fbf045d5f56e3ef5ba4149e7452dcf89d5a8" dependencies = [ - "bitflags 2.8.0", + "bitflags 2.9.0", "block2", "dispatch", "libc", @@ -5387,7 +5387,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd0cba1276f6023976a406a14ffa85e1fdd19df6b0f737b063b95f6c8c7aadd6" dependencies = [ - "bitflags 2.8.0", + "bitflags 2.9.0", "block2", "objc2", "objc2-foundation", @@ -5399,7 +5399,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e42bee7bff906b14b167da2bac5efe6b6a07e6f7c0a21a7308d40c960242dc7a" dependencies = [ - "bitflags 2.8.0", + "bitflags 2.9.0", "block2", "objc2", "objc2-foundation", @@ -5422,7 +5422,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b8bb46798b20cd6b91cbd113524c490f1686f4c4e8f49502431415f3512e2b6f" dependencies = [ - "bitflags 2.8.0", + "bitflags 2.9.0", "block2", "objc2", "objc2-cloud-kit", @@ -5454,7 +5454,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "76cfcbf642358e8689af64cee815d139339f3ed8ad05103ed5eaf73db8d84cb3" dependencies = [ - "bitflags 2.8.0", + "bitflags 2.9.0", "block2", "objc2", "objc2-core-location", @@ -5481,9 +5481,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.21.1" +version = "1.21.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d75b0bedcc4fe52caa0e03d9f1151a323e4aa5e2d78ba3580400cd3c9e2bc4bc" +checksum = "c2806eaa3524762875e21c3dcd057bc4b7bfa01ce4da8d46be1cd43649e1cc6b" [[package]] name = "option-ext" @@ -5531,7 +5531,7 @@ dependencies = [ "proc-macro2", "proc-macro2-diagnostics", "quote", - "syn 2.0.98", + "syn 2.0.100", ] [[package]] @@ -5577,7 +5577,7 @@ dependencies = [ "by_address", "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.100", ] [[package]] @@ -5629,7 +5629,7 @@ checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.5.8", + "redox_syscall 0.5.10", "smallvec", "windows-targets 0.52.6", ] @@ -5676,7 +5676,7 @@ dependencies = [ "phf_shared", "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.100", ] [[package]] @@ -5696,22 +5696,22 @@ checksum = "5be167a7af36ee22fe3115051bc51f6e6c7054c9348e28deb4f49bd6f705a315" [[package]] name = "pin-project" -version = "1.1.9" +version = "1.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfe2e71e1471fe07709406bf725f710b02927c9c54b2b5b2ec0e8087d97c327d" +checksum = "677f1add503faace112b9f1373e43e9e054bfdd22ff1a63c1bc485eaec6a6a8a" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.9" +version = "1.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6e859e6e5bd50440ab63c47e3ebabc90f26251f7c73c3d3e837b74a1cc3fa67" +checksum = "6e918e4ff8c4549eb882f14b3a4bc8c8bc93de829416eacf579f1207a8fbf861" dependencies = [ "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.100", ] [[package]] @@ -5744,7 +5744,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08e645ba5c45109106d56610b3ee60eb13a6f2beb8b74f8dc8186cf261788dda" dependencies = [ "anyhow", - "bitflags 2.8.0", + "bitflags 2.9.0", "libc", "libspa", "libspa-sys", @@ -5767,9 +5767,9 @@ dependencies = [ [[package]] name = "pkg-config" -version = "0.3.31" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" +checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" [[package]] name = "png" @@ -5781,7 +5781,7 @@ dependencies = [ "crc32fast", "fdeflate", "flate2", - "miniz_oxide 0.8.4", + "miniz_oxide 0.8.5", ] [[package]] @@ -5829,11 +5829,11 @@ checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" [[package]] name = "ppv-lite86" -version = "0.2.20" +version = "0.2.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" +checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" dependencies = [ - "zerocopy", + "zerocopy 0.8.24", ] [[package]] @@ -5854,9 +5854,9 @@ dependencies = [ [[package]] name = "proc-macro-crate" -version = "3.2.0" +version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ecf48c7ca261d60b74ab1a7b20da18bede46776b2e55535cb958eb595c5fa7b" +checksum = "edce586971a4dfaa28950c6f18ed55e0406c1ab88bbce2c6f6293a7aaba73d35" dependencies = [ "toml_edit 0.22.24", ] @@ -5880,14 +5880,14 @@ dependencies = [ "proc-macro-error-attr2", "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.100", ] [[package]] name = "proc-macro2" -version = "1.0.93" +version = "1.0.94" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60946a68e5f9d28b0dc1c21bb8a97ee7d018a8b322fa57838ba31cc878e22d99" +checksum = "a31971752e70b8b2686d7e46ec17fb38dad4051d94024c88df49b667caea9c84" dependencies = [ "unicode-ident", ] @@ -5900,7 +5900,7 @@ checksum = "af066a9c399a26e020ada66a034357a868728e72cd426f3adcd35f80d88d88c8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.100", "version_check", "yansi", ] @@ -5911,7 +5911,7 @@ version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "731e0d9356b0c25f16f33b5be79b1c57b562f141ebfcdb0ad8ac2c13a24293b4" dependencies = [ - "bitflags 2.8.0", + "bitflags 2.9.0", "hex", "lazy_static", "procfs-core", @@ -5924,7 +5924,7 @@ version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2d3554923a69f4ce04c4a754260c338f505ce22642d3830e049a399fc2059a29" dependencies = [ - "bitflags 2.8.0", + "bitflags 2.9.0", "hex", ] @@ -5944,7 +5944,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a65f2e60fbf1063868558d69c6beacf412dc755f9fc020f514b7955fc914fe30" dependencies = [ "quote", - "syn 2.0.98", + "syn 2.0.100", ] [[package]] @@ -5984,22 +5984,28 @@ checksum = "a993555f31e5a609f617c12db6250dedcac1b0a85076912c436e6fc9b2c8e6a3" [[package]] name = "quick-xml" -version = "0.37.2" +version = "0.37.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "165859e9e55f79d67b96c5d96f4e88b6f2695a1972849c15a6a3f5c59fc2c003" +checksum = "bf763ab1c7a3aa408be466efc86efe35ed1bd3dd74173ed39d6b0d0a6f0ba148" dependencies = [ "memchr", ] [[package]] name = "quote" -version = "1.0.38" +version = "1.0.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e4dccaaaf89514f546c693ddc140f729f958c247918a13380cccc6078391acc" +checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" dependencies = [ "proc-macro2", ] +[[package]] +name = "r-efi" +version = "5.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74765f6d916ee2faa39bc8e68e4f3ed8949b48cccdac59983d287a7cb71ce9c5" + [[package]] name = "radium" version = "0.7.0" @@ -6154,11 +6160,11 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.5.8" +version = "0.5.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03a862b389f93e68874fbf580b9de08dd02facb9a788ebadaf4a3fd33cf58834" +checksum = "0b8c0c260b63a8219631167be35e6a988e9554dbd323f8bd08439c8ed1302bd1" dependencies = [ - "bitflags 2.8.0", + "bitflags 2.9.0", ] [[package]] @@ -6335,7 +6341,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b91f7eff05f748767f183df4320a63d6936e9c6107d97c9e6bdd9784f4289c94" dependencies = [ "base64 0.21.7", - "bitflags 2.8.0", + "bitflags 2.9.0", "serde", "serde_derive", ] @@ -6347,7 +6353,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "63f3aa105dea217ef30d89581b65a4d527a19afc95ef5750be3890e8d3c5b837" dependencies = [ "base64 0.22.1", - "bitflags 2.8.0", + "bitflags 2.9.0", "serde", "serde_derive", "unicode-ident", @@ -6361,9 +6367,9 @@ checksum = "6c20b6793b5c2fa6553b250154b78d6d0db37e72700ae35fad9387a46f487c97" [[package]] name = "rust-embed" -version = "8.5.0" +version = "8.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa66af4a4fdd5e7ebc276f115e895611a34739a9c1c01028383d612d550953c0" +checksum = "0b3aba5104622db5c9fc61098de54708feb732e7763d7faa2fa625899f00bf6f" dependencies = [ "rust-embed-impl", "rust-embed-utils", @@ -6372,22 +6378,22 @@ dependencies = [ [[package]] name = "rust-embed-impl" -version = "8.5.0" +version = "8.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6125dbc8867951125eec87294137f4e9c2c96566e61bf72c45095a7c77761478" +checksum = "1f198c73be048d2c5aa8e12f7960ad08443e56fd39cc26336719fdb4ea0ebaae" dependencies = [ "proc-macro2", "quote", "rust-embed-utils", - "syn 2.0.98", + "syn 2.0.100", "walkdir", ] [[package]] name = "rust-embed-utils" -version = "8.5.0" +version = "8.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e5347777e9aacb56039b0e1f28785929a8a3b709e87482e7442c72e7c12529d" +checksum = "5a2fcdc9f40c8dc2922842ca9add611ad19f332227fc651d015881ad1552bd9a" dependencies = [ "sha2", "walkdir", @@ -6395,9 +6401,9 @@ dependencies = [ [[package]] name = "rust_decimal" -version = "1.36.0" +version = "1.37.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b082d80e3e3cc52b2ed634388d436fe1f4de6af5786cc2de9ba9737527bdf555" +checksum = "faa7de2ba56ac291bd90c6b9bece784a52ae1411f9506544b3eae36dd2356d50" dependencies = [ "arrayvec", "borsh", @@ -6447,7 +6453,7 @@ version = "0.38.44" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" dependencies = [ - "bitflags 2.8.0", + "bitflags 2.9.0", "errno", "libc", "linux-raw-sys 0.4.15", @@ -6460,7 +6466,7 @@ version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e56a18552996ac8d29ecc3b190b4fdbb2d91ca4ec396de7bbffaf43f3d637e96" dependencies = [ - "bitflags 2.8.0", + "bitflags 2.9.0", "errno", "libc", "linux-raw-sys 0.9.3", @@ -6469,9 +6475,9 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.19" +version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7c45b9784283f1b2e7fb61b42047c2fd678ef0960d4f6f1eba131594cc369d4" +checksum = "eded382c5f5f786b989652c49544c4877d9f015cc22e145a5ea8ea66c2921cd2" [[package]] name = "rustybuzz" @@ -6479,7 +6485,7 @@ version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cfb9cf8877777222e4a3bc7eb247e398b56baba500c38c1c46842431adc8b55c" dependencies = [ - "bitflags 2.8.0", + "bitflags 2.9.0", "bytemuck", "libm", "smallvec", @@ -6492,9 +6498,9 @@ dependencies = [ [[package]] name = "ryu" -version = "1.0.19" +version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ea1a2d0a644769cc99faa24c3ad26b379b786fe7c36fd3c546254801650e6dd" +checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" [[package]] name = "same-file" @@ -6590,7 +6596,7 @@ checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" dependencies = [ "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.100", ] [[package]] @@ -6599,7 +6605,7 @@ version = "1.0.140" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373" dependencies = [ - "indexmap 2.7.1", + "indexmap 2.8.0", "itoa", "memchr", "ryu", @@ -6608,13 +6614,13 @@ dependencies = [ [[package]] name = "serde_repr" -version = "0.1.19" +version = "0.1.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9" +checksum = "175ee3e80ae9982737ca543e96133087cbd9a485eecc3bc4de9c1a37b47ea59c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.100", ] [[package]] @@ -6636,7 +6642,7 @@ dependencies = [ "chrono", "hex", "indexmap 1.9.3", - "indexmap 2.7.1", + "indexmap 2.8.0", "serde", "serde_derive", "serde_json", @@ -6653,7 +6659,7 @@ dependencies = [ "darling 0.20.10", "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.100", ] [[package]] @@ -6740,9 +6746,9 @@ checksum = "56199f7ddabf13fe5074ce809e7d3f42b42ae711800501b5b16ea82ad029c39d" [[package]] name = "skrifa" -version = "0.26.5" +version = "0.26.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e92bf3f3af711d696eff796a4f28136927d40eb8108002b6f7919dc0cee27a5d" +checksum = "8cc1aa86c26dbb1b63875a7180aa0819709b33348eb5b1491e4321fae388179d" dependencies = [ "bytemuck", "read-fonts", @@ -6778,7 +6784,7 @@ version = "0.19.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3457dea1f0eb631b4034d61d4d8c32074caa6cd1ab2d59f2327bd8461e2c0016" dependencies = [ - "bitflags 2.8.0", + "bitflags 2.9.0", "bytemuck", "calloop", "calloop-wayland-source", @@ -6876,7 +6882,7 @@ version = "0.3.0+sdk-1.3.268.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eda41003dc44290527a59b13432d4a0379379fa074b70174882adfbdfd917844" dependencies = [ - "bitflags 2.8.0", + "bitflags 2.9.0", ] [[package]] @@ -6942,9 +6948,9 @@ checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] name = "sunrise" -version = "1.0.1" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3217c5830416956b1f2dc731f526150a82c144ebe83d2f0e78853c8356a22ada" +checksum = "08871f1db1390f915b7bb2ab2f1ac7370e8c78667857a15ae5cfea25da3262f2" dependencies = [ "chrono", ] @@ -6967,9 +6973,9 @@ dependencies = [ [[package]] name = "swash" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0e25b48fd1c222c9fdb61148e2203b750f9840c07922fd61b87c6015560b8f6" +checksum = "13d5bbc2aa266907ed8ee977c9c9e16363cc2b001266104e13397b57f1d15f71" dependencies = [ "skrifa", "yazi", @@ -6989,9 +6995,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.98" +version = "2.0.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36147f1a48ae0ec2b5b3bc5b537d267457555a10dc06f3dbc8cb11ba3006d3b1" +checksum = "b09a44accad81e1ba1cd74a32461ba89dee89095ba17b32f5d03683b1b1fc2a0" dependencies = [ "proc-macro2", "quote", @@ -7006,7 +7012,7 @@ checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" dependencies = [ "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.100", ] [[package]] @@ -7089,15 +7095,14 @@ checksum = "bc1ee6eef34f12f765cb94725905c6312b6610ab2b0940889cfe58dae7bc3c72" [[package]] name = "tempfile" -version = "3.17.1" +version = "3.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22e5a0acb1f3f55f65cc4a866c361b2fb2a0ff6366785ae6fbb5f85df07ba230" +checksum = "7437ac7763b9b123ccf33c338a5cc1bac6f69b45a136c19bdd8a65e3916435bf" dependencies = [ - "cfg-if", "fastrand 2.3.0", - "getrandom 0.3.1", + "getrandom 0.3.2", "once_cell", - "rustix 0.38.44", + "rustix 1.0.3", "windows-sys 0.59.0", ] @@ -7136,7 +7141,7 @@ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.100", ] [[package]] @@ -7147,7 +7152,7 @@ checksum = "7f7cf42b4507d8ea322120659672cf1b9dbb93f8f2d4ecfd6e51350ff5b17a1d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.100", ] [[package]] @@ -7173,9 +7178,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.37" +version = "0.3.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35e7868883861bd0e56d9ac6efcaaca0d6d5d82a2a7ec8209ff492c07cf37b21" +checksum = "8a7619e19bc266e0f9c5e6686659d394bc57973859340060a69221e57dbc0c40" dependencies = [ "deranged", "itoa", @@ -7188,15 +7193,15 @@ dependencies = [ [[package]] name = "time-core" -version = "0.1.2" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" +checksum = "c9e9a38711f559d9e3ce1cdb06dd7c5b8ea546bc90052da6d06bb76da74bb07c" [[package]] name = "time-macros" -version = "0.2.19" +version = "0.2.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2834e6017e3e5e4b9834939793b282bc03b37a3336245fa820e35e233e2a85de" +checksum = "3526739392ec93fd8b359c8e98514cb3e8e021beb4e5f597b00a0221f8ed8a49" dependencies = [ "num-conv", "time-core", @@ -7261,9 +7266,9 @@ dependencies = [ [[package]] name = "tinyvec" -version = "1.8.1" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "022db8904dfa342efe721985167e9fcd16c29b226db4397ed752a761cfce81e8" +checksum = "09b3661f17e86524eccd4371ab0429194e0d7c008abb45f7a7495b1719463c71" dependencies = [ "tinyvec_macros", ] @@ -7300,7 +7305,7 @@ checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.100", ] [[package]] @@ -7350,7 +7355,7 @@ version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap 2.7.1", + "indexmap 2.8.0", "toml_datetime", "winnow 0.5.40", ] @@ -7361,11 +7366,11 @@ version = "0.22.24" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "17b4795ff5edd201c7cd6dca065ae59972ce77d1b80fa0a84d94950ece7d1474" dependencies = [ - "indexmap 2.7.1", + "indexmap 2.8.0", "serde", "serde_spanned", "toml_datetime", - "winnow 0.7.3", + "winnow 0.7.4", ] [[package]] @@ -7387,7 +7392,7 @@ checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.100", ] [[package]] @@ -7534,9 +7539,9 @@ checksum = "1df77b101bcc4ea3d78dafc5ad7e4f58ceffe0b2b16bf446aeb50b6cb4157656" [[package]] name = "unicode-ident" -version = "1.0.17" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00e2473a93778eb0bad35909dff6a10d28e63f792f16ed15e404fca9d5eeedbe" +checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512" [[package]] name = "unicode-linebreak" @@ -7661,9 +7666,9 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "uuid" -version = "1.13.2" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c1f41ffb7cf259f1ecc2876861a17e7142e63ead296f671f81f6ae85903e0d6" +checksum = "458f7a779bf54acc9f347480ac654f68407d3aab21269a6e3c9f922acd9e2da9" [[package]] name = "v_frame" @@ -7718,9 +7723,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasi" -version = "0.13.3+wasi-0.2.2" +version = "0.14.2+wasi-0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26816d2e1a4a36a2940b96c5296ce403917633dff8f3440e9b236ed6f6bacad2" +checksum = "9683f9a5a998d873c0d21fcbe3c083009670149a8fab228644b8bd36b2c48cb3" dependencies = [ "wit-bindgen-rt", ] @@ -7747,7 +7752,7 @@ dependencies = [ "log", "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.100", "wasm-bindgen-shared", ] @@ -7782,7 +7787,7 @@ checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" dependencies = [ "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.100", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -7831,7 +7836,7 @@ version = "0.31.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2120de3d33638aaef5b9f4472bff75f07c56379cf76ea320bd3a3d65ecaf73f" dependencies = [ - "bitflags 2.8.0", + "bitflags 2.9.0", "rustix 0.38.44", "wayland-backend", "wayland-scanner", @@ -7843,7 +7848,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "625c5029dbd43d25e6aa9615e88b829a5cad13b2819c4ae129fdbb7c31ab4c7e" dependencies = [ - "bitflags 2.8.0", + "bitflags 2.9.0", "cursor-icon", "wayland-backend", ] @@ -7865,7 +7870,7 @@ version = "0.32.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0781cf46869b37e36928f7b432273c0995aa8aed9552c556fb18754420541efc" dependencies = [ - "bitflags 2.8.0", + "bitflags 2.9.0", "wayland-backend", "wayland-client", "wayland-scanner", @@ -7878,7 +7883,7 @@ version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ccaacc76703fefd6763022ac565b590fcade92202492381c95b2edfdf7d46b3" dependencies = [ - "bitflags 2.8.0", + "bitflags 2.9.0", "wayland-backend", "wayland-client", "wayland-protocols", @@ -7891,7 +7896,7 @@ version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "248a02e6f595aad796561fa82d25601bd2c8c3b145b1c7453fc8f94c1a58f8b2" dependencies = [ - "bitflags 2.8.0", + "bitflags 2.9.0", "wayland-backend", "wayland-client", "wayland-protocols", @@ -7916,7 +7921,7 @@ version = "0.31.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "97fabd7ed68cff8e7657b8a8a1fbe90cb4a3f0c30d90da4bf179a7a23008a4cb" dependencies = [ - "bitflags 2.8.0", + "bitflags 2.9.0", "downcast-rs", "rustix 0.38.44", "wayland-backend", @@ -7994,10 +7999,10 @@ checksum = "0348c840d1051b8e86c3bcd31206080c5e71e5933dabd79be1ce732b0b2f089a" dependencies = [ "arrayvec", "bit-vec", - "bitflags 2.8.0", + "bitflags 2.9.0", "cfg_aliases 0.1.1", "document-features", - "indexmap 2.7.1", + "indexmap 2.8.0", "log", "naga", "once_cell", @@ -8021,7 +8026,7 @@ dependencies = [ "arrayvec", "ash", "bit-set", - "bitflags 2.8.0", + "bitflags 2.9.0", "block", "cfg_aliases 0.1.1", "core-graphics-types", @@ -8062,16 +8067,16 @@ version = "22.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bc9d91f0e2c4b51434dfa6db77846f2793149d8e73f800fa2e41f52b8eac3c5d" dependencies = [ - "bitflags 2.8.0", + "bitflags 2.9.0", "js-sys", "web-sys", ] [[package]] name = "widestring" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7219d36b6eac893fa81e84ebe06485e7dcbb616177469b142df14f1f4deb1311" +checksum = "dd7cf3379ca1aac9eea11fba24fd7e315d621f8dfe35c8d7d2be8b793726e07d" [[package]] name = "winapi" @@ -8199,7 +8204,7 @@ checksum = "942ac266be9249c84ca862f0a164a39533dc2f6f33dc98ec89c8da99b82ea0bd" dependencies = [ "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.100", ] [[package]] @@ -8210,7 +8215,7 @@ checksum = "9107ddc059d5b6fbfbffdfa7a7fe3e22a226def0b2608f72e9d552763d3e1ad7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.100", ] [[package]] @@ -8221,7 +8226,7 @@ checksum = "da33557140a288fae4e1d5f8873aaf9eb6613a9cf82c3e070223ff177f598b60" dependencies = [ "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.100", ] [[package]] @@ -8232,7 +8237,7 @@ checksum = "29bee4b38ea3cde66011baa44dba677c432a78593e202392d1e9070cf2a7fca7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.100", ] [[package]] @@ -8472,7 +8477,7 @@ dependencies = [ "ahash 0.8.11", "android-activity", "atomic-waker", - "bitflags 2.8.0", + "bitflags 2.9.0", "block2", "bytemuck", "calloop", @@ -8535,20 +8540,20 @@ dependencies = [ [[package]] name = "winnow" -version = "0.7.3" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e7f4ea97f6f78012141bcdb6a216b2609f0979ada50b20ca5b52dde2eac2bb1" +checksum = "0e97b544156e9bebe1a0ffbc03484fc1ffe3100cbce3ffb17eac35f7cdd7ab36" dependencies = [ "memchr", ] [[package]] name = "wit-bindgen-rt" -version = "0.33.0" +version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3268f3d866458b787f390cf61f4bbb563b922d091359f9608842999eaee3943c" +checksum = "6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1" dependencies = [ - "bitflags 2.8.0", + "bitflags 2.9.0", ] [[package]] @@ -8632,7 +8637,7 @@ dependencies = [ [[package]] name = "xdg-shell-wrapper-config" version = "0.1.0" -source = "git+https://github.com/pop-os/cosmic-panel#dc429bc571393624a72ce91c6dd864849c3812ae" +source = "git+https://github.com/pop-os/cosmic-panel#bf028e2bbc803f5523617c7f6d947d3dabf9582e" dependencies = [ "serde", "wayland-protocols-wlr", @@ -8665,7 +8670,7 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d039de8032a9a8856a6be89cea3e5d12fdd82306ab7c94d74e6deab2460651c5" dependencies = [ - "bitflags 2.8.0", + "bitflags 2.9.0", "dlib", "log", "once_cell", @@ -8734,7 +8739,7 @@ checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" dependencies = [ "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.100", "synstructure", ] @@ -8833,10 +8838,10 @@ version = "4.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "267db9407081e90bbfa46d841d3cbc60f59c0351838c4bc65199ecd79ab1983e" dependencies = [ - "proc-macro-crate 3.2.0", + "proc-macro-crate 3.3.0", "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.100", "zvariant_utils 2.1.0", ] @@ -8887,8 +8892,16 @@ version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" dependencies = [ - "byteorder", - "zerocopy-derive", + "zerocopy-derive 0.7.35", +] + +[[package]] +name = "zerocopy" +version = "0.8.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2586fea28e186957ef732a5f8b3be2da217d65c5969d4b1e17f973ebbe876879" +dependencies = [ + "zerocopy-derive 0.8.24", ] [[package]] @@ -8899,27 +8912,38 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.100", +] + +[[package]] +name = "zerocopy-derive" +version = "0.8.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a996a8f63c5c4448cd959ac1bab0aaa3306ccfd060472f85943ee0750f0169be" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.100", ] [[package]] name = "zerofrom" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cff3ee08c995dee1859d998dea82f7374f2826091dd9cd47def953cae446cd2e" +checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5" dependencies = [ "zerofrom-derive", ] [[package]] name = "zerofrom-derive" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "595eed982f7d355beb85837f651fa22e90b3c044842dc7f2c2842c086f295808" +checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" dependencies = [ "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.100", "synstructure", ] @@ -8959,7 +8983,7 @@ checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.100", ] [[package]] @@ -9033,10 +9057,10 @@ version = "4.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "73e2ba546bda683a90652bac4a279bc146adad1386f25379cf73200d2002c449" dependencies = [ - "proc-macro-crate 3.2.0", + "proc-macro-crate 3.3.0", "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.100", "zvariant_utils 2.1.0", ] @@ -9059,5 +9083,5 @@ checksum = "c51bcff7cc3dbb5055396bcf774748c3dab426b4b8659046963523cee4808340" dependencies = [ "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.100", ] diff --git a/cosmic-settings/Cargo.toml b/cosmic-settings/Cargo.toml index 4d3fdc7..ec6d995 100644 --- a/cosmic-settings/Cargo.toml +++ b/cosmic-settings/Cargo.toml @@ -12,8 +12,8 @@ ashpd = { version = "0.9", default-features = false, features = [ "tokio", ], optional = true } async-channel = "2.3.1" -chrono = "0.4.39" -clap = { version = "4.5.29", features = ["derive"] } +chrono = "0.4.40" +clap = { version = "4.5.32", features = ["derive"] } color-eyre = "0.6.3" cosmic-bg-config.workspace = true cosmic-comp-config = { workspace = true, optional = true } @@ -34,7 +34,7 @@ derive_setters = "0.1.6" dirs = "5.0.1" downcast-rs = "1.2.1" eyre = "0.6.12" -freedesktop-desktop-entry = "0.7.8" +freedesktop-desktop-entry = "0.7.9" futures = "0.3.31" hostname-validator = "1.1.1" hostname1-zbus = { git = "https://github.com/pop-os/dbus-settings-bindings", optional = true } @@ -46,24 +46,24 @@ image = { version = "0.25", default-features = false, features = [ "webp", "hdr", ] } -indexmap = "2.7.1" +indexmap = "2.8.0" itertools = "0.13.0" -itoa = "1.0.14" +itoa = "1.0.15" libcosmic.workspace = true locale1 = { git = "https://github.com/pop-os/dbus-settings-bindings", optional = true } mime-apps = { package = "cosmic-mime-apps", git = "https://github.com/pop-os/cosmic-mime-apps", optional = true } notify = "6.1.1" -once_cell = "1.20.3" +once_cell = "1.21.1" regex = "1.11.1" -ron = "0.8" -rust-embed = "8.5.0" +ron = "0.9.0" +rust-embed = "8.6.0" sctk = { workspace = true, optional = true } secure-string = "0.3.0" -serde = { version = "1.0.217", features = ["derive"] } +serde = { version = "1.0.219", features = ["derive"] } slab = "0.4.9" slotmap = "1.0.7" static_init = "1.0.3" -sunrise = "1.0.1" +sunrise = "1.2.1" tachyonix = "0.3.1" timedate-zbus = { git = "https://github.com/pop-os/dbus-settings-bindings", optional = true } tokio = { workspace = true, features = ["fs", "io-util", "sync"] } @@ -78,10 +78,10 @@ zbus = { version = "4.4.0", default-features = false, features = [ "tokio", ], optional = true } zbus_polkit = { version = "4.0.0", optional = true } -fontdb = "0.16.2" +fontdb = "=0.16.2" fixed_decimal = "0.5.6" mime = "0.3.17" -rustix = "0.38.44" +rustix = { version = "1.0.3", features = ["process"] } gettext-rs = { version = "0.7.2", features = [ "gettext-system", ], optional = true } diff --git a/cosmic-settings/src/app.rs b/cosmic-settings/src/app.rs index 66686d5..3596c8b 100644 --- a/cosmic-settings/src/app.rs +++ b/cosmic-settings/src/app.rs @@ -754,10 +754,7 @@ impl cosmic::Application for SettingsApp { self.context_title = Some(title.to_string()); } - Message::CloseContextDrawer => { - self.core.window.show_context = false; - self.active_context_page = None; - } + Message::CloseContextDrawer => return self.close_context_drawer(), Message::Error(error) => { tracing::error!(error, "error occurred"); @@ -869,7 +866,9 @@ impl SettingsApp { if current_page != page { self.loaded_pages.remove(¤t_page); - close_context_drawer_task = cosmic::task::message(Message::CloseContextDrawer); + + close_context_drawer_task = self.close_context_drawer(); + leave_task = self .pages .on_leave(current_page) @@ -920,6 +919,16 @@ impl SettingsApp { } } + fn close_context_drawer(&mut self) -> Task { + self.core.window.show_context = false; + self.active_context_page = None; + self.pages + .on_context_drawer_close(self.active_page) + .unwrap_or(iced::Task::none()) + .map(Message::PageMessage) + .map(Into::into) + } + /// Adds a main page to the settings application. fn insert_page>( &mut self, diff --git a/cosmic-settings/src/localize.rs b/cosmic-settings/src/localize.rs index 316fe35..dbc37cb 100644 --- a/cosmic-settings/src/localize.rs +++ b/cosmic-settings/src/localize.rs @@ -39,6 +39,7 @@ macro_rules! fl { // Get the `Localizer` to be used for localizing this library. #[must_use] +#[inline(always)] pub fn localizer() -> Box { Box::from(DefaultLocalizer::new(&*LANGUAGE_LOADER, &Localizations)) } diff --git a/cosmic-settings/src/pages/input/keyboard/shortcuts/common.rs b/cosmic-settings/src/pages/input/keyboard/shortcuts/common.rs index ff0c850..455efc3 100644 --- a/cosmic-settings/src/pages/input/keyboard/shortcuts/common.rs +++ b/cosmic-settings/src/pages/input/keyboard/shortcuts/common.rs @@ -3,7 +3,7 @@ use cosmic::iced::{Alignment, Length}; use cosmic::widget::{self, button, icon, settings, text}; -use cosmic::{theme, Apply, Element, Task}; +use cosmic::{Apply, Element, Task, theme}; use cosmic_config::{ConfigGet, ConfigSet}; use cosmic_settings_config::shortcuts::{self, Action, Binding, Shortcuts}; use cosmic_settings_page as page; @@ -15,7 +15,7 @@ use std::str::FromStr; #[derive(Clone, Debug)] pub enum ShortcutMessage { - AddKeybinding, + AddAnotherKeybinding, ApplyReplace, CancelReplace, DeleteBinding(usize), @@ -32,8 +32,18 @@ pub struct ShortcutBinding { pub id: widget::Id, pub binding: Binding, pub input: String, - pub editing: bool, pub is_default: bool, + pub is_saved: bool, +} + +impl ShortcutBinding { + pub fn reset(&mut self) { + self.input = if self.is_saved { + self.binding.to_string() + } else { + String::new() + }; + } } #[must_use] @@ -57,8 +67,8 @@ impl ShortcutModel { id: widget::Id::unique(), binding: binding.clone(), input: String::new(), - editing: false, is_default, + is_saved: true, }); (slab, if is_default { modified } else { modified + 1 }) @@ -94,10 +104,13 @@ impl ShortcutModel { #[must_use] pub struct Model { pub entity: page::Entity, + pub add_keybindings_button_id: cosmic::widget::Id, pub defaults: Shortcuts, + pub editing: Option, pub replace_dialog: Option<(usize, Binding, Action, String)>, pub shortcut_models: Slab, pub shortcut_context: Option, + pub shortcut_title: String, pub config: cosmic_config::Config, pub custom: bool, pub actions: fn(&Shortcuts, &Shortcuts) -> Slab, @@ -107,10 +120,13 @@ impl Default for Model { fn default() -> Self { Self { entity: page::Entity::null(), + add_keybindings_button_id: widget::Id::unique(), defaults: Shortcuts::default(), + editing: None, replace_dialog: None, shortcut_models: Slab::new(), shortcut_context: None, + shortcut_title: String::new(), config: shortcuts::context().unwrap(), custom: false, actions: |_, _| Slab::new(), @@ -153,9 +169,16 @@ impl Model { } pub(super) fn context_drawer(&self) -> Option> { - self.shortcut_context - .as_ref() - .map(|id| context_drawer(&self.shortcut_models, *id, self.custom)) + self.shortcut_context.as_ref().map(|id| { + context_drawer( + &self.shortcut_title, + &self.shortcut_models, + self.editing, + self.add_keybindings_button_id.clone(), + *id, + self.custom, + ) + }) } pub(super) fn dialog(&self) -> Option> { @@ -207,6 +230,25 @@ impl Model { } self.shortcut_models = (self.actions)(&self.defaults, &shortcuts); + self.shortcut_context = None; + self.editing = None; + } + + pub(super) fn on_context_drawer_close(&mut self) { + if let Some(short_id) = self.shortcut_context.take() { + if let Some(model) = self.shortcut_models.get_mut(short_id) { + if let Some(remove_id) = model + .bindings + .iter() + .find(|(_, binding)| !binding.is_saved) + .map(|(id, _)| id) + { + model.bindings.remove(remove_id); + } + } + } + + self.editing = None; } pub(super) fn on_clear(&mut self) { @@ -249,17 +291,18 @@ impl Model { #[allow(clippy::too_many_lines)] pub(super) fn update(&mut self, message: ShortcutMessage) -> Task { match message { - ShortcutMessage::AddKeybinding => { + ShortcutMessage::AddAnotherKeybinding => { if let Some(short_id) = self.shortcut_context { if let Some(model) = self.shortcut_models.get_mut(short_id) { // If an empty entry exists, focus it instead of creating a new input. - for (_, shortcut) in &mut model.bindings { + for (binding_id, shortcut) in &mut model.bindings { if shortcut.binding.is_set() || Binding::from_str(&shortcut.input).is_ok() { continue; } + self.editing = Some(binding_id); shortcut.input.clear(); return widget::text_input::focus(shortcut.id.clone()); @@ -267,13 +310,13 @@ impl Model { // Create a new input and focus it. let id = widget::Id::unique(); - model.bindings.insert(ShortcutBinding { + self.editing = Some(model.bindings.insert(ShortcutBinding { id: id.clone(), binding: Binding::default(), input: String::new(), - editing: true, is_default: false, - }); + is_saved: false, + })); return widget::text_input::focus(id); } @@ -306,7 +349,10 @@ impl Model { shortcut.binding = new_binding.clone(); shortcut.input.clear(); - shortcut.editing = false; + + if self.editing == Some(id) { + self.editing = None; + } let action = model.action.clone(); self.config_remove(&prev_binding); @@ -319,7 +365,18 @@ impl Model { } } - ShortcutMessage::CancelReplace => self.replace_dialog = None, + ShortcutMessage::CancelReplace => { + if let Some(((id, _, _, _), short_id)) = + self.replace_dialog.take().zip(self.shortcut_context) + { + if let Some(model) = self.shortcut_models.get_mut(short_id) { + if let Some(binding) = model.bindings.get_mut(id) { + binding.reset(); + return cosmic::widget::text_input::focus(binding.id.clone()); + } + } + } + } ShortcutMessage::DeleteBinding(id) => { if let Some(short_id) = self.shortcut_context { @@ -328,14 +385,8 @@ impl Model { if shortcut.is_default { self.config_add(Action::Disable, shortcut.binding.clone()); } else { - // if last keybind deleted, clear shortcut context - if model.bindings.is_empty() { - self.shortcut_context = None; - } self.config_remove(&shortcut.binding); } - - self.on_enter(); } } } @@ -344,7 +395,6 @@ impl Model { let model = self.shortcut_models.remove(id); for (_, shortcut) in model.bindings { self.config_remove(&shortcut.binding); - self.on_enter(); } } @@ -352,10 +402,12 @@ impl Model { if let Some(short_id) = self.shortcut_context { if let Some(model) = self.shortcut_models.get_mut(short_id) { if let Some(shortcut) = model.bindings.get_mut(id) { - shortcut.editing = enable; if enable { + self.editing = Some(id); shortcut.input = shortcut.binding.to_string(); return widget::text_input::select_all(shortcut.id.clone()); + } else if self.editing == Some(id) { + self.editing = None; } } } @@ -395,14 +447,16 @@ impl Model { ShortcutMessage::ShowShortcut(id, description) => { self.shortcut_context = Some(id); + self.shortcut_title = description; self.replace_dialog = None; let mut tasks = vec![cosmic::task::message( - crate::app::Message::OpenContextDrawer(self.entity, description.into()), + crate::app::Message::OpenContextDrawer(self.entity, "".into()), )]; if let Some(model) = self.shortcut_models.get(0) { if let Some(shortcut) = model.bindings.get(0) { + self.editing = Some(0); tasks.push(widget::text_input::focus(shortcut.id.clone())); tasks.push(widget::text_input::select_all(shortcut.id.clone())); } @@ -411,59 +465,7 @@ impl Model { return Task::batch(tasks); } - ShortcutMessage::SubmitBinding(id) => { - if let Some(short_id) = self.shortcut_context { - let mut apply_binding = None; - - // Check for conflicts with the new binding. - if let Some(model) = self.shortcut_models.get_mut(short_id) { - if let Some(shortcut) = model.bindings.get_mut(id) { - match Binding::from_str(&shortcut.input) { - Ok(new_binding) => { - if !new_binding.is_set() { - shortcut.input.clear(); - return Task::none(); - } - if let Some(action) = self.config_contains(&new_binding) { - let action_str = if let Action::Spawn(_) = &action { - super::localize_custom_action(&action, &new_binding) - } else { - super::localize_action(&action) - }; - self.replace_dialog = - Some((id, new_binding, action, action_str)); - return Task::none(); - } - - apply_binding = Some(new_binding); - } - - Err(why) => { - tracing::error!(why, "keybinding input invalid"); - } - } - } - } - - // Apply if no conflict was found. - if let Some(new_binding) = apply_binding { - if let Some(model) = self.shortcut_models.get_mut(short_id) { - if let Some(shortcut) = model.bindings.get_mut(id) { - let prev_binding = shortcut.binding.clone(); - - shortcut.binding = new_binding.clone(); - shortcut.input.clear(); - shortcut.editing = false; - - let action = model.action.clone(); - self.config_remove(&prev_binding); - self.config_add(action, new_binding); - self.on_enter(); - } - } - } - } - } + ShortcutMessage::SubmitBinding(id) => return self.submit_binding(id), } Task::none() @@ -476,13 +478,87 @@ impl Model { .fold(widget::list_column(), widget::ListColumn::add) .into() } + + fn submit_binding(&mut self, id: usize) -> Task { + if let Some(short_id) = self.shortcut_context { + let mut apply_binding = None; + + // Check for conflicts with the new binding. + if let Some(model) = self.shortcut_models.get_mut(short_id) { + if let Some(shortcut) = model.bindings.get_mut(id) { + if shortcut.input.is_empty() { + return Task::none(); + } + + match Binding::from_str(&shortcut.input) { + Ok(new_binding) => { + if shortcut.binding == new_binding { + return Task::none(); + } + + if !new_binding.is_set() { + shortcut.input.clear(); + return Task::none(); + } + + if let Some(action) = self.config_contains(&new_binding) { + let action_str = if let Action::Spawn(_) = &action { + super::localize_custom_action(&action, &new_binding) + } else { + super::localize_action(&action) + }; + self.replace_dialog = Some((id, new_binding, action, action_str)); + return Task::none(); + } + + apply_binding = Some(new_binding); + } + + Err(why) => { + tracing::error!(why, "keybinding input invalid"); + shortcut.reset(); + } + } + } + } + + // Apply if no conflict was found. + if let Some(new_binding) = apply_binding { + if let Some(model) = self.shortcut_models.get_mut(short_id) { + if let Some(shortcut) = model.bindings.get_mut(id) { + let prev_binding = shortcut.binding.clone(); + + shortcut.binding = new_binding.clone(); + shortcut.is_saved = true; + shortcut.input.clear(); + + if self.editing == Some(id) { + self.editing = None; + } + + let action = model.action.clone(); + self.config_remove(&prev_binding); + self.config_add(action, new_binding); + return cosmic::widget::text_input::focus( + self.add_keybindings_button_id.clone(), + ); + } + } + } + } + + Task::none() + } } -fn context_drawer( - shortcuts: &Slab, +fn context_drawer<'a>( + title: &'a str, + shortcuts: &'a Slab, + editing: Option, + add_keybindings_id: widget::Id, id: usize, show_action: bool, -) -> Element { +) -> Element<'a, ShortcutMessage> { let cosmic::cosmic_theme::Spacing { space_xxs, space_xs, @@ -505,35 +581,39 @@ fn context_drawer( let bindings = model.bindings.iter().enumerate().fold( widget::list_column().spacing(space_xxs), |section, (_, (bind_id, shortcut))| { - let text: Cow<'_, str> = if !shortcut.editing && shortcut.binding.is_set() { + let editing = editing == Some(bind_id); + let text: Cow<'_, str> = if !editing && shortcut.binding.is_set() { Cow::Owned(shortcut.binding.to_string()) } else { Cow::Borrowed(&shortcut.input) }; - let input = widget::editable_input("", text, shortcut.editing, move |enable| { + let input = widget::editable_input("", text, editing, move |enable| { ShortcutMessage::EditBinding(bind_id, enable) }) .select_on_focus(true) .on_input(move |text| ShortcutMessage::InputBinding(bind_id, text)) + .on_unfocus(ShortcutMessage::SubmitBinding(bind_id)) .on_submit(move |_| ShortcutMessage::SubmitBinding(bind_id)) .padding([0, space_xs]) .id(shortcut.id.clone()) .into(); - let delete_button = widget::button::icon(icon::from_name("edit-delete-symbolic")) - .on_press(ShortcutMessage::DeleteBinding(bind_id)) - .into(); + let mut children = Vec::with_capacity(2); + children.push(input); - let flex_control = - settings::item_row(vec![input, delete_button]).align_y(Alignment::Center); + if shortcut.is_saved { + let delete_button = widget::button::icon(icon::from_name("edit-delete-symbolic")) + .on_press(ShortcutMessage::DeleteBinding(bind_id)) + .into(); + children.push(delete_button); + } - section.add(flex_control) + section.add(settings::item_row(children).align_y(Alignment::Center)) }, ); - // TODO: Detect when it is necessary - let reset_keybinding_button = if show_action { + let reset_keybinding_button = if model.modified == 0 || show_action { None } else { let button = widget::button::standard(fl!("reset-to-default")) @@ -541,8 +621,13 @@ fn context_drawer( Some(button) }; - let add_keybinding_button = - widget::button::standard(fl!("add-keybinding")).on_press(ShortcutMessage::AddKeybinding); + let add_keybinding_button = widget::button::standard(fl!("add-another-keybinding")) + .id(add_keybindings_id) + .on_press_maybe(if model.bindings.iter().any(|(_, b)| !b.is_saved) { + None + } else { + Some(ShortcutMessage::AddAnotherKeybinding) + }); let button_container = widget::row::with_capacity(2) .push_maybe(reset_keybinding_button) @@ -552,7 +637,8 @@ fn context_drawer( .width(Length::Fill) .align_x(Alignment::End); - widget::column::with_capacity(if show_action { 3 } else { 2 }) + widget::column::with_capacity(if show_action { 4 } else { 3 }) + .push(widget::text::heading(title)) .spacing(space_l) .push_maybe(action) .push(bindings) diff --git a/cosmic-settings/src/pages/input/keyboard/shortcuts/custom.rs b/cosmic-settings/src/pages/input/keyboard/shortcuts/custom.rs index 07b523a..46334c2 100644 --- a/cosmic-settings/src/pages/input/keyboard/shortcuts/custom.rs +++ b/cosmic-settings/src/pages/input/keyboard/shortcuts/custom.rs @@ -67,9 +67,10 @@ pub enum Message { #[derive(Default)] struct AddShortcut { pub active: bool, + pub editing: Option, pub name: String, pub task: String, - pub keys: Slab<(String, widget::Id, bool)>, + pub keys: Slab<(String, widget::Id)>, } impl AddShortcut { @@ -79,8 +80,7 @@ impl AddShortcut { self.task.clear(); if self.keys.is_empty() { - self.keys - .insert((String::new(), widget::Id::unique(), false)); + self.keys.insert((String::new(), widget::Id::unique())); } else { while self.keys.len() > 1 { self.keys.remove(self.keys.len() - 1); @@ -103,34 +103,20 @@ impl Page { } Message::KeyEditing(id, enable) => { - self.add_shortcut.keys[id].2 = enable; + if enable { + self.add_shortcut.editing = Some(id) + } else if self.add_shortcut.editing == Some(id) { + let task = self.add_keybinding(); + self.add_shortcut.editing = None; + return task; + } } Message::NameInput(text) => { self.add_shortcut.name = text; } - Message::AddKeybinding => { - // If an empty entry exists, focus it instead of creating a new input. - for (_, (binding, id, _)) in &mut self.add_shortcut.keys { - if Binding::from_str(binding).is_ok() { - continue; - } - - binding.clear(); - - return widget::text_input::focus(id.clone()); - } - - let new_id = widget::Id::unique(); - self.add_shortcut - .keys - .insert((String::new(), new_id.clone(), true)); - return Task::batch(vec![ - widget::text_input::focus(new_id.clone()), - widget::text_input::select_all(new_id), - ]); - } + Message::AddKeybinding => return self.add_keybinding(), Message::AddShortcut => { let name = self.add_shortcut.name.trim(); @@ -172,12 +158,13 @@ impl Page { } Message::EditCombination => { - let (_, id, editing) = &mut self.add_shortcut.keys[0]; - *editing = true; - return Task::batch(vec![ - widget::text_input::focus(id.clone()), - widget::text_input::select_all(id.clone()), - ]); + if let Some((slab_index, (_, id))) = self.add_shortcut.keys.iter().next() { + self.add_shortcut.editing = Some(slab_index); + return Task::batch(vec![ + widget::text_input::focus(id.clone()), + widget::text_input::select_all(id.clone()), + ]); + } } Message::NameSubmit => { @@ -227,6 +214,31 @@ impl Page { Task::none() } + fn add_keybinding(&mut self) -> Task { + // If an empty entry exists, focus it instead of creating a new input. + for (_, (binding, id)) in &mut self.add_shortcut.keys { + if Binding::from_str(binding).is_ok() { + continue; + } + + binding.clear(); + + return widget::text_input::focus(id.clone()); + } + + let new_id = widget::Id::unique(); + self.add_shortcut.editing = Some( + self.add_shortcut + .keys + .insert((String::new(), new_id.clone())), + ); + + Task::batch(vec![ + widget::text_input::focus(new_id.clone()), + widget::text_input::select_all(new_id), + ]) + } + fn add_keybinding_context(&self) -> Element<'_, Message> { let name_input = widget::text_input("", &self.add_shortcut.name) .padding([6, 12]) @@ -258,15 +270,17 @@ impl Page { let keys = self.add_shortcut.keys.iter().fold( widget::list_column().spacing(0), - |column, (id, (text, widget_id, editing))| { + |column, (id, (text, widget_id))| { let key_combination = widget::editable_input( fl!("type-key-combination"), text, - *editing, + self.add_shortcut.editing == Some(id), move |enable| Message::KeyEditing(id, enable), ) + .select_on_focus(true) .padding([0, 12]) .on_input(move |input| Message::KeyInput(id, input)) + .on_unfocus(Message::AddKeybinding) .on_submit(|_| Message::AddKeybinding) .id(widget_id.clone()) .apply(widget::container) @@ -278,7 +292,7 @@ impl Page { let controls = widget::list_column().add(input_fields).add(keys).spacing(0); - let add_keybinding_button = widget::button::standard(fl!("add-keybinding")) + let add_keybinding_button = widget::button::standard(fl!("add-another-keybinding")) .on_press(Message::AddShortcut) .apply(widget::container) .width(Length::Fill) @@ -358,6 +372,11 @@ impl page::Page for Page { .map(|el| el.map(crate::pages::Message::CustomShortcuts)) } + fn on_context_drawer_close(&mut self) -> Task { + self.model.on_context_drawer_close(); + Task::none() + } + fn on_enter(&mut self) -> Task { self.model.on_enter(); Task::none() @@ -385,8 +404,8 @@ fn bindings(_defaults: &Shortcuts, keybindings: &Shortcuts) -> Slab for Page { .map(|el| el.map(crate::pages::Message::ManageWindowShortcuts)) } + fn on_context_drawer_close(&mut self) -> Task { + self.model.on_context_drawer_close(); + Task::none() + } + fn on_enter(&mut self) -> Task { self.model.on_enter(); - Task::none() } diff --git a/cosmic-settings/src/pages/input/keyboard/shortcuts/mod.rs b/cosmic-settings/src/pages/input/keyboard/shortcuts/mod.rs index 674b35d..7b81a41 100644 --- a/cosmic-settings/src/pages/input/keyboard/shortcuts/mod.rs +++ b/cosmic-settings/src/pages/input/keyboard/shortcuts/mod.rs @@ -14,13 +14,13 @@ pub mod tiling; use cosmic::iced::Length; use cosmic::widget::{self, icon, settings, text}; -use cosmic::{theme, Apply, Element, Task}; +use cosmic::{Apply, Element, Task, theme}; use cosmic_config::ConfigGet; +use cosmic_settings_config::Binding; use cosmic_settings_config::shortcuts::action::{ Direction, FocusDirection, Orientation, ResizeDirection, }; use cosmic_settings_config::shortcuts::{self, Action, Shortcuts}; -use cosmic_settings_config::Binding; use cosmic_settings_page::Section; use cosmic_settings_page::{self as page, section}; use itertools::Itertools; @@ -476,25 +476,21 @@ fn all_system_actions() -> &'static [Action] { Action::Focus(FocusDirection::Up), Action::LastWorkspace, Action::Maximize, - Action::MigrateWorkspaceToNextOutput, Action::MigrateWorkspaceToOutput(Direction::Down), Action::MigrateWorkspaceToOutput(Direction::Left), Action::MigrateWorkspaceToOutput(Direction::Right), Action::MigrateWorkspaceToOutput(Direction::Up), - Action::MigrateWorkspaceToPreviousOutput, Action::Minimize, Action::Move(Direction::Down), Action::Move(Direction::Left), Action::Move(Direction::Right), Action::Move(Direction::Up), Action::MoveToLastWorkspace, - Action::MoveToNextOutput, Action::MoveToNextWorkspace, Action::MoveToOutput(Direction::Down), Action::MoveToOutput(Direction::Left), Action::MoveToOutput(Direction::Right), Action::MoveToOutput(Direction::Up), - Action::MoveToPreviousOutput, Action::MoveToPreviousWorkspace, Action::MoveToWorkspace(1), Action::MoveToWorkspace(2), @@ -505,11 +501,9 @@ fn all_system_actions() -> &'static [Action] { Action::MoveToWorkspace(7), Action::MoveToWorkspace(8), Action::MoveToWorkspace(9), - Action::NextOutput, Action::NextWorkspace, Action::Orientation(Orientation::Horizontal), Action::Orientation(Orientation::Vertical), - Action::PreviousOutput, Action::PreviousWorkspace, Action::Resizing(ResizeDirection::Inwards), Action::Resizing(ResizeDirection::Outwards), diff --git a/cosmic-settings/src/pages/input/keyboard/shortcuts/move_window.rs b/cosmic-settings/src/pages/input/keyboard/shortcuts/move_window.rs index d27e2be..80579f7 100644 --- a/cosmic-settings/src/pages/input/keyboard/shortcuts/move_window.rs +++ b/cosmic-settings/src/pages/input/keyboard/shortcuts/move_window.rs @@ -59,9 +59,13 @@ impl page::Page for Page { .map(|el| el.map(crate::pages::Message::MoveWindowShortcuts)) } + fn on_context_drawer_close(&mut self) -> Task { + self.model.on_context_drawer_close(); + Task::none() + } + fn on_enter(&mut self) -> Task { self.model.on_enter(); - Task::none() } diff --git a/cosmic-settings/src/pages/input/keyboard/shortcuts/nav.rs b/cosmic-settings/src/pages/input/keyboard/shortcuts/nav.rs index a06ca5d..c98a2f5 100644 --- a/cosmic-settings/src/pages/input/keyboard/shortcuts/nav.rs +++ b/cosmic-settings/src/pages/input/keyboard/shortcuts/nav.rs @@ -59,9 +59,13 @@ impl page::Page for Page { .map(|el| el.map(crate::pages::Message::NavShortcuts)) } + fn on_context_drawer_close(&mut self) -> Task { + self.model.on_context_drawer_close(); + Task::none() + } + fn on_enter(&mut self) -> Task { self.model.on_enter(); - Task::none() } diff --git a/cosmic-settings/src/pages/input/keyboard/shortcuts/system.rs b/cosmic-settings/src/pages/input/keyboard/shortcuts/system.rs index 0dbc890..8eb7132 100644 --- a/cosmic-settings/src/pages/input/keyboard/shortcuts/system.rs +++ b/cosmic-settings/src/pages/input/keyboard/shortcuts/system.rs @@ -59,9 +59,13 @@ impl page::Page for Page { .map(|el| el.map(crate::pages::Message::SystemShortcuts)) } + fn on_context_drawer_close(&mut self) -> Task { + self.model.on_context_drawer_close(); + Task::none() + } + fn on_enter(&mut self) -> Task { self.model.on_enter(); - Task::none() } diff --git a/cosmic-settings/src/pages/input/keyboard/shortcuts/tiling.rs b/cosmic-settings/src/pages/input/keyboard/shortcuts/tiling.rs index b312ad8..4b69eb3 100644 --- a/cosmic-settings/src/pages/input/keyboard/shortcuts/tiling.rs +++ b/cosmic-settings/src/pages/input/keyboard/shortcuts/tiling.rs @@ -59,9 +59,13 @@ impl page::Page for Page { .map(|el| el.map(crate::pages::Message::TilingShortcuts)) } + fn on_context_drawer_close(&mut self) -> Task { + self.model.on_context_drawer_close(); + Task::none() + } + fn on_enter(&mut self) -> Task { self.model.on_enter(); - Task::none() } diff --git a/cosmic-settings/src/pages/system/about.rs b/cosmic-settings/src/pages/system/about.rs index f7a2a0c..50850f3 100644 --- a/cosmic-settings/src/pages/system/about.rs +++ b/cosmic-settings/src/pages/system/about.rs @@ -88,10 +88,6 @@ impl Page { match message { Message::HostnameEdit(editing) => { self.editing_device_name = editing; - - if !editing { - return self.hostname_submit(); - } } Message::HostnameInput(hostname) => { @@ -119,6 +115,7 @@ impl Page { } fn hostname_submit(&mut self) -> cosmic::app::Task { + eprintln!("hostname submit"); if self.hostname_input == self.info.device_name { return Task::none(); } @@ -182,6 +179,7 @@ fn device() -> Section { ) .width(250) .on_input(Message::HostnameInput) + .on_unfocus(Message::HostnameSubmit) .on_submit(|_| Message::HostnameSubmit); let device_name = settings::item::builder(&*desc[device]) diff --git a/i18n/en/cosmic_settings.ftl b/i18n/en/cosmic_settings.ftl index 45284f3..1bb9f61 100644 --- a/i18n/en/cosmic_settings.ftl +++ b/i18n/en/cosmic_settings.ftl @@ -577,7 +577,7 @@ show-extended-input-sources = Show extended input sources keyboard-shortcuts = Keyboard Shortcuts .desc = View and customize shortcuts -add-keybinding = Add keybinding +add-another-keybinding = Add another keybinding cancel = Cancel command = Command custom = Custom diff --git a/page/Cargo.toml b/page/Cargo.toml index d1e77f2..90dab4a 100644 --- a/page/Cargo.toml +++ b/page/Cargo.toml @@ -9,7 +9,6 @@ regex = "1.11.1" slotmap = "1.0.7" libcosmic = { workspace = true } downcast-rs = "1.2.1" -once_cell = "1.20.3" tokio.workspace = true url = "2.5.4" slab = "0.4.9" diff --git a/page/src/binder.rs b/page/src/binder.rs index 85e8de6..902153e 100644 --- a/page/src/binder.rs +++ b/page/src/binder.rs @@ -25,6 +25,7 @@ pub struct Binder { } impl Default for Binder { + #[inline] fn default() -> Self { Self { content: SparseSecondaryMap::new(), @@ -42,12 +43,14 @@ impl Default for Binder { impl Binder { /// Check if a page exists in the model. #[must_use] + #[inline] pub fn contains_item(&self, id: crate::Entity) -> bool { self.info.contains_key(id) } /// Returns the content of a page, if it has any. #[must_use] + #[inline] pub fn content(&self, page: crate::Entity) -> Option<&[section::Entity]> { self.content.get(page).map(Vec::as_slice) } @@ -87,6 +90,7 @@ impl Binder { } #[must_use] + #[inline] pub fn find_page_by_id(&self, id: &str) -> Option<(crate::Entity, &Info)> { self.info.iter().find(|(_id, info)| info.id == id) } @@ -117,22 +121,26 @@ impl Binder { } #[must_use] + #[inline] pub fn model(&self, id: crate::Entity) -> Option<&dyn Page> { self.page.get(id).map(AsRef::as_ref) } #[must_use] + #[inline] pub fn model_mut(&mut self, id: crate::Entity) -> Option<&mut dyn Page> { self.page.get_mut(id).map(AsMut::as_mut) } /// Get entity ID of page by its type ID. + #[inline] pub fn page_id>(&self) -> Option { self.typed_page_ids.get(&TypeId::of::

()).copied() } /// Obtain a reference to a page by its type ID. #[must_use] + #[inline] pub fn page>(&self) -> Option<&P> { let page = self.page.get(self.page_id::

()?)?; page.downcast_ref::

() @@ -140,6 +148,7 @@ impl Binder { /// Create a context drawer for the given page. #[must_use] + #[inline] pub fn context_drawer(&self, id: crate::Entity) -> Option> { let page = self.page.get(id)?; page.context_drawer() @@ -147,6 +156,7 @@ impl Binder { /// Create a dialog for the given page. #[must_use] + #[inline] pub fn dialog(&self, id: crate::Entity) -> Option> { let page = self.page.get(id)?; page.dialog() @@ -154,12 +164,23 @@ impl Binder { /// Obtain a reference to a page by its type ID. #[must_use] + #[inline] pub fn page_mut>(&mut self) -> Option<&mut P> { let page = self.page.get_mut(self.page_id::

()?)?; page.downcast_mut::

() } + /// Returns a Task when a context drawer is closed. + #[inline] + pub fn on_context_drawer_close(&mut self, id: crate::Entity) -> Option> { + if let Some(page) = self.page.get_mut(id) { + return Some(page.on_context_drawer_close()); + } + None + } + /// Returns a Task when a page is left + #[inline] pub fn on_leave(&mut self, id: crate::Entity) -> Option> { if let Some(page) = self.page.get_mut(id) { return Some(page.on_leave()); @@ -168,6 +189,7 @@ impl Binder { } /// Calls a page's load function to refresh its data. + #[inline] pub fn on_enter(&mut self, id: crate::Entity) -> Task { if let Some(page) = self.page.get_mut(id) { return page.on_enter(); @@ -204,13 +226,14 @@ impl Binder { ) -> impl Iterator + 'a { self.content.iter().flat_map(move |(page, sections)| { sections - .into_iter() + .iter() .filter(|&id| self.sections[*id].search_matches(rule)) .map(move |&id| (page, id)) }) } /// Returns the sub-pages of a page, if it has any. + #[inline] pub fn sub_pages(&self, page: crate::Entity) -> Option<&[crate::Entity]> { self.sub_pages.get(page).map(AsRef::as_ref) } @@ -219,6 +242,7 @@ impl Binder { pub trait AutoBind: Page + Default + 'static { /// Attaches sub-pages to the page. #[allow(clippy::must_use_candidate)] + #[inline] fn sub_pages(page: crate::Insert) -> crate::Insert { page } diff --git a/page/src/insert.rs b/page/src/insert.rs index 84700c4..f6347b0 100644 --- a/page/src/insert.rs +++ b/page/src/insert.rs @@ -9,13 +9,15 @@ pub struct Insert<'a, Message> { pub id: Entity, } -impl<'a, Message: 'static> Insert<'a, Message> { +impl Insert<'_, Message> { #[must_use] + #[inline] pub fn id(self) -> Entity { self.id } #[must_use] + #[inline] pub fn content(self, content: Content) -> Self { self.model.content.insert(self.id, content); self @@ -26,7 +28,11 @@ impl<'a, Message: 'static> Insert<'a, Message> { #[allow(clippy::must_use_candidate)] pub fn sub_page>(self) -> Self { let sub_page = self.model.register::

().id(); + self.sub_page_inner(sub_page) + } + #[inline(never)] + fn sub_page_inner(self, sub_page: Entity) -> Self { self.model.info[sub_page].parent = Some(self.id); self.model @@ -43,7 +49,11 @@ impl<'a, Message: 'static> Insert<'a, Message> { #[allow(clippy::must_use_candidate)] pub fn sub_page_with_id>(&mut self) -> Entity { let sub_page = self.model.register::

().id(); + self.sub_page_with_id_inner(sub_page) + } + #[inline(never)] + fn sub_page_with_id_inner(&mut self, sub_page: Entity) -> Entity { self.model.info[sub_page].parent = Some(self.id); self.model diff --git a/page/src/lib.rs b/page/src/lib.rs index f774ba8..2c086b1 100644 --- a/page/src/lib.rs +++ b/page/src/lib.rs @@ -6,7 +6,7 @@ pub use binder::{AutoBind, Binder}; mod insert; use cosmic::{Element, Task}; -use downcast_rs::{impl_downcast, Downcast}; +use downcast_rs::{Downcast, impl_downcast}; pub use insert::Insert; pub mod section; @@ -30,6 +30,7 @@ pub trait Page: Downcast { /// Initialize the sections used by this page. #[must_use] + #[inline] fn content( &self, _sections: &mut SlotMap>, @@ -39,46 +40,62 @@ pub trait Page: Downcast { /// Display a context drawer for the page. #[must_use] + #[inline] fn context_drawer(&self) -> Option> { None } /// Set a custom page header + #[inline] fn header(&self) -> Option> { None } /// Display an inner app dialog for the page. + #[inline] fn dialog(&self) -> Option> { None } /// Response from a file chooser dialog request. + #[inline] fn file_chooser(&mut self, _selected: Vec) -> Task { Task::none() } /// Alter the contents of the page's header view. + #[inline] fn header_view(&self) -> Option> { None } + /// Emit on the context drawer being closed + #[allow(unused)] + #[inline] + fn on_context_drawer_close(&mut self) -> Task { + Task::none() + } + /// Reload page metadata via a Task. #[allow(unused)] + #[inline] fn on_enter(&mut self) -> Task { Task::none() } /// Emit a command when the page is left + #[inline] fn on_leave(&mut self) -> Task { Task::none() } /// Assigns the entity ID of the page to the page. #[allow(unused)] + #[inline] fn set_id(&mut self, entity: Entity) {} /// The title to display in the page header. + #[inline] fn title(&self) -> Option<&str> { None } @@ -112,6 +129,7 @@ pub struct Info { } impl Info { + #[inline] pub fn new(id: impl Into>, icon_name: impl Into>) -> Self { Self { title: String::new(), diff --git a/page/src/section.rs b/page/src/section.rs index dd4494e..1737215 100644 --- a/page/src/section.rs +++ b/page/src/section.rs @@ -54,6 +54,7 @@ impl Default for Section { impl Section { #[must_use] + #[inline] pub fn search_matches(&self, rule: &Regex) -> bool { if self.search_ignore { return false; @@ -72,6 +73,7 @@ impl Section { false } + #[inline] pub fn show_while>( mut self, func: impl for<'a> Fn(&'a Model) -> bool + 'static, @@ -92,6 +94,7 @@ impl Section { /// # Panics /// /// Will panic if the `Model` type does not match the page type. + #[inline] pub fn view>( mut self, func: impl for<'a> Fn( @@ -116,6 +119,7 @@ impl Section { } #[must_use] +#[inline] pub fn unimplemented<'a, Message: 'static>( _binder: &'a Binder, _page: &'a dyn Page, diff --git a/pages/wallpapers/Cargo.toml b/pages/wallpapers/Cargo.toml index 15b62ec..ff88d5c 100644 --- a/pages/wallpapers/Cargo.toml +++ b/pages/wallpapers/Cargo.toml @@ -20,6 +20,6 @@ futures-lite = "2.6.0" futures-util = "0.3.31" image = "0.25.5" infer = "0.16.0" -jxl-oxide = "0.11.1" -tokio = { version = "1.43.0", features = ["sync"] } +jxl-oxide = "0.11.3" +tokio = { version = "1.44.1", features = ["sync"] } tracing = "0.1.41"