From 390673c70fbd2b12a7f1d4a77d0b1e8bd34bce39 Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Mon, 21 Oct 2024 13:51:10 -0600 Subject: [PATCH] Update libcosmic/iced --- Cargo.lock | 1220 +++++++++++++++++++++---------------------- Cargo.toml | 2 +- src/app.rs | 328 ++++++------ src/config.rs | 2 +- src/dialog.rs | 123 ++--- src/menu.rs | 24 +- src/mounter/gvfs.rs | 65 +-- src/mounter/mod.rs | 10 +- src/mouse_area.rs | 25 +- src/tab.rs | 340 ++++++------ 10 files changed, 1056 insertions(+), 1083 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a687893..1f9aabe 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -20,43 +20,53 @@ checksum = "c71b1793ee61086797f5c80b6efa2b8ffa6d5dd703f118545808a7f2e27f7046" [[package]] name = "accesskit" -version = "0.12.2" -source = "git+https://github.com/wash2/accesskit.git?branch=winit-0.29#26f729169cd849970af02be62289606c63572d2d" +version = "0.16.0" +source = "git+https://github.com/wash2/accesskit?tag=iced-xdg-surface-0.13#6050b02771ba9d6e4113902d9dfb7cf41a20573c" + +[[package]] +name = "accesskit_atspi_common" +version = "0.9.0" +source = "git+https://github.com/wash2/accesskit?tag=iced-xdg-surface-0.13#6050b02771ba9d6e4113902d9dfb7cf41a20573c" +dependencies = [ + "accesskit", + "accesskit_consumer", + "atspi-common", + "serde", + "thiserror", + "zvariant 3.15.2", +] [[package]] name = "accesskit_consumer" -version = "0.17.0" -source = "git+https://github.com/wash2/accesskit.git?branch=winit-0.29#26f729169cd849970af02be62289606c63572d2d" +version = "0.24.0" +source = "git+https://github.com/wash2/accesskit?tag=iced-xdg-surface-0.13#6050b02771ba9d6e4113902d9dfb7cf41a20573c" dependencies = [ "accesskit", + "immutable-chunkmap", ] [[package]] name = "accesskit_macos" -version = "0.11.0" -source = "git+https://github.com/wash2/accesskit.git?branch=winit-0.29#26f729169cd849970af02be62289606c63572d2d" +version = "0.17.0" +source = "git+https://github.com/wash2/accesskit?tag=iced-xdg-surface-0.13#6050b02771ba9d6e4113902d9dfb7cf41a20573c" dependencies = [ "accesskit", "accesskit_consumer", - "icrate 0.1.2", - "objc2 0.5.2", + "objc2", + "objc2-app-kit", + "objc2-foundation", "once_cell", ] [[package]] name = "accesskit_unix" -version = "0.7.1" -source = "git+https://github.com/wash2/accesskit.git?branch=winit-0.29#26f729169cd849970af02be62289606c63572d2d" +version = "0.12.0" +source = "git+https://github.com/wash2/accesskit?tag=iced-xdg-surface-0.13#6050b02771ba9d6e4113902d9dfb7cf41a20573c" dependencies = [ "accesskit", - "accesskit_consumer", - "async-channel", - "async-executor", - "async-task", + "accesskit_atspi_common", "atspi", "futures-lite 1.13.0", - "futures-util", - "once_cell", "serde", "tokio", "tokio-stream", @@ -65,21 +75,20 @@ dependencies = [ [[package]] name = "accesskit_windows" -version = "0.16.0" -source = "git+https://github.com/wash2/accesskit.git?branch=winit-0.29#26f729169cd849970af02be62289606c63572d2d" +version = "0.22.0" +source = "git+https://github.com/wash2/accesskit?tag=iced-xdg-surface-0.13#6050b02771ba9d6e4113902d9dfb7cf41a20573c" dependencies = [ "accesskit", "accesskit_consumer", - "once_cell", "paste", "static_assertions", - "windows 0.48.0", + "windows 0.54.0", ] [[package]] name = "accesskit_winit" -version = "0.18.1" -source = "git+https://github.com/wash2/accesskit.git?branch=winit-0.29#26f729169cd849970af02be62289606c63572d2d" +version = "0.22.0" +source = "git+https://github.com/wash2/accesskit?tag=iced-xdg-surface-0.13#6050b02771ba9d6e4113902d9dfb7cf41a20573c" dependencies = [ "accesskit", "accesskit_macos", @@ -163,9 +172,9 @@ checksum = "3aa2999eb46af81abb65c2d30d446778d7e613b60bbf4e174a027e80f90a3c14" [[package]] name = "android-activity" -version = "0.5.2" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee91c0c2905bae44f84bfa4e044536541df26b7703fd0888deeb9060fcc44289" +checksum = "ef6978589202a00cd7e118380c448a08b6ed394c3a8df3a430d0898e3a42d046" dependencies = [ "android-properties", "bitflags 2.6.0", @@ -177,7 +186,7 @@ dependencies = [ "log", "ndk", "ndk-context", - "ndk-sys", + "ndk-sys 0.6.0+11769913", "num_enum", "thiserror", ] @@ -254,9 +263,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.89" +version = "1.0.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86fdf8605db99b54d3cd748a44c6d04df638eb5dafb219b135d0149bd0db01f6" +checksum = "37bf3594c4c988a53154954629820791dde498571819ae4ca50ca811e060cc95" [[package]] name = "apply" @@ -314,11 +323,11 @@ checksum = "175571dd1d178ced59193a6fc02dde1b972eb0bc56c892cde9beeceac5bf0f6b" [[package]] name = "ash" -version = "0.37.3+1.3.251" +version = "0.38.0+1.3.281" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39e9c3835d686b0a6084ab4234fcd1b07dbf6e4767dce60874b12356a25ecd4a" +checksum = "0bb44936d800fea8f016d7f2311c6a4f97aebd5dc86f09906139ec848cf3a46f" dependencies = [ - "libloading 0.7.4", + "libloading", ] [[package]] @@ -327,7 +336,7 @@ version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd884d7c72877a94102c3715f3b1cd09ff4fac28221add3e57cfbe25c236d093" dependencies = [ - "async-fs 2.1.2", + "async-fs", "async-net", "enumflags2", "futures-channel", @@ -356,7 +365,7 @@ dependencies = [ "url", "wayland-backend", "wayland-client", - "wayland-protocols 0.32.4", + "wayland-protocols", "zbus 4.4.0", ] @@ -407,18 +416,6 @@ dependencies = [ "slab", ] -[[package]] -name = "async-fs" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "279cf904654eeebfa37ac9bb1598880884924aab82e290aa65c9e77a0e142e06" -dependencies = [ - "async-lock 2.8.0", - "autocfg", - "blocking", - "futures-lite 1.13.0", -] - [[package]] name = "async-fs" version = "2.1.2" @@ -544,7 +541,7 @@ checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.82", ] [[package]] @@ -579,7 +576,7 @@ checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.82", ] [[package]] @@ -673,6 +670,12 @@ version = "0.21.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + [[package]] name = "basic-toml" version = "0.1.9" @@ -684,18 +687,18 @@ dependencies = [ [[package]] name = "bit-set" -version = "0.5.3" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" +checksum = "f0481a0e032742109b1133a095184ee93d88f3dc9e0d28a5d033dc77a073f44f" dependencies = [ "bit-vec", ] [[package]] name = "bit-vec" -version = "0.6.3" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" +checksum = "d2c54ff287cfc0a34f38a6b832ea1bd8e448a330b3e40a50859e6488bee07f22" [[package]] name = "bit_field" @@ -733,42 +736,13 @@ dependencies = [ "generic-array", ] -[[package]] -name = "block-sys" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae85a0696e7ea3b835a453750bf002770776609115e6d25c6d2ff28a8200f7e7" -dependencies = [ - "objc-sys", -] - -[[package]] -name = "block2" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15b55663a85f33501257357e6421bb33e769d5c9ffb5ba0921c975a123e35e68" -dependencies = [ - "block-sys", - "objc2 0.4.1", -] - -[[package]] -name = "block2" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e58aa60e59d8dbfcc36138f5f18be5f24394d33b38b24f7fd0b1caa33095f22f" -dependencies = [ - "block-sys", - "objc2 0.5.2", -] - [[package]] name = "block2" version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2c132eebf10f5cad5289222520a4a058514204aed6d791f1cf4fe8088b82d15f" dependencies = [ - "objc2 0.5.2", + "objc2", ] [[package]] @@ -823,7 +797,7 @@ checksum = "bcfcc3cd946cb52f0bbfdbbcfa2f4e24f75ebb6c0e1002f7c25904fada18b9ec" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.82", ] [[package]] @@ -859,20 +833,6 @@ dependencies = [ "pkg-config", ] -[[package]] -name = "calloop" -version = "0.12.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fba7adb4dd5aa98e5553510223000e7148f621165ec5f9acd7113f6ca4995298" -dependencies = [ - "bitflags 2.6.0", - "log", - "polling 3.7.3", - "rustix 0.38.37", - "slab", - "thiserror", -] - [[package]] name = "calloop" version = "0.13.0" @@ -887,25 +847,13 @@ dependencies = [ "thiserror", ] -[[package]] -name = "calloop-wayland-source" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f0ea9b9476c7fad82841a8dbb380e2eae480c21910feba80725b46931ed8f02" -dependencies = [ - "calloop 0.12.4", - "rustix 0.38.37", - "wayland-backend", - "wayland-client", -] - [[package]] name = "calloop-wayland-source" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95a66a987056935f7efce4ab5668920b5d0dac4a7c99991a67395f13702ddd20" dependencies = [ - "calloop 0.13.0", + "calloop", "rustix 0.38.37", "wayland-backend", "wayland-client", @@ -913,9 +861,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.1.30" +version = "1.1.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b16803a61b81d9eabb7eae2588776c4c1e584b738ede45fdbb4c972cec1e9945" +checksum = "c2e7962b54006dcfcc61cb72735f4d89bb97061dd6a7ed882ec6b8ee53714c6f" dependencies = [ "jobserver", "libc", @@ -1004,7 +952,7 @@ dependencies = [ [[package]] name = "clipboard_macos" version = "0.1.0" -source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-dnd-8#7c59b07b9172d8e0401f7e06609e1050575309c9" +source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-0.13#1832d5637b27ad9b0c781724ab30bec844366c63" dependencies = [ "objc", "objc-foundation", @@ -1014,7 +962,7 @@ dependencies = [ [[package]] name = "clipboard_wayland" version = "0.2.2" -source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-dnd-8#7c59b07b9172d8e0401f7e06609e1050575309c9" +source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-0.13#1832d5637b27ad9b0c781724ab30bec844366c63" dependencies = [ "dnd", "mime 0.1.0", @@ -1024,7 +972,7 @@ dependencies = [ [[package]] name = "clipboard_x11" version = "0.4.2" -source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-dnd-8#7c59b07b9172d8e0401f7e06609e1050575309c9" +source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-0.13#1832d5637b27ad9b0c781724ab30bec844366c63" dependencies = [ "thiserror", "x11rb", @@ -1205,14 +1153,14 @@ source = "git+https://github.com/pop-os/cosmic-protocols?rev=c8d3a1c#c8d3a1c3d40 dependencies = [ "cosmic-protocols", "libc", - "smithay-client-toolkit 0.19.2", + "smithay-client-toolkit", "wayland-client", ] [[package]] name = "cosmic-config" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic.git#9c62f19e4b80b6bcffde024698015d3a533cb944" +source = "git+https://github.com/pop-os/libcosmic.git#533e099cf6259fac14580f5c3881777a43b93932" dependencies = [ "atomicwrites", "cosmic-config-derive", @@ -1231,7 +1179,7 @@ dependencies = [ [[package]] name = "cosmic-config-derive" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic.git#9c62f19e4b80b6bcffde024698015d3a533cb944" +source = "git+https://github.com/pop-os/libcosmic.git#533e099cf6259fac14580f5c3881777a43b93932" dependencies = [ "quote", "syn 1.0.109", @@ -1308,8 +1256,8 @@ dependencies = [ "bitflags 2.6.0", "wayland-backend", "wayland-client", - "wayland-protocols 0.32.4", - "wayland-protocols-wlr 0.3.4", + "wayland-protocols", + "wayland-protocols-wlr", "wayland-scanner", "wayland-server", ] @@ -1320,12 +1268,12 @@ version = "0.12.1" source = "git+https://github.com/pop-os/cosmic-text.git#4fe90bb6126c22f589b46768d7754d65ae300c5e" dependencies = [ "bitflags 2.6.0", - "fontdb", + "fontdb 0.16.2", "log", "rangemap", "rayon", - "rustc-hash", - "rustybuzz 0.14.1", + "rustc-hash 1.1.0", + "rustybuzz", "self_cell 1.0.4", "smol_str", "swash", @@ -1340,7 +1288,7 @@ dependencies = [ [[package]] name = "cosmic-theme" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic.git#9c62f19e4b80b6bcffde024698015d3a533cb944" +source = "git+https://github.com/pop-os/libcosmic.git#533e099cf6259fac14580f5c3881777a43b93932" dependencies = [ "almost", "cosmic-config", @@ -1467,11 +1415,12 @@ checksum = "96a6ac251f4a2aca6b3f91340350eab87ae57c3f127ffeb585e92bd336717991" [[package]] name = "d3d12" -version = "0.19.0" -source = "git+https://github.com/gfx-rs/wgpu?rev=20fda69#20fda698341efbdc870b8027d6d49f5bf3f36109" +version = "22.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bdbd1f579714e3c809ebd822c81ef148b1ceaeb3d535352afc73fd0c4c6a0017" dependencies = [ "bitflags 2.6.0", - "libloading 0.8.5", + "libloading", "winapi", ] @@ -1496,7 +1445,7 @@ dependencies = [ "proc-macro2", "quote", "strsim 0.11.1", - "syn 2.0.79", + "syn 2.0.82", ] [[package]] @@ -1507,7 +1456,7 @@ checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core", "quote", - "syn 2.0.79", + "syn 2.0.82", ] [[package]] @@ -1563,7 +1512,7 @@ checksum = "67e77553c4162a157adbf834ebae5b415acbecbeafc7a74b0e886657506a7611" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.82", ] [[package]] @@ -1575,7 +1524,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.82", ] [[package]] @@ -1665,7 +1614,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.82", ] [[package]] @@ -1674,7 +1623,7 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "330c60081dcc4c72131f8eb70510f1ac07223e5d4163db481a04a0befcffa412" dependencies = [ - "libloading 0.8.5", + "libloading", ] [[package]] @@ -1689,21 +1638,35 @@ dependencies = [ [[package]] name = "dnd" version = "0.1.0" -source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-dnd-8#7c59b07b9172d8e0401f7e06609e1050575309c9" +source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-0.13#1832d5637b27ad9b0c781724ab30bec844366c63" dependencies = [ "bitflags 2.6.0", "mime 0.1.0", "raw-window-handle", - "smithay-client-toolkit 0.19.2", + "smithay-client-toolkit", "smithay-clipboard", ] +[[package]] +name = "document-features" +version = "0.2.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb6969eaabd2421f8a2775cfd2471a2b634372b4a25d41e3bd647b79912850a0" +dependencies = [ + "litrs", +] + [[package]] name = "downcast-rs" version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75b325c5dbd37f80359721ad39aca5a29fb04c89279657cffdda8736d0c0b9d2" +[[package]] +name = "dpi" +version = "0.1.1" +source = "git+https://github.com/pop-os/winit.git?tag=iced-xdg-surface-0.13#b640d4daf908f88c1107b863a1981d04bf2420e2" + [[package]] name = "drm" version = "0.11.1" @@ -1755,17 +1718,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a3d8a32ae18130a3c84dd492d4215c3d913c3b07c6b63c2eb3eb7ff1101ab7bf" -[[package]] -name = "enum-repr" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bad30c9c0fa1aaf1ae5010dab11f1117b15d35faf62cda4bbbc53b9987950f18" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "enumflags2" version = "0.7.10" @@ -1784,7 +1736,7 @@ checksum = "de0d48a183585823424a4ce1aa132d174a6a81bd540895822eb4c8373a8e49e8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.82", ] [[package]] @@ -1979,9 +1931,6 @@ name = "float-cmp" version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "98de4bbd547a563b716d8dfa9aad1cb19bfab00f4fa09a6a4ed21dbcf44ce9c4" -dependencies = [ - "num-traits", -] [[package]] name = "float_next_after" @@ -2009,7 +1958,7 @@ dependencies = [ "fluent-syntax", "intl-memoizer", "intl_pluralrules", - "rustc-hash", + "rustc-hash 1.1.0", "self_cell 0.10.3", "smallvec", "unic-langid", @@ -2035,9 +1984,9 @@ dependencies = [ [[package]] name = "flume" -version = "0.11.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55ac459de2512911e4b674ce33cf20befaba382d05b62b008afc1c8b57cbf181" +checksum = "da0e4dd2a88388a1f4ccc7c9ce104604dab68d9f408dc34cd45823d5a9069095" dependencies = [ "spin", ] @@ -2048,12 +1997,6 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" -[[package]] -name = "foldhash" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f81ec6369c545a7d40e4589b5597581fa1c441fe1cce96dd1de43159910a36a2" - [[package]] name = "font-types" version = "0.7.2" @@ -2069,7 +2012,7 @@ version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c1fcfcd44ca6e90c921fee9fa665d530b21ef1327a4c1a6c5250ea44b776ada7" dependencies = [ - "roxmltree 0.20.0", + "roxmltree", ] [[package]] @@ -2086,6 +2029,20 @@ dependencies = [ "ttf-parser 0.20.0", ] +[[package]] +name = "fontdb" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e32eac81c1135c1df01d4e6d4233c47ba11f6a6d07f33e0bba09d18797077770" +dependencies = [ + "fontconfig-parser", + "log", + "memmap2 0.9.5", + "slotmap", + "tinyvec", + "ttf-parser 0.21.1", +] + [[package]] name = "foreign-types" version = "0.5.0" @@ -2104,7 +2061,7 @@ checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.82", ] [[package]] @@ -2276,7 +2233,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.82", ] [[package]] @@ -2360,16 +2317,6 @@ dependencies = [ "temp-dir", ] -[[package]] -name = "gif" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80792593675e051cf94a4b111980da2ba60d4a83e43e0048c5693baab3977045" -dependencies = [ - "color_quant", - "weezl", -] - [[package]] name = "gif" version = "0.13.1" @@ -2429,9 +2376,9 @@ dependencies = [ [[package]] name = "glam" -version = "0.24.2" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5418c17512bdf42730f9032c74e1ae39afc408745ebb2acf72fbc4691c17945" +checksum = "151665d9be52f9bb40fc7966565d39666f2d1e69233571b71b87791c7e0528b3" [[package]] name = "glib" @@ -2464,7 +2411,7 @@ dependencies = [ "proc-macro-crate 3.2.0", "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.82", ] [[package]] @@ -2510,24 +2457,13 @@ dependencies = [ [[package]] name = "glutin_wgl_sys" -version = "0.5.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c8098adac955faa2d31079b65dc48841251f69efd3ac25477903fc424362ead" +checksum = "0a4e1951bbd9434a81aa496fe59ccc2235af3820d27b85f9314e279609211e2c" dependencies = [ "gl_generator", ] -[[package]] -name = "glyphon" -version = "0.5.0" -source = "git+https://github.com/pop-os/glyphon.git?tag=v0.5.0#1b0646ff8f74da92d3be704dfc2257d7f4d7eed8" -dependencies = [ - "cosmic-text", - "etagere", - "lru", - "wgpu", -] - [[package]] name = "gobject-sys" version = "0.20.4" @@ -2560,9 +2496,9 @@ dependencies = [ [[package]] name = "gpu-allocator" -version = "0.25.0" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f56f6318968d03c18e1bcf4857ff88c61157e9da8e47c5f29055d60e1228884" +checksum = "fdd4240fc91d3433d5e5b0fc5b67672d771850dc19bbee03c1381e19322803d7" dependencies = [ "log", "presser", @@ -2573,9 +2509,9 @@ dependencies = [ [[package]] name = "gpu-descriptor" -version = "0.2.4" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc11df1ace8e7e564511f53af41f3e42ddc95b56fd07b3f4445d2a6048bc682c" +checksum = "9c08c1f623a8d0b722b8b99f821eb0ba672a1618f0d3b16ddbee1cedd2dd8557" dependencies = [ "bitflags 2.6.0", "gpu-descriptor-types", @@ -2584,9 +2520,9 @@ dependencies = [ [[package]] name = "gpu-descriptor-types" -version = "0.1.2" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bf0b36e6f090b7e1d8a4b49c0cb81c1f8376f72198c65dd3ad9ff3556b8b78c" +checksum = "fdf242682df893b86f33a73828fb09ca4b2d3bb6cc95249707fc684d27484b91" dependencies = [ "bitflags 2.6.0", ] @@ -2632,11 +2568,6 @@ name = "hashbrown" version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb" -dependencies = [ - "allocator-api2", - "equivalent", - "foldhash", -] [[package]] name = "hassle-rs" @@ -2647,7 +2578,7 @@ dependencies = [ "bitflags 2.6.0", "com", "libc", - "libloading 0.8.5", + "libloading", "thiserror", "widestring", "winapi", @@ -2757,7 +2688,7 @@ dependencies = [ "proc-macro2", "quote", "strsim 0.10.0", - "syn 2.0.79", + "syn 2.0.82", "unic-langid", ] @@ -2771,7 +2702,7 @@ dependencies = [ "i18n-config", "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.82", ] [[package]] @@ -2799,15 +2730,14 @@ dependencies = [ [[package]] name = "iced" -version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#9c62f19e4b80b6bcffde024698015d3a533cb944" +version = "0.14.0-dev" +source = "git+https://github.com/pop-os/libcosmic.git#533e099cf6259fac14580f5c3881777a43b93932" dependencies = [ "dnd", "iced_accessibility", "iced_core", "iced_futures", "iced_renderer", - "iced_sctk", "iced_widget", "iced_winit", "image", @@ -2819,57 +2749,71 @@ dependencies = [ [[package]] name = "iced_accessibility" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic.git#9c62f19e4b80b6bcffde024698015d3a533cb944" +source = "git+https://github.com/pop-os/libcosmic.git#533e099cf6259fac14580f5c3881777a43b93932" dependencies = [ "accesskit", - "accesskit_unix", "accesskit_winit", ] [[package]] name = "iced_core" -version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#9c62f19e4b80b6bcffde024698015d3a533cb944" +version = "0.14.0-dev" +source = "git+https://github.com/pop-os/libcosmic.git#533e099cf6259fac14580f5c3881777a43b93932" dependencies = [ "bitflags 2.6.0", + "bytes", "dnd", + "glam", "iced_accessibility", "log", "mime 0.1.0", "num-traits", + "once_cell", "palette", "raw-window-handle", + "rustc-hash 2.0.0", "serde", - "smithay-client-toolkit 0.19.2", + "smithay-client-toolkit", "smol_str", "thiserror", "web-time", "window_clipboard", - "xxhash-rust", ] [[package]] name = "iced_futures" -version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#9c62f19e4b80b6bcffde024698015d3a533cb944" +version = "0.14.0-dev" +source = "git+https://github.com/pop-os/libcosmic.git#533e099cf6259fac14580f5c3881777a43b93932" dependencies = [ "futures", "iced_core", "log", + "rustc-hash 2.0.0", "tokio", "wasm-bindgen-futures", "wasm-timer", ] +[[package]] +name = "iced_glyphon" +version = "0.6.0" +source = "git+https://github.com/pop-os/glyphon.git?tag=iced-0.14-dev#6ef9d12a20cfd0f7bdf38136a26ded9f7459ec8b" +dependencies = [ + "cosmic-text", + "etagere", + "lru", + "rustc-hash 2.0.0", + "wgpu", +] + [[package]] name = "iced_graphics" -version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#9c62f19e4b80b6bcffde024698015d3a533cb944" +version = "0.14.0-dev" +source = "git+https://github.com/pop-os/libcosmic.git#533e099cf6259fac14580f5c3881777a43b93932" dependencies = [ "bitflags 2.6.0", "bytemuck", "cosmic-text", - "glam", "half", "iced_core", "iced_futures", @@ -2879,16 +2823,15 @@ dependencies = [ "lyon_path", "once_cell", "raw-window-handle", - "rustc-hash", + "rustc-hash 2.0.0", "thiserror", "unicode-segmentation", - "xxhash-rust", ] [[package]] name = "iced_renderer" -version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#9c62f19e4b80b6bcffde024698015d3a533cb944" +version = "0.14.0-dev" +source = "git+https://github.com/pop-os/libcosmic.git#533e099cf6259fac14580f5c3881777a43b93932" dependencies = [ "iced_graphics", "iced_tiny_skia", @@ -2899,96 +2842,62 @@ dependencies = [ [[package]] name = "iced_runtime" -version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#9c62f19e4b80b6bcffde024698015d3a533cb944" +version = "0.14.0-dev" +source = "git+https://github.com/pop-os/libcosmic.git#533e099cf6259fac14580f5c3881777a43b93932" dependencies = [ + "bytes", "dnd", "iced_accessibility", "iced_core", "iced_futures", - "smithay-client-toolkit 0.19.2", - "thiserror", - "window_clipboard", -] - -[[package]] -name = "iced_sctk" -version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic.git#9c62f19e4b80b6bcffde024698015d3a533cb944" -dependencies = [ - "enum-repr", - "float-cmp", - "futures", - "iced_accessibility", - "iced_futures", - "iced_graphics", - "iced_runtime", - "iced_style", - "itertools", - "lazy_static", "raw-window-handle", - "smithay-client-toolkit 0.19.2", + "smithay-client-toolkit", "thiserror", - "tracing", - "wayland-backend", - "wayland-protocols 0.32.4", "window_clipboard", - "xkbcommon", - "xkbcommon-dl", - "xkeysym", -] - -[[package]] -name = "iced_style" -version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#9c62f19e4b80b6bcffde024698015d3a533cb944" -dependencies = [ - "iced_core", - "once_cell", - "palette", ] [[package]] name = "iced_tiny_skia" -version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#9c62f19e4b80b6bcffde024698015d3a533cb944" +version = "0.14.0-dev" +source = "git+https://github.com/pop-os/libcosmic.git#533e099cf6259fac14580f5c3881777a43b93932" dependencies = [ "bytemuck", "cosmic-text", "iced_graphics", - "kurbo", + "kurbo 0.10.4", "log", "resvg", - "rustc-hash", + "rustc-hash 2.0.0", "softbuffer", "tiny-skia", - "xxhash-rust", ] [[package]] name = "iced_wgpu" -version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#9c62f19e4b80b6bcffde024698015d3a533cb944" +version = "0.14.0-dev" +source = "git+https://github.com/pop-os/libcosmic.git#533e099cf6259fac14580f5c3881777a43b93932" dependencies = [ "as-raw-xcb-connection", "bitflags 2.6.0", "bytemuck", "futures", "glam", - "glyphon", "guillotiere", + "iced_glyphon", "iced_graphics", "log", "lyon", "once_cell", "raw-window-handle", "resvg", + "rustc-hash 2.0.0", "rustix 0.38.37", - "smithay-client-toolkit 0.19.2", + "smithay-client-toolkit", + "thiserror", "tiny-xlib", "wayland-backend", "wayland-client", - "wayland-protocols 0.32.4", + "wayland-protocols", "wayland-sys", "wgpu", "x11rb", @@ -2996,17 +2905,18 @@ dependencies = [ [[package]] name = "iced_widget" -version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#9c62f19e4b80b6bcffde024698015d3a533cb944" +version = "0.14.0-dev" +source = "git+https://github.com/pop-os/libcosmic.git#533e099cf6259fac14580f5c3881777a43b93932" dependencies = [ "dnd", "iced_accessibility", "iced_renderer", "iced_runtime", - "iced_style", "num-traits", + "once_cell", "ouroboros", - "smithay-client-toolkit 0.19.2", + "rustc-hash 2.0.0", + "smithay-client-toolkit", "thiserror", "unicode-segmentation", "window_clipboard", @@ -3014,42 +2924,30 @@ dependencies = [ [[package]] name = "iced_winit" -version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#9c62f19e4b80b6bcffde024698015d3a533cb944" +version = "0.14.0-dev" +source = "git+https://github.com/pop-os/libcosmic.git#533e099cf6259fac14580f5c3881777a43b93932" dependencies = [ "dnd", "iced_accessibility", + "iced_futures", "iced_graphics", "iced_runtime", - "iced_style", "log", + "raw-window-handle", + "rustc-hash 2.0.0", + "smithay-client-toolkit", "thiserror", "tracing", + "wasm-bindgen-futures", + "wayland-backend", + "wayland-protocols", "web-sys", "winapi", "window_clipboard", "winit", -] - -[[package]] -name = "icrate" -version = "0.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99d3aaff8a54577104bafdf686ff18565c3b6903ca5782a2026ef06e2c7aa319" -dependencies = [ - "block2 0.3.0", - "dispatch", - "objc2 0.4.1", -] - -[[package]] -name = "icrate" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fb69199826926eb864697bddd27f73d9fddcffc004f5733131e15b465e30642" -dependencies = [ - "block2 0.4.0", - "objc2 0.5.2", + "xkbcommon", + "xkbcommon-dl", + "xkeysym", ] [[package]] @@ -3192,7 +3090,7 @@ checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.82", ] [[package]] @@ -3237,7 +3135,7 @@ dependencies = [ "byteorder", "color_quant", "exr", - "gif 0.13.1", + "gif", "jpeg-decoder", "num-traits", "png", @@ -3251,6 +3149,15 @@ version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "029d73f573d8e8d63e6d5020011d3255b28c3ba85d6cf870a07184ed23de9284" +[[package]] +name = "immutable-chunkmap" +version = "2.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4419f022e55cc63d5bbd6b44b71e1d226b9c9480a47824c706e9d54e5c40c5eb" +dependencies = [ + "arrayvec 0.7.6", +] + [[package]] name = "indexmap" version = "2.6.0" @@ -3449,7 +3356,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6aae1df220ece3c0ada96b8153459b67eebe9ae9212258bb0134ae60416fdf76" dependencies = [ "libc", - "libloading 0.8.5", + "libloading", "pkg-config", ] @@ -3490,11 +3397,22 @@ dependencies = [ [[package]] name = "kurbo" -version = "0.9.5" +version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd85a5776cd9500c2e2059c8c76c3b01528566b7fcbaf8098b55a33fc298849b" +checksum = "1618d4ebd923e97d67e7cd363d80aef35fe961005cbbbb3d2dad8bdd1bc63440" dependencies = [ "arrayvec 0.7.6", + "smallvec", +] + +[[package]] +name = "kurbo" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89234b2cc610a7dd927ebde6b41dd1a5d4214cffaef4cf1fb2195d592f92518f" +dependencies = [ + "arrayvec 0.7.6", + "smallvec", ] [[package]] @@ -3524,14 +3442,14 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.159" +version = "0.2.161" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "561d97a539a36e26a9a5fad1ea11a3039a67714694aaa379433e580854bc3dc5" +checksum = "8e9489c2807c139ffd9c1794f4af0ebe86a828db53ecdc7fea2111d0fed085d1" [[package]] name = "libcosmic" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic.git#9c62f19e4b80b6bcffde024698015d3a533cb944" +source = "git+https://github.com/pop-os/libcosmic.git#533e099cf6259fac14580f5c3881777a43b93932" dependencies = [ "apply", "ashpd 0.9.2", @@ -3550,8 +3468,6 @@ dependencies = [ "iced_futures", "iced_renderer", "iced_runtime", - "iced_sctk", - "iced_style", "iced_tiny_skia", "iced_wgpu", "iced_widget", @@ -3575,16 +3491,6 @@ dependencies = [ "zbus 4.4.0", ] -[[package]] -name = "libloading" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" -dependencies = [ - "cfg-if", - "winapi", -] - [[package]] name = "libloading" version = "0.8.5" @@ -3656,6 +3562,12 @@ version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "643cb0b8d4fcc284004d5fd0d67ccf61dfffadb7f75e1e71bc420f4688a3a704" +[[package]] +name = "litrs" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4ce301924b7887e9d637144fdade93f9dfff9b60981d4ac161db09720d39aa5" + [[package]] name = "locale_config" version = "0.3.0" @@ -3696,9 +3608,6 @@ name = "lru" version = "0.12.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "234cf4f4a04dc1f57e24b96cc0cd600cf2af460d4161ac5ecdd0af8e1f3b2a38" -dependencies = [ - "hashbrown 0.15.0", -] [[package]] name = "lyon" @@ -3837,9 +3746,9 @@ dependencies = [ [[package]] name = "metal" -version = "0.27.0" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c43f73953f8cbe511f021b58f18c3ce1c3d1ae13fe953293e13345bf83217f25" +checksum = "7ecfd3296f8c56b7c1f6fbac3c71cefa9d78ce009850c45000015f206dc7fa21" dependencies = [ "bitflags 2.6.0", "block", @@ -3853,7 +3762,7 @@ dependencies = [ [[package]] name = "mime" version = "0.1.0" -source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-dnd-8#7c59b07b9172d8e0401f7e06609e1050575309c9" +source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-0.13#1832d5637b27ad9b0c781724ab30bec844366c63" dependencies = [ "smithay-clipboard", ] @@ -3931,18 +3840,19 @@ checksum = "16cf681a23b4d0a43fc35024c176437f9dcd818db34e0f42ab456a0ee5ad497b" [[package]] name = "naga" -version = "0.19.0" -source = "git+https://github.com/gfx-rs/wgpu?rev=20fda69#20fda698341efbdc870b8027d6d49f5bf3f36109" +version = "22.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8bd5a652b6faf21496f2cfd88fc49989c8db0825d1f6746b1a71a6ede24a63ad" dependencies = [ "arrayvec 0.7.6", "bit-set", "bitflags 2.6.0", + "cfg_aliases 0.1.1", "codespan-reporting", "hexf-parse", "indexmap", "log", - "num-traits", - "rustc-hash", + "rustc-hash 1.1.0", "spirv", "termcolor", "thiserror", @@ -3951,14 +3861,14 @@ dependencies = [ [[package]] name = "ndk" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2076a31b7010b17a38c01907c45b945e8f11495ee4dd588309718901b1f7a5b7" +checksum = "c3f42e7bbe13d351b6bead8286a43aac9534b82bd3cc43e47037f012ebfd62d4" dependencies = [ "bitflags 2.6.0", "jni-sys", "log", - "ndk-sys", + "ndk-sys 0.6.0+11769913", "num_enum", "raw-window-handle", "thiserror", @@ -3979,6 +3889,15 @@ dependencies = [ "jni-sys", ] +[[package]] +name = "ndk-sys" +version = "0.6.0+11769913" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee6cda3051665f1fb8d9e08fc35c96d5a244fb1be711a03b71118828afc9a873" +dependencies = [ + "jni-sys", +] + [[package]] name = "nix" version = "0.26.4" @@ -4189,7 +4108,7 @@ dependencies = [ "proc-macro-crate 3.2.0", "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.82", ] [[package]] @@ -4208,7 +4127,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "915b1b472bc21c53464d6c8461c9d3af805ba1ef837e1cac254428f4a77177b1" dependencies = [ "malloc_buf", - "objc_exception", ] [[package]] @@ -4228,16 +4146,6 @@ version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cdb91bdd390c7ce1a8607f35f3ca7151b65afc0ff5ff3b34fa350f7d7c7e4310" -[[package]] -name = "objc2" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "559c5a40fdd30eb5e344fbceacf7595a81e242529fb4e21cf5f43fb4f11ff98d" -dependencies = [ - "objc-sys", - "objc2-encode 3.0.0", -] - [[package]] name = "objc2" version = "0.5.2" @@ -4245,14 +4153,84 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "46a785d4eeff09c14c487497c162e92766fbb3e4059a71840cecc03d9a50b804" dependencies = [ "objc-sys", - "objc2-encode 4.0.3", + "objc2-encode", ] [[package]] -name = "objc2-encode" -version = "3.0.0" +name = "objc2-app-kit" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d079845b37af429bfe5dfa76e6d087d788031045b25cfc6fd898486fd9847666" +checksum = "e4e89ad9e3d7d297152b17d39ed92cd50ca8063a89a9fa569046d41568891eff" +dependencies = [ + "bitflags 2.6.0", + "block2", + "libc", + "objc2", + "objc2-core-data", + "objc2-core-image", + "objc2-foundation", + "objc2-quartz-core", +] + +[[package]] +name = "objc2-cloud-kit" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74dd3b56391c7a0596a295029734d3c1c5e7e510a4cb30245f8221ccea96b009" +dependencies = [ + "bitflags 2.6.0", + "block2", + "objc2", + "objc2-core-location", + "objc2-foundation", +] + +[[package]] +name = "objc2-contacts" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5ff520e9c33812fd374d8deecef01d4a840e7b41862d849513de77e44aa4889" +dependencies = [ + "block2", + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-core-data" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "617fbf49e071c178c0b24c080767db52958f716d9eabdf0890523aeae54773ef" +dependencies = [ + "bitflags 2.6.0", + "block2", + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-core-image" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55260963a527c99f1819c4f8e3b47fe04f9650694ef348ffd2227e8196d34c80" +dependencies = [ + "block2", + "objc2", + "objc2-foundation", + "objc2-metal", +] + +[[package]] +name = "objc2-core-location" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "000cfee34e683244f284252ee206a27953279d370e309649dc3ee317b37e5781" +dependencies = [ + "block2", + "objc2", + "objc2-contacts", + "objc2-foundation", +] [[package]] name = "objc2-encode" @@ -4267,18 +4245,102 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ee638a5da3799329310ad4cfa62fbf045d5f56e3ef5ba4149e7452dcf89d5a8" dependencies = [ "bitflags 2.6.0", - "block2 0.5.1", + "block2", + "dispatch", "libc", - "objc2 0.5.2", + "objc2", ] [[package]] -name = "objc_exception" -version = "0.1.2" +name = "objc2-link-presentation" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad970fb455818ad6cba4c122ad012fae53ae8b4795f86378bce65e4f6bab2ca4" +checksum = "a1a1ae721c5e35be65f01a03b6d2ac13a54cb4fa70d8a5da293d7b0020261398" dependencies = [ - "cc", + "block2", + "objc2", + "objc2-app-kit", + "objc2-foundation", +] + +[[package]] +name = "objc2-metal" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd0cba1276f6023976a406a14ffa85e1fdd19df6b0f737b063b95f6c8c7aadd6" +dependencies = [ + "bitflags 2.6.0", + "block2", + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-quartz-core" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e42bee7bff906b14b167da2bac5efe6b6a07e6f7c0a21a7308d40c960242dc7a" +dependencies = [ + "bitflags 2.6.0", + "block2", + "objc2", + "objc2-foundation", + "objc2-metal", +] + +[[package]] +name = "objc2-symbols" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a684efe3dec1b305badae1a28f6555f6ddd3bb2c2267896782858d5a78404dc" +dependencies = [ + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-ui-kit" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8bb46798b20cd6b91cbd113524c490f1686f4c4e8f49502431415f3512e2b6f" +dependencies = [ + "bitflags 2.6.0", + "block2", + "objc2", + "objc2-cloud-kit", + "objc2-core-data", + "objc2-core-image", + "objc2-core-location", + "objc2-foundation", + "objc2-link-presentation", + "objc2-quartz-core", + "objc2-symbols", + "objc2-uniform-type-identifiers", + "objc2-user-notifications", +] + +[[package]] +name = "objc2-uniform-type-identifiers" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44fa5f9748dbfe1ca6c0b79ad20725a11eca7c2218bceb4b005cb1be26273bfe" +dependencies = [ + "block2", + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-user-notifications" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76cfcbf642358e8689af64cee815d139339f3ed8ad05103ed5eaf73db8d84cb3" +dependencies = [ + "bitflags 2.6.0", + "block2", + "objc2", + "objc2-core-location", + "objc2-foundation", ] [[package]] @@ -4353,9 +4415,9 @@ dependencies = [ [[package]] name = "ouroboros" -version = "0.17.2" +version = "0.18.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2ba07320d39dfea882faa70554b4bd342a5f273ed59ba7c1c6b4c840492c954" +checksum = "944fa20996a25aded6b4795c6d63f10014a7a83f8be9828a11860b08c5fc4a67" dependencies = [ "aliasable", "ouroboros_macro", @@ -4364,15 +4426,16 @@ dependencies = [ [[package]] name = "ouroboros_macro" -version = "0.17.2" +version = "0.18.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec4c6225c69b4ca778c0aea097321a64c421cf4577b331c61b229267edabb6f8" +checksum = "39b0deead1528fd0e5947a8546a9642a9777c25f6e1e26f34c97b204bbb465bd" dependencies = [ "heck 0.4.1", - "proc-macro-error", + "itertools", "proc-macro2", + "proc-macro2-diagnostics", "quote", - "syn 2.0.79", + "syn 2.0.82", ] [[package]] @@ -4412,7 +4475,7 @@ dependencies = [ "by_address", "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.82", ] [[package]] @@ -4527,7 +4590,7 @@ dependencies = [ "phf_shared", "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.82", ] [[package]] @@ -4536,7 +4599,7 @@ version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "90fcb95eef784c2ac79119d1dd819e162b5da872ce6f3c3abe1e8ca1c082f72b" dependencies = [ - "siphasher", + "siphasher 0.3.11", ] [[package]] @@ -4545,6 +4608,26 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5be167a7af36ee22fe3115051bc51f6e6c7054c9348e28deb4f49bd6f705a315" +[[package]] +name = "pin-project" +version = "1.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf123a161dde1e524adf36f90bc5d8d3462824a9c43553ad07a8183161189ec" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4502d8515ca9f32f1fb543d987f63d95a14934883db45bdb48060b6b69257f8" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.82", +] + [[package]] name = "pin-project-lite" version = "0.2.14" @@ -4697,6 +4780,19 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "proc-macro2-diagnostics" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af066a9c399a26e020ada66a034357a868728e72cd426f3adcd35f80d88d88c8" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.82", + "version_check", + "yansi", +] + [[package]] name = "profiling" version = "1.0.16" @@ -4814,12 +4910,6 @@ dependencies = [ "crossbeam-utils", ] -[[package]] -name = "rctree" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b42e27ef78c35d3998403c1d26f3efd9e135d3e5121b0a4845cc5cc27547f4f" - [[package]] name = "read-fonts" version = "0.22.3" @@ -4855,15 +4945,6 @@ dependencies = [ "bitflags 1.3.2", ] -[[package]] -name = "redox_syscall" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" -dependencies = [ - "bitflags 1.3.2", -] - [[package]] name = "redox_syscall" version = "0.4.1" @@ -4945,15 +5026,14 @@ checksum = "19b30a45b0cd0bcca8037f3d0dc3421eaf95327a17cad11964fb8179b4fc4832" [[package]] name = "resvg" -version = "0.37.0" +version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cadccb3d99a9efb8e5e00c16fbb732cbe400db2ec7fc004697ee7d97d86cf1f4" +checksum = "944d052815156ac8fa77eaac055220e95ba0b01fa8887108ca710c03805d9051" dependencies = [ - "gif 0.12.0", + "gif", "jpeg-decoder", "log", "pico-args", - "png", "rgb", "svgtypes", "tiny-skia", @@ -4998,18 +5078,12 @@ version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b91f7eff05f748767f183df4320a63d6936e9c6107d97c9e6bdd9784f4289c94" dependencies = [ - "base64", + "base64 0.21.7", "bitflags 2.6.0", "serde", "serde_derive", ] -[[package]] -name = "roxmltree" -version = "0.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3cd14fd5e3b777a7422cca79358c57a8f6e3a703d9ac187448d0daf220c2407f" - [[package]] name = "roxmltree" version = "0.20.0" @@ -5036,7 +5110,7 @@ dependencies = [ "proc-macro2", "quote", "rust-embed-utils", - "syn 2.0.79", + "syn 2.0.82", "walkdir", ] @@ -5072,6 +5146,12 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" +[[package]] +name = "rustc-hash" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "583034fd73374156e66797ed8e5b0d5690409c9226b22d87cb7f19821c05d152" + [[package]] name = "rustix" version = "0.37.27" @@ -5105,22 +5185,6 @@ version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0e819f2bc632f285be6d7cd36e25940d45b2391dd6d9b939e79de557f7014248" -[[package]] -name = "rustybuzz" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0ae5692c5beaad6a9e22830deeed7874eae8a4e3ba4076fb48e12c56856222c" -dependencies = [ - "bitflags 2.6.0", - "bytemuck", - "smallvec", - "ttf-parser 0.20.0", - "unicode-bidi-mirroring 0.1.0", - "unicode-ccc 0.1.2", - "unicode-properties", - "unicode-script", -] - [[package]] name = "rustybuzz" version = "0.14.1" @@ -5132,8 +5196,8 @@ dependencies = [ "libm", "smallvec", "ttf-parser 0.21.1", - "unicode-bidi-mirroring 0.2.0", - "unicode-ccc 0.2.0", + "unicode-bidi-mirroring", + "unicode-ccc", "unicode-properties", "unicode-script", ] @@ -5167,14 +5231,14 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "sctk-adwaita" -version = "0.8.3" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70b31447ca297092c5a9916fc3b955203157b37c19ca8edde4f52e9843e602c7" +checksum = "b6277f0217056f77f1d8f49f2950ac6c278c0d607c45f5ee99328d792ede24ec" dependencies = [ "ab_glyph", "log", "memmap2 0.9.5", - "smithay-client-toolkit 0.18.1", + "smithay-client-toolkit", "tiny-skia", ] @@ -5210,14 +5274,14 @@ checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.82", ] [[package]] name = "serde_json" -version = "1.0.128" +version = "1.0.132" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ff5456707a1de34e7e37f2a6fd3d3f808c318259cbd01ab6377795054b483d8" +checksum = "d726bfaff4b320266d395898905d0eba0345aae23b54aee3a737e260fd46db03" dependencies = [ "indexmap", "itoa", @@ -5234,7 +5298,7 @@ checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.82", ] [[package]] @@ -5313,6 +5377,12 @@ version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" +[[package]] +name = "siphasher" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56199f7ddabf13fe5074ce809e7d3f42b42ae711800501b5b16ea82ad029c39d" + [[package]] name = "skrifa" version = "0.22.3" @@ -5347,31 +5417,6 @@ version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" -[[package]] -name = "smithay-client-toolkit" -version = "0.18.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "922fd3eeab3bd820d76537ce8f582b1cf951eceb5475c28500c7457d9d17f53a" -dependencies = [ - "bitflags 2.6.0", - "calloop 0.12.4", - "calloop-wayland-source 0.2.0", - "cursor-icon", - "libc", - "log", - "memmap2 0.9.5", - "rustix 0.38.37", - "thiserror", - "wayland-backend", - "wayland-client", - "wayland-csd-frame", - "wayland-cursor", - "wayland-protocols 0.31.2", - "wayland-protocols-wlr 0.2.0", - "wayland-scanner", - "xkeysym", -] - [[package]] name = "smithay-client-toolkit" version = "0.19.2" @@ -5380,8 +5425,8 @@ checksum = "3457dea1f0eb631b4034d61d4d8c32074caa6cd1ab2d59f2327bd8461e2c0016" dependencies = [ "bitflags 2.6.0", "bytemuck", - "calloop 0.13.0", - "calloop-wayland-source 0.3.0", + "calloop", + "calloop-wayland-source", "cursor-icon", "libc", "log", @@ -5393,8 +5438,8 @@ dependencies = [ "wayland-client", "wayland-csd-frame", "wayland-cursor", - "wayland-protocols 0.32.4", - "wayland-protocols-wlr 0.3.4", + "wayland-protocols", + "wayland-protocols-wlr", "wayland-scanner", "xkbcommon", "xkeysym", @@ -5407,7 +5452,7 @@ source = "git+https://github.com/pop-os/smithay-clipboard?tag=pop-dnd-5#5a3007de dependencies = [ "libc", "raw-window-handle", - "smithay-client-toolkit 0.19.2", + "smithay-client-toolkit", "wayland-backend", ] @@ -5535,12 +5580,12 @@ checksum = "20e16a0f46cf5fd675563ef54f26e83e20f2366bcf027bcb3cc3ed2b98aaf2ca" [[package]] name = "svgtypes" -version = "0.13.0" +version = "0.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e44e288cd960318917cbd540340968b90becc8bc81f171345d706e7a89d9d70" +checksum = "794de53cc48eaabeed0ab6a3404a65f40b3e38c067e4435883a65d2aa4ca000e" dependencies = [ - "kurbo", - "siphasher", + "kurbo 0.11.1", + "siphasher 1.0.1", ] [[package]] @@ -5567,9 +5612,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.79" +version = "2.0.82" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89132cd0bf050864e1d38dc3bbc07a0eb8e7530af26344d3d2bbbef83499f590" +checksum = "83540f837a8afc019423a8edb95b52a8effe46957ee402287f4292fae35be021" dependencies = [ "proc-macro2", "quote", @@ -5584,7 +5629,7 @@ checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.82", ] [[package]] @@ -5695,7 +5740,7 @@ checksum = "5999e24eaa32083191ba4e425deb75cdf25efefabe5aaccb7446dd0d4122a3f5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.82", ] [[package]] @@ -5715,7 +5760,7 @@ checksum = "08904e7672f5eb876eaaf87e0ce17857500934f4981c4a0ab2b4aa98baac7fc3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.82", ] [[package]] @@ -5815,7 +5860,7 @@ checksum = "1d52f22673960ad13af14ff4025997312def1223bfa7c8e4949d099e6b3d5d1c" dependencies = [ "as-raw-xcb-connection", "ctor-lite", - "libloading 0.8.5", + "libloading", "pkg-config", "tracing", ] @@ -5871,7 +5916,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.82", ] [[package]] @@ -5958,7 +6003,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.82", ] [[package]] @@ -6007,7 +6052,7 @@ dependencies = [ "chrono", "libc", "log", - "objc2 0.5.2", + "objc2", "objc2-foundation", "once_cell", "scopeguard", @@ -6039,7 +6084,7 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "deb68604048ff8fa93347f02441e4487594adc20bb8a084f9e564d2b827a0a9f" dependencies = [ - "rustc-hash", + "rustc-hash 1.1.0", ] [[package]] @@ -6080,12 +6125,9 @@ dependencies = [ [[package]] name = "unicase" -version = "2.7.0" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7d2d4dafb69621809a81864c9c1b864479e1235c0dd4e199924b9742439ed89" -dependencies = [ - "version_check", -] +checksum = "7e51b68083f157f853b6379db119d1c1be0e6e4dec98101079dec41f6f5cf6df" [[package]] name = "unicode-bidi" @@ -6093,24 +6135,12 @@ version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5ab17db44d7388991a428b2ee655ce0c212e862eff1768a455c58f9aad6e7893" -[[package]] -name = "unicode-bidi-mirroring" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56d12260fb92d52f9008be7e4bca09f584780eb2266dc8fecc6a192bec561694" - [[package]] name = "unicode-bidi-mirroring" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "23cb788ffebc92c5948d0e997106233eeb1d8b9512f93f41651f52b6c5f5af86" -[[package]] -name = "unicode-ccc" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc2520efa644f8268dce4dcd3050eaa7fc044fca03961e9998ac7e2e92b77cf1" - [[package]] name = "unicode-ccc" version = "0.2.0" @@ -6213,63 +6243,29 @@ dependencies = [ [[package]] name = "usvg" -version = "0.37.0" +version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38b0a51b72ab80ca511d126b77feeeb4fb1e972764653e61feac30adc161a756" -dependencies = [ - "base64", - "log", - "pico-args", - "usvg-parser", - "usvg-text-layout", - "usvg-tree", - "xmlwriter", -] - -[[package]] -name = "usvg-parser" -version = "0.37.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bd4e3c291f45d152929a31f0f6c819245e2921bfd01e7bd91201a9af39a2bdc" +checksum = "b84ea542ae85c715f07b082438a4231c3760539d902e11d093847a0b22963032" dependencies = [ + "base64 0.22.1", "data-url", "flate2", + "fontdb 0.18.0", "imagesize", - "kurbo", + "kurbo 0.11.1", "log", - "roxmltree 0.19.0", + "pico-args", + "roxmltree", + "rustybuzz", "simplecss", - "siphasher", - "svgtypes", - "usvg-tree", -] - -[[package]] -name = "usvg-text-layout" -version = "0.37.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d383a3965de199d7f96d4e11a44dd859f46e86de7f3dca9a39bf82605da0a37c" -dependencies = [ - "fontdb", - "kurbo", - "log", - "rustybuzz 0.12.1", - "unicode-bidi", - "unicode-script", - "unicode-vo", - "usvg-tree", -] - -[[package]] -name = "usvg-tree" -version = "0.37.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ee3d202ebdb97a6215604b8f5b4d6ef9024efd623cf2e373a6416ba976ec7d3" -dependencies = [ - "rctree", + "siphasher 1.0.1", "strict-num", "svgtypes", "tiny-skia-path", + "unicode-bidi", + "unicode-script", + "unicode-vo", + "xmlwriter", ] [[package]] @@ -6380,7 +6376,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.82", "wasm-bindgen-shared", ] @@ -6414,7 +6410,7 @@ checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.82", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -6488,18 +6484,6 @@ dependencies = [ "xcursor", ] -[[package]] -name = "wayland-protocols" -version = "0.31.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f81f365b8b4a97f422ac0e8737c438024b5951734506b0e1d775c73030561f4" -dependencies = [ - "bitflags 2.6.0", - "wayland-backend", - "wayland-client", - "wayland-scanner", -] - [[package]] name = "wayland-protocols" version = "0.32.4" @@ -6515,27 +6499,14 @@ dependencies = [ [[package]] name = "wayland-protocols-plasma" -version = "0.2.0" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23803551115ff9ea9bce586860c5c5a971e360825a0309264102a9495a5ff479" +checksum = "8a0a41a6875e585172495f7a96dfa42ca7e0213868f4f15c313f7c33221a7eff" dependencies = [ "bitflags 2.6.0", "wayland-backend", "wayland-client", - "wayland-protocols 0.31.2", - "wayland-scanner", -] - -[[package]] -name = "wayland-protocols-wlr" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad1f61b76b6c2d8742e10f9ba5c3737f6530b4c243132c2a2ccc8aa96fe25cd6" -dependencies = [ - "bitflags 2.6.0", - "wayland-backend", - "wayland-client", - "wayland-protocols 0.31.2", + "wayland-protocols", "wayland-scanner", ] @@ -6548,7 +6519,7 @@ dependencies = [ "bitflags 2.6.0", "wayland-backend", "wayland-client", - "wayland-protocols 0.32.4", + "wayland-protocols", "wayland-scanner", "wayland-server", ] @@ -6602,9 +6573,9 @@ dependencies = [ [[package]] name = "web-time" -version = "0.2.4" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa30049b1c872b72c89866d458eae9f20380ab280ffd1b1e18df2d3e2d98cfe0" +checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" dependencies = [ "js-sys", "wasm-bindgen", @@ -6618,12 +6589,13 @@ checksum = "53a85b86a771b1c87058196170769dd264f66c0782acf1ae6cc51bfd64b39082" [[package]] name = "wgpu" -version = "0.19.0" -source = "git+https://github.com/gfx-rs/wgpu?rev=20fda69#20fda698341efbdc870b8027d6d49f5bf3f36109" +version = "22.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1d1c4ba43f80542cf63a0a6ed3134629ae73e8ab51e4b765a67f3aa062eb433" dependencies = [ "arrayvec 0.7.6", - "cfg-if", "cfg_aliases 0.1.1", + "document-features", "js-sys", "log", "naga", @@ -6642,14 +6614,15 @@ dependencies = [ [[package]] name = "wgpu-core" -version = "0.19.0" -source = "git+https://github.com/gfx-rs/wgpu?rev=20fda69#20fda698341efbdc870b8027d6d49f5bf3f36109" +version = "22.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0348c840d1051b8e86c3bcd31206080c5e71e5933dabd79be1ce732b0b2f089a" dependencies = [ "arrayvec 0.7.6", "bit-vec", "bitflags 2.6.0", "cfg_aliases 0.1.1", - "codespan-reporting", + "document-features", "indexmap", "log", "naga", @@ -6657,18 +6630,18 @@ dependencies = [ "parking_lot 0.12.3", "profiling", "raw-window-handle", - "rustc-hash", + "rustc-hash 1.1.0", "smallvec", "thiserror", - "web-sys", "wgpu-hal", "wgpu-types", ] [[package]] name = "wgpu-hal" -version = "0.19.0" -source = "git+https://github.com/gfx-rs/wgpu?rev=20fda69#20fda698341efbdc870b8027d6d49f5bf3f36109" +version = "22.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6bbf4b4de8b2a83c0401d9e5ae0080a2792055f25859a02bf9be97952bbed4f" dependencies = [ "android_system_properties", "arrayvec 0.7.6", @@ -6688,10 +6661,11 @@ dependencies = [ "js-sys", "khronos-egl", "libc", - "libloading 0.8.5", + "libloading", "log", "metal", "naga", + "ndk-sys 0.5.0+25.2.9519653", "objc", "once_cell", "parking_lot 0.12.3", @@ -6699,7 +6673,7 @@ dependencies = [ "range-alloc", "raw-window-handle", "renderdoc-sys", - "rustc-hash", + "rustc-hash 1.1.0", "smallvec", "thiserror", "wasm-bindgen", @@ -6710,8 +6684,9 @@ dependencies = [ [[package]] name = "wgpu-types" -version = "0.19.0" -source = "git+https://github.com/gfx-rs/wgpu?rev=20fda69#20fda698341efbdc870b8027d6d49f5bf3f36109" +version = "22.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc9d91f0e2c4b51434dfa6db77846f2793149d8e73f800fa2e41f52b8eac3c5d" dependencies = [ "bitflags 2.6.0", "js-sys", @@ -6758,7 +6733,7 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "window_clipboard" version = "0.4.1" -source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-dnd-8#7c59b07b9172d8e0401f7e06609e1050575309c9" +source = "git+https://github.com/pop-os/window_clipboard.git?tag=pop-0.13#1832d5637b27ad9b0c781724ab30bec844366c63" dependencies = [ "clipboard-win", "clipboard_macos", @@ -6770,17 +6745,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "windows" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" -dependencies = [ - "windows-implement 0.48.0", - "windows-interface 0.48.0", - "windows-targets 0.48.5", -] - [[package]] name = "windows" version = "0.52.0" @@ -6791,6 +6755,18 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "windows" +version = "0.54.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9252e5725dbed82865af151df558e754e4a3c2c30818359eb17465f1346a1b49" +dependencies = [ + "windows-core 0.54.0", + "windows-implement 0.53.0", + "windows-interface 0.53.0", + "windows-targets 0.52.6", +] + [[package]] name = "windows" version = "0.56.0" @@ -6810,6 +6786,16 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "windows-core" +version = "0.54.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12661b9c89351d684a50a8a643ce5f608e20243b9fb84687800163429f161d65" +dependencies = [ + "windows-result", + "windows-targets 0.52.6", +] + [[package]] name = "windows-core" version = "0.56.0" @@ -6824,13 +6810,13 @@ dependencies = [ [[package]] name = "windows-implement" -version = "0.48.0" +version = "0.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e2ee588991b9e7e6c8338edf3333fbe4da35dc72092643958ebb43f0ab2c49c" +checksum = "942ac266be9249c84ca862f0a164a39533dc2f6f33dc98ec89c8da99b82ea0bd" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.82", ] [[package]] @@ -6841,18 +6827,18 @@ checksum = "f6fc35f58ecd95a9b71c4f2329b911016e6bec66b3f2e6a4aad86bd2e99e2f9b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.82", ] [[package]] name = "windows-interface" -version = "0.48.0" +version = "0.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6fb8df20c9bcaa8ad6ab513f7b40104840c8867d5751126e4df3b08388d0cc7" +checksum = "da33557140a288fae4e1d5f8873aaf9eb6613a9cf82c3e070223ff177f598b60" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.82", ] [[package]] @@ -6863,7 +6849,7 @@ checksum = "08990546bf4edef8f431fa6326e032865f27138718c587dc21bc0265bbcb57cc" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.82", ] [[package]] @@ -7100,46 +7086,50 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winit" -version = "0.29.10" -source = "git+https://github.com/pop-os/winit.git?branch=winit-0.29#bdc66109acc85c912264c9e4b864520345bdb45f" +version = "0.30.5" +source = "git+https://github.com/pop-os/winit.git?tag=iced-xdg-surface-0.13#b640d4daf908f88c1107b863a1981d04bf2420e2" dependencies = [ "ahash", "android-activity", "atomic-waker", "bitflags 2.6.0", + "block2", "bytemuck", - "calloop 0.12.4", - "cfg_aliases 0.1.1", + "calloop", + "cfg_aliases 0.2.1", + "concurrent-queue", "core-foundation", "core-graphics", "cursor-icon", - "icrate 0.0.4", + "dpi", "js-sys", "libc", - "log", "memmap2 0.9.5", "ndk", - "ndk-sys", - "objc2 0.4.1", - "once_cell", + "objc2", + "objc2-app-kit", + "objc2-foundation", + "objc2-ui-kit", "orbclient", "percent-encoding", + "pin-project", "raw-window-handle", - "redox_syscall 0.3.5", + "redox_syscall 0.4.1", "rustix 0.38.37", "sctk-adwaita", - "smithay-client-toolkit 0.18.1", + "smithay-client-toolkit", "smol_str", + "tracing", "unicode-segmentation", "wasm-bindgen", "wasm-bindgen-futures", "wayland-backend", "wayland-client", - "wayland-protocols 0.31.2", + "wayland-protocols", "wayland-protocols-plasma", "web-sys", "web-time", - "windows-sys 0.48.0", + "windows-sys 0.52.0", "x11-dl", "x11rb", "xkbcommon-dl", @@ -7195,7 +7185,7 @@ dependencies = [ "as-raw-xcb-connection", "gethostname", "libc", - "libloading 0.8.5", + "libloading", "once_cell", "rustix 0.38.37", "x11rb-protocol", @@ -7299,10 +7289,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec7a2a501ed189703dba8b08142f057e887dfc4b2cc4db2d343ac6376ba3e0b9" [[package]] -name = "xxhash-rust" -version = "0.8.12" +name = "yansi" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a5cbf750400958819fb6178eaa83bee5cd9c29a26a40cc241df8c70fdd46984" +checksum = "cfe53a6657fd280eaa890a3bc59152892ffa3e30101319d168b781ed6529b049" [[package]] name = "yazi" @@ -7330,7 +7320,7 @@ checksum = "28cc31741b18cb6f1d5ff12f5b7523e3d6eb0852bbbad19d73905511d9849b95" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.82", "synstructure", ] @@ -7341,15 +7331,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "675d170b632a6ad49804c8cf2105d7c31eddd3312555cffd4b740e08e97c25e6" dependencies = [ "async-broadcast 0.5.1", - "async-executor", - "async-fs 1.6.0", - "async-io 1.13.0", - "async-lock 2.8.0", "async-process 1.8.1", "async-recursion", - "async-task", "async-trait", - "blocking", "byteorder", "derivative", "enumflags2", @@ -7384,7 +7368,7 @@ checksum = "bb97012beadd29e654708a0fdb4c84bc046f537aecfde2c3ee0a9e4b4d48c725" dependencies = [ "async-broadcast 0.7.1", "async-executor", - "async-fs 2.1.2", + "async-fs", "async-io 2.3.4", "async-lock 3.4.0", "async-process 2.3.0", @@ -7438,7 +7422,7 @@ dependencies = [ "proc-macro-crate 3.2.0", "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.82", "zvariant_utils 2.1.0", ] @@ -7488,7 +7472,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.82", ] [[package]] @@ -7508,7 +7492,7 @@ checksum = "0ea7b4a3637ea8669cedf0f1fd5c286a17f3de97b8dd5a70a6c167a1730e63a5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.82", "synstructure", ] @@ -7529,7 +7513,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.82", ] [[package]] @@ -7551,7 +7535,7 @@ checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.82", ] [[package]] @@ -7684,7 +7668,7 @@ dependencies = [ "proc-macro-crate 3.2.0", "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.82", "zvariant_utils 2.1.0", ] @@ -7707,5 +7691,5 @@ checksum = "c51bcff7cc3dbb5055396bcf774748c3dab426b4b8659046963523cee4808340" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.82", ] diff --git a/Cargo.toml b/Cargo.toml index 38d8673..dd2ab5c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -63,7 +63,7 @@ uzers = "0.12.0" [dependencies.libcosmic] git = "https://github.com/pop-os/libcosmic.git" default-features = false -features = ["a11y", "clipboard", "multi-window", "tokio"] +features = ["a11y", "multi-window", "tokio"] [dependencies.smol_str] version = "0.2.1" diff --git a/src/app.rs b/src/app.rs index 257116a..f1e1061 100644 --- a/src/app.rs +++ b/src/app.rs @@ -13,17 +13,17 @@ use cosmic::iced::{ Limits, }; use cosmic::{ - app::{self, message, Command, Core}, + app::{self, message, Core, Task}, cosmic_config, cosmic_theme, executor, iced::{ clipboard::dnd::DndAction, event, futures::{self, SinkExt}, keyboard::{Event as KeyEvent, Key, Modifiers}, - subscription::{self, Subscription}, + stream, widget::scrollable, window::{self, Event as WindowEvent, Id as WindowId}, - Alignment, Event, Length, Size, + Alignment, Event, Length, Size, Subscription, }, iced_runtime::clipboard, style, theme, @@ -619,7 +619,7 @@ impl App { location: Location, activate: bool, selection_path: Option, - ) -> (Entity, Command) { + ) -> (Entity, Task) { let mut tab = Tab::new(location.clone(), self.config.tab); tab.mode = match self.mode { Mode::App => tab::Mode::App, @@ -643,7 +643,7 @@ impl App { ( entity, - Command::batch([ + Task::batch([ self.update_title(), self.update_watcher(), self.rescan_tab(entity, location, selection_path), @@ -656,7 +656,7 @@ impl App { location: Location, activate: bool, selection_path: Option, - ) -> Command { + ) -> Task { self.open_tab_entity(location, activate, selection_path).1 } @@ -681,10 +681,10 @@ impl App { entity: Entity, location: Location, selection_path: Option, - ) -> Command { + ) -> Task { log::info!("rescan_tab {entity:?} {location:?} {selection_path:?}"); let icon_sizes = self.config.tab.icon_sizes; - Command::perform( + Task::perform( async move { let location2 = location.clone(); match tokio::task::spawn_blocking(move || location2.scan(icon_sizes)).await { @@ -705,7 +705,7 @@ impl App { ) } - fn rescan_trash(&mut self) -> Command { + fn rescan_trash(&mut self) -> Task { let mut needs_reload = Vec::new(); for entity in self.tab_model.iter() { if let Some(tab) = self.tab_model.data::(entity) { @@ -719,14 +719,14 @@ impl App { for (entity, location) in needs_reload { commands.push(self.rescan_tab(entity, location, None)); } - Command::batch(commands) + Task::batch(commands) } - fn search(&mut self) -> Command { + fn search(&mut self) -> Task { if let Some(term) = self.search_get() { self.search_set(Some(term.to_string())) } else { - Command::none() + Task::none() } } @@ -739,7 +739,7 @@ impl App { } } - fn search_set(&mut self, term_opt: Option) -> Command { + fn search_set(&mut self, term_opt: Option) -> Task { let entity = self.tab_model.active(); let mut title_location_opt = None; if let Some(tab) = self.tab_model.data_mut::(entity) { @@ -768,18 +768,18 @@ impl App { } if let Some((title, location, focus_search)) = title_location_opt { self.tab_model.text_set(entity, title); - return Command::batch([ + return Task::batch([ self.update_title(), self.update_watcher(), self.rescan_tab(entity, location, None), if focus_search { widget::text_input::focus(self.search_id.clone()) } else { - Command::none() + Task::none() }, ]); } - Command::none() + Task::none() } fn selected_paths(&self, entity_opt: Option) -> Vec { @@ -795,7 +795,7 @@ impl App { paths } - fn update_config(&mut self) -> Command { + fn update_config(&mut self) -> Task { self.update_nav_model(); // Tabs are collected first to placate the borrowck let tabs: Vec<_> = self.tab_model.iter().collect(); @@ -810,10 +810,10 @@ impl App { )) })) .collect(); - Command::batch(commands) + Task::batch(commands) } - fn update_desktop(&mut self) -> Command { + fn update_desktop(&mut self) -> Task { let mut needs_reload = Vec::new(); for entity in self.tab_model.iter() { if let Some(tab) = self.tab_model.data::(entity) { @@ -826,7 +826,7 @@ impl App { for (entity, location) in needs_reload { commands.push(self.rescan_tab(entity, location, None)); } - Command::batch(commands) + Task::batch(commands) } fn activate_nav_model_location(&mut self, location: &Location) { @@ -941,12 +941,12 @@ impl App { } } - fn update_notification(&mut self) -> Command { + fn update_notification(&mut self) -> Task { // Handle closing notification if there are no operations if self.pending_operations.is_empty() { #[cfg(feature = "notify")] if let Some(notification_arc) = self.notification_opt.take() { - return Command::perform( + return Task::perform( async move { tokio::task::spawn_blocking(move || { //TODO: this is nasty @@ -963,18 +963,22 @@ impl App { } } - Command::none() + Task::none() } - fn update_title(&mut self) -> Command { + fn update_title(&mut self) -> Task { let window_title = match self.tab_model.text(self.tab_model.active()) { Some(tab_title) => format!("{tab_title} — {}", fl!("cosmic-files")), None => fl!("cosmic-files"), }; - self.set_window_title(window_title, window::Id::MAIN) + if let Some(window_id) = &self.window_id_opt { + self.set_window_title(window_title, *window_id) + } else { + Task::none() + } } - fn update_watcher(&mut self) -> Command { + fn update_watcher(&mut self) -> Task { if let Some((mut watcher, old_paths)) = self.watcher_opt.take() { let mut new_paths = HashSet::new(); for entity in self.tab_model.iter() { @@ -1021,7 +1025,7 @@ impl App { } //TODO: should any of this run in a command? - Command::none() + Task::none() } fn about(&self) -> Element { @@ -1051,7 +1055,7 @@ impl App { .padding(0) .into(), ]) - .align_items(Alignment::Center) + .align_x(Alignment::Center) .spacing(space_xxs) .into() } @@ -1093,11 +1097,8 @@ impl App { text_input.into(), widget::text(fl!("network-drive-description")).into(), table.into(), - widget::row::with_children(vec![ - widget::horizontal_space(Length::Fill).into(), - button.into(), - ]) - .into(), + widget::row::with_children(vec![widget::horizontal_space().into(), button.into()]) + .into(), ]) .spacing(space_m) .into() @@ -1322,7 +1323,7 @@ impl Application for App { } /// Creates the application, and optionally emits command on initialize. - fn init(mut core: Core, flags: Self::Flags) -> (Self, Command) { + fn init(mut core: Core, flags: Self::Flags) -> (Self, Task) { core.window.context_is_overlay = false; match flags.mode { Mode::App => { @@ -1346,6 +1347,9 @@ impl Application for App { Mode::Desktop => tab::Mode::Desktop, }); + let window_id_opt = core.main_window_id(); + println!("WINDOW ID {:?}", window_id_opt); + let mut app = App { core, nav_bar_context_id: segmented_button::Entity::null(), @@ -1376,7 +1380,7 @@ impl Application for App { surface_names: HashMap::new(), toasts: widget::toaster::Toasts::new(Message::CloseToast), watcher_opt: None, - window_id_opt: Some(window::Id::MAIN), + window_id_opt, windows: HashMap::new(), nav_dnd_hover: None, tab_dnd_hover: None, @@ -1398,11 +1402,7 @@ impl Application for App { } } - (app, Command::batch(commands)) - } - - fn main_window_id(&self) -> window::Id { - self.window_id_opt.unwrap_or(window::Id::MAIN) + (app, Task::batch(commands)) } fn nav_bar(&self) -> Option>> { @@ -1504,7 +1504,7 @@ impl Application for App { } } - fn on_nav_select(&mut self, entity: Entity) -> Command { + fn on_nav_select(&mut self, entity: Entity) -> Task { self.nav_model.activate(entity); if let Some(location) = self.nav_model.data::(entity) { let message = Message::TabMessage(None, tab::Message::Location(location.clone())); @@ -1516,7 +1516,7 @@ impl Application for App { return mounter.mount(data.1.clone()).map(|_| message::none()); } } - Command::none() + Task::none() } fn on_app_exit(&mut self) -> Option { @@ -1527,7 +1527,7 @@ impl Application for App { Some(Message::WindowCloseRequested(id)) } - fn on_context_drawer(&mut self) -> Command { + fn on_context_drawer(&mut self) -> Task { match self.context_page { ContextPage::Preview(..) => { // Persist state of preview page @@ -1537,22 +1537,22 @@ impl Application for App { } _ => {} } - Command::none() + Task::none() } - fn on_escape(&mut self) -> Command { + fn on_escape(&mut self) -> Task { let entity = self.tab_model.active(); // Close dialog if open if self.dialog_pages.pop_front().is_some() { - return Command::none(); + return Task::none(); } // Close gallery mode if open if let Some(tab) = self.tab_model.data_mut::(entity) { if tab.gallery { tab.gallery = false; - return Command::none(); + return Task::none(); } } @@ -1562,7 +1562,7 @@ impl Application for App { // of closing everything on one press if self.core.window.show_context { self.set_show_context(false); - return Command::none(); + return Task::none(); } if self.search_get().is_some() { // Close search if open @@ -1571,12 +1571,12 @@ impl Application for App { if let Some(tab) = self.tab_model.data_mut::(entity) { if tab.context_menu.is_some() { tab.context_menu = None; - return Command::none(); + return Task::none(); } if tab.edit_location.is_some() { tab.edit_location = None; - return Command::none(); + return Task::none(); } let had_focused_button = tab.select_focus_id().is_some(); @@ -1585,15 +1585,15 @@ impl Application for App { // Unfocus if there was a focused button return widget::button::focus(widget::Id::unique()); } - return Command::none(); + return Task::none(); } } - Command::none() + Task::none() } /// Handle application events here. - fn update(&mut self, message: Self::Message) -> Command { + fn update(&mut self, message: Self::Message) -> Task { // Helper for updating config values efficiently macro_rules! config_set { ($name: ident, $value: expr) => { @@ -1709,9 +1709,9 @@ impl Application for App { "com.system76.CosmicFilesDialog".to_string(); } - let (id, command) = window::spawn(settings); + let (id, command) = window::open(settings); self.windows.insert(id, WindowKind::DesktopViewOptions); - return command; + return command.map(|_id| message::none()); } Message::DialogCancel => { self.dialog_pages.pop_front(); @@ -1755,7 +1755,7 @@ impl Application for App { auth, auth_tx, } => { - return Command::perform( + return Task::perform( async move { auth_tx.send(auth).await.unwrap(); message::none() @@ -1769,7 +1769,7 @@ impl Application for App { error: _, } => { //TODO: re-use mounter_key? - return Command::batch([ + return Task::batch([ self.update(Message::NetworkDriveInput(uri)), self.update(Message::NetworkDriveSubmit), ]); @@ -1841,7 +1841,7 @@ impl Application for App { } } Message::DialogUpdateComplete(dialog_page) => { - return Command::batch([ + return Task::batch([ self.update(Message::DialogUpdate(dialog_page)), self.update(Message::DialogComplete), ]); @@ -1951,7 +1951,7 @@ impl Application for App { // Update desktop tabs commands.push(self.update_desktop()); - return Command::batch(commands); + return Task::batch(commands); } Message::MountResult(mounter_key, item, res) => match res { Ok(true) => { @@ -2099,7 +2099,7 @@ impl Application for App { for (entity, location) in needs_reload { commands.push(self.rescan_tab(entity, location, None)); } - return Command::batch(commands); + return Task::batch(commands); } Message::NotifyWatcher(mut watcher_wrapper) => match watcher_wrapper.watcher_opt.take() { @@ -2152,7 +2152,7 @@ impl Application for App { } } Message::OpenInNewTab(entity_opt) => { - return Command::batch(self.selected_paths(entity_opt).into_iter().filter_map( + return Task::batch(self.selected_paths(entity_opt).into_iter().filter_map( |path| { if path.is_dir() { Some(self.open_tab(Location::Path(path), false, None)) @@ -2178,7 +2178,7 @@ impl Application for App { } }, Message::OpenItemLocation(entity_opt) => { - return Command::batch(self.selected_paths(entity_opt).into_iter().filter_map( + return Task::batch(self.selected_paths(entity_opt).into_iter().filter_map( |path| { if let Some(parent) = path.parent() { Some(self.open_tab( @@ -2259,7 +2259,7 @@ impl Application for App { if let Some(tab) = self.tab_model.data_mut::(entity) { if let Some(path) = tab.location.path_opt() { let to = path.clone(); - return clipboard::read_data::(move |contents_opt| { + return clipboard::read_data::().map(move |contents_opt| { match contents_opt { Some(contents) => { message::app(Message::PasteContents(to.clone(), contents)) @@ -2340,7 +2340,7 @@ impl Application for App { commands.push(self.rescan_trash()); // if search is active, update "search" tab view commands.push(self.search()); - return Command::batch(commands); + return Task::batch(commands); } Message::PendingError(id, err) => { if let Some((op, _)) = self.pending_operations.remove(&id) { @@ -2384,7 +2384,7 @@ impl Application for App { "com.system76.CosmicFilesDialog".to_string(); } - let (id, command) = window::spawn(settings); + let (id, command) = window::open(settings); self.windows.insert( id, WindowKind::Preview( @@ -2392,9 +2392,9 @@ impl Application for App { PreviewKind::Location(Location::Path(path)), ), ); - commands.push(command); + commands.push(command.map(|_id| message::none())); } - return Command::batch(commands); + return Task::batch(commands); } } } @@ -2411,7 +2411,7 @@ impl Application for App { .icon_set(entity, widget::icon::icon(tab::trash_icon_symbolic(16))); } - return Command::batch([self.rescan_trash(), self.update_desktop()]); + return Task::batch([self.rescan_trash(), self.update_desktop()]); } Message::Rename(entity_opt) => { @@ -2452,7 +2452,7 @@ impl Application for App { if let Some(dialog_page) = self.dialog_pages.pop_front() { match dialog_page { DialogPage::Replace { tx, .. } => { - return Command::perform( + return Task::perform( async move { let _ = tx.send(replace_result).await; message::none() @@ -2572,10 +2572,12 @@ impl Application for App { // If that was the last tab, close window if self.tab_model.iter().next().is_none() { - return window::close(window::Id::MAIN); + if let Some(window_id) = &self.window_id_opt { + return window::close(*window_id); + } } - return Command::batch([self.update_title(), self.update_watcher()]); + return Task::batch([self.update_title(), self.update_watcher()]); } Message::TabConfig(config) => { if config != self.config.tab { @@ -2591,7 +2593,7 @@ impl Application for App { Message::TabMessage(entity_opt, tab_message) => { let entity = entity_opt.unwrap_or_else(|| self.tab_model.active()); - //TODO: move to Command? + //TODO: move to Task? if let tab::Message::ContextMenu(_point_opt) = tab_message { // Disable side context page self.set_show_context(false); @@ -2626,7 +2628,7 @@ impl Application for App { self.activate_nav_model_location(&tab_path); self.tab_model.text_set(entity, tab_title); - commands.push(Command::batch([ + commands.push(Task::batch([ self.update_title(), self.update_watcher(), self.rescan_tab(entity, tab_path, selection_path), @@ -2639,7 +2641,7 @@ impl Application for App { self.dialog_pages.push_back(DialogPage::EmptyTrash); } tab::Command::Iced(iced_command) => { - commands.push(iced_command.map(move |tab_message| { + commands.push(iced_command.0.map(move |tab_message| { message::app(Message::TabMessage(Some(entity), tab_message)) })); } @@ -2678,14 +2680,18 @@ impl Application for App { self.set_context_title(self.context_page.title()); } tab::Command::WindowDrag => { - commands.push(window::drag(self.main_window_id())); + if let Some(window_id) = &self.window_id_opt { + commands.push(window::drag(*window_id)); + } } tab::Command::WindowToggleMaximize => { - commands.push(window::toggle_maximize(self.main_window_id())); + if let Some(window_id) = &self.window_id_opt { + commands.push(window::toggle_maximize(*window_id)); + } } } } - return Command::batch(commands); + return Task::batch(commands); } Message::TabNew => { let active = self.tab_model.active(); @@ -2766,9 +2772,9 @@ impl Application for App { } Message::WindowClose => { if let Some(window_id) = self.window_id_opt.take() { - return Command::batch([ + return Task::batch([ window::close(window_id), - Command::perform(async move { message::app(Message::MaybeExit) }, |x| x), + Task::perform(async move { message::app(Message::MaybeExit) }, |x| x), ]); } } @@ -2849,8 +2855,8 @@ impl Application for App { if let Some(location) = self.nav_model.data::(entity) { self.nav_dnd_hover = Some((location.clone(), Instant::now())); let location = location.clone(); - return Command::perform(tokio::time::sleep(HOVER_DURATION), move |_| { - cosmic::app::Message::App(Message::DndHoverLocTimeout(location)) + return Task::perform(tokio::time::sleep(HOVER_DURATION), move |_| { + cosmic::app::Message::App(Message::DndHoverLocTimeout(location.clone())) }); } } @@ -2874,11 +2880,11 @@ impl Application for App { )), Location::Trash if matches!(action, DndAction::Move) => { self.operation(Operation::Delete { paths: data.paths }); - Command::none() + Task::none() } _ => { log::warn!("Copy to trash is not supported."); - Command::none() + Task::none() } }; return ret; @@ -2901,7 +2907,7 @@ impl Application for App { }; if let Some(title) = title_opt { self.tab_model.text_set(entity, title); - return Command::batch([ + return Task::batch([ self.update_title(), self.update_watcher(), self.rescan_tab(entity, location, None), @@ -2911,7 +2917,7 @@ impl Application for App { } Message::DndEnterTab(entity) => { self.tab_dnd_hover = Some((entity, Instant::now())); - return Command::perform(tokio::time::sleep(HOVER_DURATION), move |_| { + return Task::perform(tokio::time::sleep(HOVER_DURATION), move |_| { cosmic::app::Message::App(Message::DndHoverTabTimeout(entity)) }); } @@ -2935,11 +2941,11 @@ impl Application for App { )), Location::Trash if matches!(action, DndAction::Move) => { self.operation(Operation::Delete { paths: data.paths }); - Command::none() + Task::none() } _ => { log::warn!("Copy to trash is not supported."); - Command::none() + Task::none() } }; return ret; @@ -3131,7 +3137,7 @@ impl Application for App { None, ); self.windows.insert(surface_id, WindowKind::Desktop(entity)); - return Command::batch([ + return Task::batch([ command, get_layer_surface(SctkLayerSurfaceSettings { id: surface_id, @@ -3173,12 +3179,12 @@ impl Application for App { } Message::Cosmic(cosmic) => { // Forward cosmic messages - return Command::perform(async move { cosmic }, |cosmic| message::cosmic(cosmic)); + return Task::perform(async move { cosmic }, |cosmic| message::cosmic(cosmic)); } Message::None => {} } - Command::none() + Task::none() } fn context_drawer(&self) -> Option> { @@ -3288,7 +3294,7 @@ impl Application for App { }) .into(), ]) - .align_items(Alignment::Center) + .align_y(Alignment::Center) .spacing(space_xxs) .into(), ]) @@ -3396,18 +3402,19 @@ impl Application for App { //TODO: what should submit do? //TODO: button for showing password controls.push( - widget::checkbox(fl!("remember-password"), *remember, move |value| { - Message::DialogUpdate(DialogPage::NetworkAuth { - mounter_key: *mounter_key, - uri: uri.clone(), - auth: MounterAuth { - remember_opt: Some(value), - ..auth.clone() - }, - auth_tx: auth_tx.clone(), + widget::checkbox(fl!("remember-password"), *remember) + .on_toggle(move |value| { + Message::DialogUpdate(DialogPage::NetworkAuth { + mounter_key: *mounter_key, + uri: uri.clone(), + auth: MounterAuth { + remember_opt: Some(value), + ..auth.clone() + }, + auth_tx: auth_tx.clone(), + }) }) - }) - .into(), + .into(), ); } @@ -3540,21 +3547,21 @@ impl Application for App { } else { widget::text(app.name.to_string()).into() }, - widget::horizontal_space(Length::Fill).into(), + widget::horizontal_space().into(), if *selected == i { widget::icon::from_name("checkbox-checked-symbolic") .size(16) .into() } else { - widget::horizontal_space(Length::Fixed(16.0)).into() + widget::Space::with_width(Length::Fixed(16.0)).into() }, ]) .spacing(space_s) .height(Length::Fixed(32.0)) - .align_items(Alignment::Center), + .align_y(Alignment::Center), ) .width(Length::Fill) - .style(theme::Button::MenuItem) + .class(theme::Button::MenuItem) .on_press(Message::OpenWithSelection(i)), ); } @@ -3668,19 +3675,19 @@ impl Application for App { )); if *multiple { dialog - .control(widget::checkbox( - fl!("apply-to-all"), - *apply_to_all, - |apply_to_all| { - Message::DialogUpdate(DialogPage::Replace { - from: from.clone(), - to: to.clone(), - multiple: *multiple, - apply_to_all, - tx: tx.clone(), - }) - }, - )) + .control( + widget::checkbox(fl!("apply-to-all"), *apply_to_all).on_toggle( + |apply_to_all| { + Message::DialogUpdate(DialogPage::Replace { + from: from.clone(), + to: to.clone(), + multiple: *multiple, + apply_to_all, + tx: tx.clone(), + }) + }, + ), + ) .secondary_action( widget::button::standard(fl!("skip")).on_press(Message::ReplaceResult( ReplaceResult::Skip(*apply_to_all), @@ -3710,12 +3717,12 @@ impl Application for App { widget::dialog(fl!("set-executable-and-launch")) .primary_action( widget::button::text(fl!("set-and-launch")) - .style(theme::Button::Suggested) + .class(theme::Button::Suggested) .on_press(Message::DialogComplete), ) .secondary_action( widget::button::text(fl!("cancel")) - .style(theme::Button::Standard) + .class(theme::Button::Standard) .on_press(Message::DialogCancel), ) .control(widget::text::text(fl!( @@ -3818,7 +3825,7 @@ impl Application for App { }) .drag_id(self.tab_drag_id), ) - .style(style::Container::Background) + .class(style::Container::Background) .width(Length::Fill) .padding([0, space_s]), ); @@ -3838,10 +3845,7 @@ impl Application for App { } // The toaster is added on top of an empty element to ensure that it does not override context menus - tab_column = tab_column.push(widget::toaster( - &self.toasts, - widget::horizontal_space(Length::Fill), - )); + tab_column = tab_column.push(widget::toaster(&self.toasts, widget::horizontal_space())); let content: Element<_> = tab_column.into(); @@ -3859,7 +3863,7 @@ impl Application for App { Some(tab) => tab .view(&self.key_binds) .map(move |message| Message::TabMessage(Some(*entity), message)), - None => widget::vertical_space(Length::Fill).into(), + None => widget::vertical_space().into(), }; let mut popover = widget::popover(tab_view); @@ -3869,10 +3873,8 @@ impl Application for App { tab_column = tab_column.push(popover); // The toaster is added on top of an empty element to ensure that it does not override context menus - tab_column = tab_column.push(widget::toaster( - &self.toasts, - widget::horizontal_space(Length::Fill), - )); + tab_column = + tab_column.push(widget::toaster(&self.toasts, widget::horizontal_space())); return tab_column.into(); } @@ -3895,13 +3897,13 @@ impl Application for App { widget::container( widget::scrollable(widget::row::with_children(vec![ content, - widget::horizontal_space(Length::Fixed( + widget::Space::with_width(Length::Fixed( (scrollbar_width + scrollbar_margin).into(), )) .into(), ])) .direction(scrollable::Direction::Vertical( - scrollable::Properties::new() + scrollable::Scrollbar::new() .width(scrollbar_width) .scroller_width(scrollbar_width), )), @@ -3914,7 +3916,7 @@ impl Application for App { space_l, space_l, ]) - .style(theme::Container::WindowBackground) + .class(theme::Container::WindowBackground) .into() } @@ -3924,7 +3926,7 @@ impl Application for App { struct TrashWatcherSubscription; let mut subscriptions = vec![ - event::listen_with(|event, status| match event { + event::listen_with(|event, status, _window_id| match event { Event::Keyboard(KeyEvent::KeyPressed { key, modifiers, .. }) => match status { event::Status::Ignored => Some(Message::Key(modifiers, key)), event::Status::Captured => None, @@ -3932,7 +3934,7 @@ impl Application for App { Event::Keyboard(KeyEvent::ModifiersChanged(modifiers)) => { Some(Message::Modifiers(modifiers)) } - Event::Window(_id, WindowEvent::CloseRequested) => Some(Message::WindowClose), + Event::Window(WindowEvent::CloseRequested) => Some(Message::WindowClose), #[cfg(feature = "wayland")] Event::PlatformSpecific(event::PlatformSpecific::Wayland(wayland_event)) => { match wayland_event { @@ -3969,10 +3971,9 @@ impl Application for App { } Message::SystemThemeModeChange(update.config) }), - subscription::channel( + Subscription::run_with_id( TypeId::of::(), - 100, - |mut output| async move { + stream::channel(100, |mut output| async move { let watcher_res = { let mut output = output.clone(); new_debouncer( @@ -4044,12 +4045,11 @@ impl Application for App { } std::future::pending().await - }, + }), ), - subscription::channel( + Subscription::run_with_id( TypeId::of::(), - 25, - |mut output| async move { + stream::channel(25, |mut output| async move { let watcher_res = new_debouncer( time::Duration::from_millis(250), Some(time::Duration::from_millis(250)), @@ -4110,7 +4110,7 @@ impl Application for App { } std::future::pending().await - }, + }), ), ]; @@ -4137,10 +4137,9 @@ impl Application for App { #[cfg(feature = "notify")] { struct NotificationSubscription; - subscriptions.push(subscription::channel( + subscriptions.push(Subscription::run_with_id( TypeId::of::(), - 1, - move |msg_tx| async move { + stream::channel(1, move |msg_tx| async move { let msg_tx = Arc::new(tokio::sync::Mutex::new(msg_tx)); tokio::task::spawn_blocking(move || { match notify_rust::Notification::new() @@ -4168,7 +4167,7 @@ impl Application for App { .unwrap(); std::future::pending().await - }, + }), )); } } @@ -4178,23 +4177,26 @@ impl Application for App { //TODO: use recipe? let id = *id; let pending_operation = pending_operation.clone(); - subscriptions.push(subscription::channel(id, 16, move |msg_tx| async move { - let msg_tx = Arc::new(tokio::sync::Mutex::new(msg_tx)); - match pending_operation.perform(id, &msg_tx).await { - Ok(()) => { - let _ = msg_tx.lock().await.send(Message::PendingComplete(id)).await; + subscriptions.push(Subscription::run_with_id( + id, + stream::channel(16, move |msg_tx| async move { + let msg_tx = Arc::new(tokio::sync::Mutex::new(msg_tx)); + match pending_operation.perform(id, &msg_tx).await { + Ok(()) => { + let _ = msg_tx.lock().await.send(Message::PendingComplete(id)).await; + } + Err(err) => { + let _ = msg_tx + .lock() + .await + .send(Message::PendingError(id, err.to_string())) + .await; + } } - Err(err) => { - let _ = msg_tx - .lock() - .await - .send(Message::PendingError(id, err.to_string())) - .await; - } - } - std::future::pending().await - })); + std::future::pending().await + }), + )); } for entity in self.tab_model.iter() { diff --git a/src/config.rs b/src/config.rs index a527a88..36153da 100644 --- a/src/config.rs +++ b/src/config.rs @@ -4,7 +4,7 @@ use std::{any::TypeId, num::NonZeroU16, path::PathBuf}; use cosmic::{ cosmic_config::{self, cosmic_config_derive::CosmicConfigEntry, CosmicConfigEntry}, - iced::subscription::Subscription, + iced::Subscription, theme, Application, }; use serde::{Deserialize, Serialize}; diff --git a/src/dialog.rs b/src/dialog.rs index b5bb3cf..db98d3e 100644 --- a/src/dialog.rs +++ b/src/dialog.rs @@ -1,19 +1,14 @@ // Copyright 2023 System76 // SPDX-License-Identifier: GPL-3.0-only -#[cfg(feature = "winit")] -use cosmic::iced::multi_window::Application as IcedApplication; -#[cfg(feature = "wayland")] -use cosmic::iced::Application as IcedApplication; use cosmic::{ - app::{self, cosmic::Cosmic, message, Command, Core}, + app::{self, cosmic::Cosmic, message, Core, Task}, cosmic_config, cosmic_theme, executor, iced::{ event, futures::{self, SinkExt}, keyboard::{Event as KeyEvent, Key, Modifiers}, - subscription::{self, Subscription}, - window, Alignment, Event, Length, Size, + stream, window, Alignment, Event, Length, Size, Subscription, }, theme, widget::{ @@ -156,7 +151,7 @@ impl Dialog { path_opt: Option, mapper: fn(DialogMessage) -> M, on_result: impl Fn(DialogResult) -> M + 'static, - ) -> (Self, Command) { + ) -> (Self, Task) { //TODO: only do this once somehow? crate::localize::localize(); @@ -175,7 +170,7 @@ impl Dialog { settings.platform_specific.application_id = App::APP_ID.to_string(); } - let (window_id, window_command) = window::spawn(settings); + //let (window_id, window_command) = window::open(settings); let core = Core::default(); let flags = Flags { @@ -189,11 +184,13 @@ impl Dialog { None } }), - window_id, + //TODO + window_id: window::Id::NONE, config_handler, config, }; - let (cosmic, cosmic_command) = as IcedApplication>::new((core, flags)); + + let (cosmic, cosmic_command) = Cosmic::::init((core, flags, settings)); ( Self { @@ -201,13 +198,13 @@ impl Dialog { mapper, on_result: Box::new(on_result), }, - Command::batch([window_command, cosmic_command]) + cosmic_command .map(DialogMessage) .map(move |message| app::Message::App(mapper(message))), ) } - pub fn set_title(&mut self, title: impl Into) -> Command { + pub fn set_title(&mut self, title: impl Into) -> Task { let mapper = self.mapper; self.cosmic.app.title = title.into(); self.cosmic @@ -237,7 +234,7 @@ impl Dialog { &mut self, filters: impl Into>, filter_selected: Option, - ) -> Command { + ) -> Task { let mapper = self.mapper; self.cosmic.app.filters = filters.into(); self.cosmic.app.filter_selected = filter_selected; @@ -255,7 +252,7 @@ impl Dialog { .map(self.mapper) } - pub fn update(&mut self, message: DialogMessage) -> Command { + pub fn update(&mut self, message: DialogMessage) -> Task { let mapper = self.mapper; let command = self .cosmic @@ -264,9 +261,9 @@ impl Dialog { .map(move |message| app::Message::App(mapper(message))); if let Some(result) = self.cosmic.app.result_opt.take() { let on_result_message = (self.on_result)(result); - Command::batch([ + Task::batch([ command, - Command::perform(async move { app::Message::App(on_result_message) }, |x| x), + Task::perform(async move { app::Message::App(on_result_message) }, |x| x), ]) } else { command @@ -281,7 +278,7 @@ impl Dialog { } pub fn window_id(&self) -> window::Id { - self.cosmic.app.main_window_id() + self.cosmic.app.flags.window_id } } @@ -421,7 +418,7 @@ impl App { let mut row = widget::row::with_capacity( if !self.filters.is_empty() { 1 } else { 0 } + self.choices.len() * 2 + 3, ) - .align_items(Alignment::Center) + .align_y(Alignment::Center) .spacing(space_xxs); if !self.filters.is_empty() { row = row.push(widget::dropdown( @@ -433,7 +430,7 @@ impl App { for (choice_i, choice) in self.choices.iter().enumerate() { match choice { DialogChoice::CheckBox { label, value, .. } => { - row = row.push(widget::checkbox(label, *value, move |checked| { + row = row.push(widget::checkbox(label, *value).on_toggle(move |checked| { Message::Choice(choice_i, if checked { 1 } else { 0 }) })); } @@ -450,7 +447,7 @@ impl App { } } } - row = row.push(widget::horizontal_space(Length::Fill)); + row = row.push(widget::horizontal_space()); row = row.push(widget::button::standard(fl!("cancel")).on_press(Message::Cancel)); row = row.push(if self.flags.kind.save() { widget::button::suggested(&self.accept_label).on_press(Message::Save(false)) @@ -505,10 +502,10 @@ impl App { widget::settings::view_column(children).into() } - fn rescan_tab(&self) -> Command { + fn rescan_tab(&self) -> Task { let location = self.tab.location.clone(); let icon_sizes = self.tab.config.icon_sizes; - Command::perform( + Task::perform( async move { let location2 = location.clone(); match tokio::task::spawn_blocking(move || location2.scan(icon_sizes)).await { @@ -532,7 +529,7 @@ impl App { } } - fn search_set(&mut self, term_opt: Option) -> Command { + fn search_set(&mut self, term_opt: Option) -> Task { let location_opt = match term_opt { Some(term) => match &self.tab.location { Location::Path(path) | Location::Search(path, ..) => Some(( @@ -553,23 +550,23 @@ impl App { }; if let Some((location, focus_search)) = location_opt { self.tab.change_location(&location, None); - return Command::batch([ + return Task::batch([ self.update_title(), self.update_watcher(), self.rescan_tab(), if focus_search { widget::text_input::focus(self.search_id.clone()) } else { - Command::none() + Task::none() }, ]); } - Command::none() + Task::none() } - fn update_config(&mut self) -> Command { + fn update_config(&mut self) -> Task { self.update_nav_model(); - Command::none() + Task::none() } fn activate_nav_model_location(&mut self, location: &Location) { @@ -657,12 +654,12 @@ impl App { self.activate_nav_model_location(&self.tab.location.clone()); } - fn update_title(&mut self) -> Command { + fn update_title(&mut self) -> Task { self.set_header_title(self.title.clone()); - self.set_window_title(self.title.clone(), self.main_window_id()) + self.set_window_title(self.title.clone(), self.flags.window_id) } - fn update_watcher(&mut self) -> Command { + fn update_watcher(&mut self) -> Task { if let Some((mut watcher, old_paths)) = self.watcher_opt.take() { let mut new_paths = HashSet::new(); if let Some(path) = &self.tab.location.path_opt() { @@ -705,7 +702,7 @@ impl App { } //TODO: should any of this run in a command? - Command::none() + Task::none() } } @@ -732,7 +729,7 @@ impl Application for App { } /// Creates the application, and optionally emits command on initialize. - fn init(mut core: Core, flags: Self::Flags) -> (Self, Command) { + fn init(mut core: Core, flags: Self::Flags) -> (Self, Task) { core.window.context_is_overlay = false; core.window.show_close = false; core.window.show_maximize = false; @@ -785,7 +782,7 @@ impl Application for App { watcher_opt: None, }; - let commands = Command::batch([ + let commands = Task::batch([ app.update_config(), app.update_title(), app.update_watcher(), @@ -795,10 +792,6 @@ impl Application for App { (app, commands) } - fn main_window_id(&self) -> window::Id { - self.flags.window_id - } - fn context_drawer(&self) -> Option> { if !self.core.window.show_context { return None; @@ -822,7 +815,7 @@ impl Application for App { widget::container(self.button_view()) .width(Length::Fill) .padding(space_xxs) - .style(theme::Container::WindowBackground) + .class(theme::Container::WindowBackground) .into(), ]) .into(), @@ -1004,7 +997,7 @@ impl Application for App { None } - fn on_nav_select(&mut self, entity: segmented_button::Entity) -> Command { + fn on_nav_select(&mut self, entity: segmented_button::Entity) -> Task { self.nav_model.activate(entity); if let Some(location) = self.nav_model.data::(entity) { let message = Message::TabMessage(tab::Message::Location(location.clone())); @@ -1016,14 +1009,14 @@ impl Application for App { return mounter.mount(data.1.clone()).map(|_| message::none()); } } - Command::none() + Task::none() } - fn on_escape(&mut self) -> Command { + fn on_escape(&mut self) -> Task { if self.tab.gallery { // Close gallery if open self.tab.gallery = false; - return Command::none(); + return Task::none(); } if self.search_get().is_some() { @@ -1033,13 +1026,13 @@ impl Application for App { if self.tab.context_menu.is_some() { self.tab.context_menu = None; - return Command::none(); + return Task::none(); } if self.tab.edit_location.is_some() { // Close location editing if enabled self.tab.edit_location = None; - return Command::none(); + return Task::none(); } let had_focused_button = self.tab.select_focus_id().is_some(); @@ -1048,19 +1041,19 @@ impl Application for App { // Unfocus if there was a focused button return widget::button::focus(widget::Id::unique()); } - return Command::none(); + return Task::none(); } self.update(Message::Cancel) } /// Handle application events here. - fn update(&mut self, message: Message) -> Command { + fn update(&mut self, message: Message) -> Task { match message { Message::None => {} Message::Cancel => { self.result_opt = Some(DialogResult::Cancel); - return window::close(self.main_window_id()); + return window::close(self.flags.window_id); } Message::Choice(choice_i, option_i) => { if let Some(choice) = self.choices.get_mut(choice_i) { @@ -1187,7 +1180,7 @@ impl Application for App { //TODO: this could change favorites IDs while they are in use self.update_nav_model(); - return Command::batch(commands); + return Task::batch(commands); } Message::NewFolder => { if let Some(path) = self.tab.location.path_opt() { @@ -1293,7 +1286,7 @@ impl Application for App { return self.update(message); } else { // Otherwise, this is not a legal selection - return Command::none(); + return Task::none(); } } } @@ -1301,7 +1294,7 @@ impl Application for App { // If there are proper matching items, return them if !paths.is_empty() { self.result_opt = Some(DialogResult::Open(paths)); - return window::close(self.main_window_id()); + return window::close(self.flags.window_id); } // If we are in directory mode, return the current directory @@ -1309,7 +1302,7 @@ impl Application for App { match &self.tab.location { Location::Path(tab_path) => { self.result_opt = Some(DialogResult::Open(vec![tab_path.clone()])); - return window::close(self.main_window_id()); + return window::close(self.flags.window_id); } _ => {} } @@ -1341,7 +1334,7 @@ impl Application for App { }); } else { self.result_opt = Some(DialogResult::Open(vec![path])); - return window::close(self.main_window_id()); + return window::close(self.flags.window_id); } } } @@ -1388,12 +1381,11 @@ impl Application for App { commands.push(self.update(Message::from(action.message()))); } tab::Command::ChangeLocation(_tab_title, _tab_path, _selection_path) => { - commands - .push(Command::batch([self.update_watcher(), self.rescan_tab()])); + commands.push(Task::batch([self.update_watcher(), self.rescan_tab()])); } tab::Command::Iced(iced_command) => { commands.push( - iced_command.map(|tab_message| { + iced_command.0.map(|tab_message| { message::app(Message::TabMessage(tab_message)) }), ); @@ -1411,17 +1403,17 @@ impl Application for App { self.set_context_title(self.context_page.title()); } tab::Command::WindowDrag => { - commands.push(window::drag(self.main_window_id())); + commands.push(window::drag(self.flags.window_id)); } tab::Command::WindowToggleMaximize => { - commands.push(window::toggle_maximize(self.main_window_id())); + commands.push(window::toggle_maximize(self.flags.window_id)); } unsupported => { log::warn!("{unsupported:?} not supported in dialog mode"); } } } - return Command::batch(commands); + return Task::batch(commands); } Message::TabRescan(location, parent_item_opt, mut items) => { if location == self.tab.location { @@ -1554,7 +1546,7 @@ impl Application for App { } } - Command::none() + Task::none() } /// Creates a view after each update. @@ -1590,7 +1582,7 @@ impl Application for App { fn subscription(&self) -> Subscription { struct WatcherSubscription; let mut subscriptions = vec![ - event::listen_with(|event, status| match event { + event::listen_with(|event, status, _window_id| match event { Event::Keyboard(KeyEvent::KeyPressed { key, modifiers, .. }) => match status { event::Status::Ignored => Some(Message::Key(modifiers, key)), event::Status::Captured => None, @@ -1610,10 +1602,9 @@ impl Application for App { } Message::Config(update.config) }), - subscription::channel( + Subscription::run_with_id( TypeId::of::(), - 100, - |mut output| async move { + stream::channel(100, |mut output| async move { let watcher_res = { let mut output = output.clone(); new_debouncer( @@ -1683,7 +1674,7 @@ impl Application for App { } std::future::pending().await - }, + }), ), self.tab.subscription().map(Message::TabMessage), ]; diff --git a/src/menu.rs b/src/menu.rs index e803e89..a8e9b66 100644 --- a/src/menu.rs +++ b/src/menu.rs @@ -27,11 +27,11 @@ macro_rules! menu_button { vec![$(Element::from($x)),+] ) .height(Length::Fixed(24.0)) - .align_items(Alignment::Center) + .align_y(Alignment::Center) ) .padding([theme::active().cosmic().spacing.space_xxxs, 16]) .width(Length::Fill) - .style(theme::Button::MenuItem) + .class(theme::Button::MenuItem) ); } @@ -62,12 +62,8 @@ pub fn context_menu<'a>( let menu_item = |label, action| { let key = find_key(&action); - menu_button!( - text::body(label), - horizontal_space(Length::Fill), - text::body(key) - ) - .on_press(tab::Message::ContextAction(action)) + menu_button!(text::body(label), horizontal_space(), text::body(key)) + .on_press(tab::Message::ContextAction(action)) }; let (sort_name, sort_direction, _) = tab.sort_options(); @@ -291,10 +287,10 @@ pub fn context_menu<'a>( container(column::with_children(children)) .padding(1) //TODO: move style to libcosmic - .style(theme::Container::custom(|theme| { + .style(|theme| { let cosmic = theme.cosmic(); let component = &cosmic.background.component; - container::Appearance { + container::Style { icon_color: Some(component.on.into()), text_color: Some(component.on.into()), background: Some(Background::Color(component.base.into())), @@ -305,7 +301,7 @@ pub fn context_menu<'a>( }, ..Default::default() } - })) + }) .width(Length::Fixed(260.0)) .into() } @@ -641,10 +637,10 @@ pub fn location_context_menu<'a>(ancestor_index: usize) -> Element<'a, tab::Mess container(column::with_children(children)) .padding(1) - .style(theme::Container::custom(|theme| { + .style(|theme| { let cosmic = theme.cosmic(); let component = &cosmic.background.component; - container::Appearance { + container::Style { icon_color: Some(component.on.into()), text_color: Some(component.on.into()), background: Some(Background::Color(component.base.into())), @@ -655,7 +651,7 @@ pub fn location_context_menu<'a>(ancestor_index: usize) -> Element<'a, tab::Mess }, ..Default::default() } - })) + }) .width(Length::Fixed(240.0)) .into() } diff --git a/src/mounter/gvfs.rs b/src/mounter/gvfs.rs index 03bf5ef..62a6004 100644 --- a/src/mounter/gvfs.rs +++ b/src/mounter/gvfs.rs @@ -1,6 +1,6 @@ use cosmic::{ - iced::{futures::SinkExt, subscription}, - widget, Command, + iced::{futures::SinkExt, stream, Subscription}, + widget, Task, }; use gio::{glib, prelude::*}; use std::{any::TypeId, cell::Cell, future::pending, path::PathBuf, sync::Arc}; @@ -460,9 +460,9 @@ impl Mounter for Gvfs { items_rx.blocking_recv() } - fn mount(&self, item: MounterItem) -> Command<()> { + fn mount(&self, item: MounterItem) -> Task<()> { let command_tx = self.command_tx.clone(); - Command::perform( + Task::perform( async move { command_tx.send(Cmd::Mount(item)).unwrap(); () @@ -471,9 +471,9 @@ impl Mounter for Gvfs { ) } - fn network_drive(&self, uri: String) -> Command<()> { + fn network_drive(&self, uri: String) -> Task<()> { let command_tx = self.command_tx.clone(); - Command::perform( + Task::perform( async move { command_tx.send(Cmd::NetworkDrive(uri)).unwrap(); () @@ -490,9 +490,9 @@ impl Mounter for Gvfs { items_rx.blocking_recv() } - fn unmount(&self, item: MounterItem) -> Command<()> { + fn unmount(&self, item: MounterItem) -> Task<()> { let command_tx = self.command_tx.clone(); - Command::perform( + Task::perform( async move { command_tx.send(Cmd::Unmount(item)).unwrap(); () @@ -501,30 +501,35 @@ impl Mounter for Gvfs { ) } - fn subscription(&self) -> subscription::Subscription { + fn subscription(&self) -> Subscription { let command_tx = self.command_tx.clone(); let event_rx = self.event_rx.clone(); - subscription::channel(TypeId::of::(), 1, |mut output| async move { - command_tx.send(Cmd::Rescan).unwrap(); - while let Some(event) = event_rx.lock().await.recv().await { - match event { - Event::Changed => command_tx.send(Cmd::Rescan).unwrap(), - Event::Items(items) => output.send(MounterMessage::Items(items)).await.unwrap(), - Event::MountResult(item, res) => output - .send(MounterMessage::MountResult(item, res)) - .await - .unwrap(), - Event::NetworkAuth(uri, auth, auth_tx) => output - .send(MounterMessage::NetworkAuth(uri, auth, auth_tx)) - .await - .unwrap(), - Event::NetworkResult(uri, res) => output - .send(MounterMessage::NetworkResult(uri, res)) - .await - .unwrap(), + Subscription::run_with_id( + TypeId::of::(), + stream::channel(1, |mut output| async move { + command_tx.send(Cmd::Rescan).unwrap(); + while let Some(event) = event_rx.lock().await.recv().await { + match event { + Event::Changed => command_tx.send(Cmd::Rescan).unwrap(), + Event::Items(items) => { + output.send(MounterMessage::Items(items)).await.unwrap() + } + Event::MountResult(item, res) => output + .send(MounterMessage::MountResult(item, res)) + .await + .unwrap(), + Event::NetworkAuth(uri, auth, auth_tx) => output + .send(MounterMessage::NetworkAuth(uri, auth, auth_tx)) + .await + .unwrap(), + Event::NetworkResult(uri, res) => output + .send(MounterMessage::NetworkResult(uri, res)) + .await + .unwrap(), + } } - } - pending().await - }) + pending().await + }), + ) } } diff --git a/src/mounter/mod.rs b/src/mounter/mod.rs index 17a6b34..7258df7 100644 --- a/src/mounter/mod.rs +++ b/src/mounter/mod.rs @@ -1,4 +1,4 @@ -use cosmic::{iced::subscription, widget, Command}; +use cosmic::{iced::Subscription, widget, Task}; use once_cell::sync::Lazy; use std::{collections::BTreeMap, fmt, path::PathBuf, sync::Arc}; use tokio::sync::mpsc; @@ -93,11 +93,11 @@ pub enum MounterMessage { pub trait Mounter: Send + Sync { fn items(&self, sizes: IconSizes) -> Option; //TODO: send result - fn mount(&self, item: MounterItem) -> Command<()>; - fn network_drive(&self, uri: String) -> Command<()>; + fn mount(&self, item: MounterItem) -> Task<()>; + fn network_drive(&self, uri: String) -> Task<()>; fn network_scan(&self, uri: &str, sizes: IconSizes) -> Option, String>>; - fn unmount(&self, item: MounterItem) -> Command<()>; - fn subscription(&self) -> subscription::Subscription; + fn unmount(&self, item: MounterItem) -> Task<()>; + fn subscription(&self) -> Subscription; } #[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] diff --git a/src/mouse_area.rs b/src/mouse_area.rs index 3d2ecb8..30054d1 100644 --- a/src/mouse_area.rs +++ b/src/mouse_area.rs @@ -17,8 +17,8 @@ use cosmic::{ overlay, renderer::{self, Quad, Renderer as _}, touch, - widget::{tree, Operation, OperationOutputWrapper, Tree}, - Clipboard, Color, Layout, Length, Point, Rectangle, Shell, Size, Widget, + widget::{tree, Operation, Tree}, + Clipboard, Color, Layout, Length, Point, Rectangle, Shell, Size, Vector, Widget, }, widget::Id, Element, Renderer, Theme, @@ -218,15 +218,21 @@ impl State { let new = if let Some((prev_click, prev_time)) = self.prev_click.take() { if now.duration_since(prev_time) < DOUBLE_CLICK_DURATION { match prev_click.kind() { - mouse::click::Kind::Single => mouse::Click::new(pos, Some(prev_click)), - mouse::click::Kind::Double => mouse::Click::new(pos, Some(prev_click)), - mouse::click::Kind::Triple => mouse::Click::new(pos, Some(prev_click)), + mouse::click::Kind::Single => { + mouse::Click::new(pos, mouse::Button::Left, Some(prev_click)) + } + mouse::click::Kind::Double => { + mouse::Click::new(pos, mouse::Button::Left, Some(prev_click)) + } + mouse::click::Kind::Triple => { + mouse::Click::new(pos, mouse::Button::Left, Some(prev_click)) + } } } else { - mouse::Click::new(pos, None) + mouse::Click::new(pos, mouse::Button::Left, None) } } else { - mouse::Click::new(pos, None) + mouse::Click::new(pos, mouse::Button::Left, None) }; self.prev_click = Some((new.clone(), now)); new @@ -300,7 +306,7 @@ where tree: &mut Tree, layout: Layout<'_>, renderer: &Renderer, - operation: &mut dyn Operation>, + operation: &mut dyn Operation, ) { self.content .as_widget() @@ -406,10 +412,11 @@ where tree: &'b mut Tree, layout: Layout<'_>, renderer: &Renderer, + translation: Vector, ) -> Option> { self.content .as_widget_mut() - .overlay(&mut tree.children[0], layout, renderer) + .overlay(&mut tree.children[0], layout, renderer, translation) } fn drag_destinations( diff --git a/src/tab.rs b/src/tab.rs index bcc22e5..addbfdd 100644 --- a/src/tab.rs +++ b/src/tab.rs @@ -11,10 +11,10 @@ use cosmic::{ futures, futures::SinkExt, keyboard::Modifiers, - subscription::{self, Subscription}, + stream, //TODO: export in cosmic::widget widget::{ - container, horizontal_rule, + container, horizontal_rule, rule, scrollable::{self, AbsoluteOffset, Viewport}, }, Alignment, @@ -25,16 +25,16 @@ use cosmic::{ Point, Rectangle, Size, + Subscription, }, iced_core::{mouse::ScrollDelta, widget::tree}, - iced_style::rule, theme, widget::{ self, menu::{action::MenuAction, key_bind::KeyBind}, - vertical_space, DndDestination, DndSource, Id, Widget, + DndDestination, DndSource, Id, Space, Widget, }, - Element, Theme, + Element, }; use chrono::{DateTime, Utc}; @@ -122,9 +122,9 @@ fn button_appearance( accent: bool, condensed_radius: bool, desktop: bool, -) -> widget::button::Appearance { +) -> widget::button::Style { let cosmic = theme.cosmic(); - let mut appearance = widget::button::Appearance::new(); + let mut appearance = widget::button::Style::new(); if selected { if accent { appearance.background = Some(Color::from(cosmic.accent_color()).into()); @@ -938,6 +938,20 @@ impl Location { } } +pub struct TaskWrapper(pub cosmic::Task); + +impl From> for TaskWrapper { + fn from(task: cosmic::Task) -> Self { + Self(task) + } +} + +impl fmt::Debug for TaskWrapper { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + f.debug_struct("TaskWrapper").finish() + } +} + #[derive(Debug)] pub enum Command { Action(Action), @@ -946,7 +960,7 @@ pub enum Command { ChangeLocation(String, Location, Option), DropFiles(PathBuf, ClipboardPaste), EmptyTrash, - Iced(cosmic::Command), + Iced(TaskWrapper), MoveToTrash(Vec), OpenFile(PathBuf), OpenInNewTab(PathBuf), @@ -1127,7 +1141,7 @@ impl ItemThumbnail { let thumbnail = image.thumbnail(thumbnail_size, thumbnail_size).into_rgba8(); return ItemThumbnail::Image( - widget::image::Handle::from_pixels( + widget::image::Handle::from_rgba( thumbnail.width(), thumbnail.height(), thumbnail.into_raw(), @@ -1186,7 +1200,7 @@ impl ItemThumbnail { Ok(reader) => match reader.decode().map(|image| image.into_rgba8()) { Ok(image) => { return ItemThumbnail::Image( - widget::image::Handle::from_pixels( + widget::image::Handle::from_rgba( image.width(), image.height(), image.into_raw(), @@ -1315,9 +1329,9 @@ impl Item { } column = column.push(widget::row::with_children(vec![ - widget::horizontal_space(Length::Fill).into(), + widget::horizontal_space().into(), self.preview(sizes), - widget::horizontal_space(Length::Fill).into(), + widget::horizontal_space().into(), ])); let mut details = widget::column().spacing(space_xxxs); @@ -2223,23 +2237,25 @@ impl Tab { self.select_rect(rect, mod_ctrl, mod_shift); if self.select_focus.take().is_some() { // Unfocus currently focused button - commands.push(Command::Iced(widget::button::focus(widget::Id::unique()))); + commands.push(Command::Iced( + widget::button::focus(widget::Id::unique()).into(), + )); } } None => {} }, Message::EditLocation(edit_location) => { if self.edit_location.is_none() && edit_location.is_some() { - commands.push(Command::Iced(widget::text_input::focus( - self.edit_location_id.clone(), - ))); + commands.push(Command::Iced( + widget::text_input::focus(self.edit_location_id.clone()).into(), + )); } self.edit_location = edit_location; } Message::EditLocationEnable => { - commands.push(Command::Iced(widget::text_input::focus( - self.edit_location_id.clone(), - ))); + commands.push(Command::Iced( + widget::text_input::focus(self.edit_location_id.clone()).into(), + )); self.edit_location = Some(self.location.clone()); } Message::OpenInNewTab(path) => { @@ -2281,13 +2297,12 @@ impl Tab { self.select_position(row, col, mod_shift); } if let Some(offset) = self.select_focus_scroll() { - commands.push(Command::Iced(scrollable::scroll_to( - self.scrollable_id.clone(), - offset, - ))); + commands.push(Command::Iced( + scrollable::scroll_to(self.scrollable_id.clone(), offset).into(), + )); } if let Some(id) = self.select_focus_id() { - commands.push(Command::Iced(widget::button::focus(id))); + commands.push(Command::Iced(widget::button::focus(id).into())); } } Message::GalleryToggle => { @@ -2342,13 +2357,12 @@ impl Tab { self.select_position(0, 0, mod_shift); } if let Some(offset) = self.select_focus_scroll() { - commands.push(Command::Iced(scrollable::scroll_to( - self.scrollable_id.clone(), - offset, - ))); + commands.push(Command::Iced( + scrollable::scroll_to(self.scrollable_id.clone(), offset).into(), + )); } if let Some(id) = self.select_focus_id() { - commands.push(Command::Iced(widget::button::focus(id))); + commands.push(Command::Iced(widget::button::focus(id).into())); } } } @@ -2396,13 +2410,12 @@ impl Tab { self.select_position(0, 0, mod_shift); } if let Some(offset) = self.select_focus_scroll() { - commands.push(Command::Iced(scrollable::scroll_to( - self.scrollable_id.clone(), - offset, - ))); + commands.push(Command::Iced( + scrollable::scroll_to(self.scrollable_id.clone(), offset).into(), + )); } if let Some(id) = self.select_focus_id() { - commands.push(Command::Iced(widget::button::focus(id))); + commands.push(Command::Iced(widget::button::focus(id).into())); } } } @@ -2433,13 +2446,12 @@ impl Tab { self.select_position(0, 0, mod_shift); } if let Some(offset) = self.select_focus_scroll() { - commands.push(Command::Iced(scrollable::scroll_to( - self.scrollable_id.clone(), - offset, - ))); + commands.push(Command::Iced( + scrollable::scroll_to(self.scrollable_id.clone(), offset).into(), + )); } if let Some(id) = self.select_focus_id() { - commands.push(Command::Iced(widget::button::focus(id))); + commands.push(Command::Iced(widget::button::focus(id).into())); } } } @@ -2472,13 +2484,12 @@ impl Tab { self.select_position(0, 0, mod_shift); } if let Some(offset) = self.select_focus_scroll() { - commands.push(Command::Iced(scrollable::scroll_to( - self.scrollable_id.clone(), - offset, - ))); + commands.push(Command::Iced( + scrollable::scroll_to(self.scrollable_id.clone(), offset).into(), + )); } if let Some(id) = self.select_focus_id() { - commands.push(Command::Iced(widget::button::focus(id))); + commands.push(Command::Iced(widget::button::focus(id).into())); } } } @@ -2587,10 +2598,9 @@ impl Tab { } Message::ScrollToFocus => { if let Some(offset) = self.select_focus_scroll() { - commands.push(Command::Iced(scrollable::scroll_to( - self.scrollable_id.clone(), - offset, - ))); + commands.push(Command::Iced( + scrollable::scroll_to(self.scrollable_id.clone(), offset).into(), + )); } } Message::SearchContext(location, context) => { @@ -2653,7 +2663,9 @@ impl Tab { self.select_all(); if self.select_focus.take().is_some() { // Unfocus currently focused button - commands.push(Command::Iced(widget::button::focus(widget::Id::unique()))); + commands.push(Command::Iced( + widget::button::focus(widget::Id::unique()).into(), + )); } } Message::SetSort(heading_option, dir) => { @@ -2756,13 +2768,16 @@ impl Tab { Message::DndEnter(loc) => { self.dnd_hovered = Some((loc.clone(), Instant::now())); if loc != self.location { - commands.push(Command::Iced(cosmic::Command::perform( - async move { - tokio::time::sleep(HOVER_DURATION).await; - Message::DndHover(loc) - }, - |x| x, - ))); + commands.push(Command::Iced( + cosmic::Task::perform( + async move { + tokio::time::sleep(HOVER_DURATION).await; + Message::DndHover(loc) + }, + |x| x, + ) + .into(), + )); } } Message::DndLeave(loc) => { @@ -2788,10 +2803,9 @@ impl Tab { if self.scroll_opt.is_none() { let offset = AbsoluteOffset { x: 0.0, y: 0.0 }; self.scroll_opt = Some(offset); - commands.push(Command::Iced(scrollable::scroll_to( - self.scrollable_id.clone(), - offset, - ))); + commands.push(Command::Iced( + scrollable::scroll_to(self.scrollable_id.clone(), offset).into(), + )); } // Change directory if requested @@ -2940,7 +2954,7 @@ impl Tab { let location2 = location.clone(); let location3 = location.clone(); let is_dnd_hovered = self.dnd_hovered.as_ref().map(|(l, _)| l) == Some(&location); - widget::container( + let mut container = widget::container( DndDestination::for_data::(element, move |data, action| { if let Some(mut data) = data { if action == DndAction::Copy { @@ -2958,13 +2972,10 @@ impl Tab { }) .on_enter(move |_, _, _| Message::DndEnter(location2.clone())) .on_leave(move || Message::DndLeave(location3.clone())), - ) - .style(if is_dnd_hovered { - theme::Container::custom(|t| { - let mut a = cosmic::iced_style::container::StyleSheet::appearance( - t, - &theme::Container::default(), - ); + ); + if is_dnd_hovered { + container = container.style(|t| { + let mut a = widget::container::Style::default(); let t = t.cosmic(); // todo use theme drop target color let mut bg = t.accent_color(); @@ -2976,11 +2987,9 @@ impl Tab { radius: t.radius_s().into(), }; a - }) - } else { - theme::Container::default() - }) - .into() + }); + } + container.into() } pub fn gallery_view(&self) -> Element { @@ -3040,20 +3049,20 @@ impl Tab { } let mut column = widget::column::with_capacity(2); - column = column.push(widget::vertical_space(Length::Fixed(space_m.into()))); + column = column.push(widget::Space::with_height(Length::Fixed(space_m.into()))); { - let mut row = widget::row::with_capacity(5).align_items(Alignment::Center); - row = row.push(widget::horizontal_space(Length::Fill)); + let mut row = widget::row::with_capacity(5).align_y(Alignment::Center); + row = row.push(widget::horizontal_space()); if let Some(name) = name_opt { row = row.push(name); } - row = row.push(widget::horizontal_space(Length::Fill)); + row = row.push(widget::horizontal_space()); row = row.push( widget::button::icon(widget::icon::from_name("window-close-symbolic")) - .style(theme::Button::Standard) + .class(theme::Button::Standard) .on_press(Message::Gallery(false)), ); - row = row.push(widget::horizontal_space(Length::Fixed(space_m.into()))); + row = row.push(widget::Space::with_width(Length::Fixed(space_m.into()))); // This mouse area provides window drag while the header bar is hidden let mouse_area = mouse_area::MouseArea::new(row) .on_drag(|_| Message::WindowDrag) @@ -3061,44 +3070,44 @@ impl Tab { column = column.push(mouse_area); } { - let mut row = widget::row::with_capacity(7).align_items(Alignment::Center); - row = row.push(widget::horizontal_space(Length::Fixed(space_m.into()))); + let mut row = widget::row::with_capacity(7).align_y(Alignment::Center); + row = row.push(widget::Space::with_width(Length::Fixed(space_m.into()))); row = row.push( widget::button::icon(widget::icon::from_name("go-previous-symbolic")) .padding(space_xs) - .style(theme::Button::Standard) + .class(theme::Button::Standard) .on_press(Message::GalleryPrevious), ); - row = row.push(widget::horizontal_space(Length::Fixed(space_xxs.into()))); + row = row.push(widget::Space::with_width(Length::Fixed(space_xxs.into()))); if let Some(element) = element_opt { row = row.push(element); } else { //TODO: what to do when no image? row = row.push(widget::Space::new(Length::Fill, Length::Fill)); } - row = row.push(widget::horizontal_space(Length::Fixed(space_xxs.into()))); + row = row.push(widget::Space::with_width(Length::Fixed(space_xxs.into()))); row = row.push( widget::button::icon(widget::icon::from_name("go-next-symbolic")) .padding(space_xs) - .style(theme::Button::Standard) + .class(theme::Button::Standard) .on_press(Message::GalleryNext), ); - row = row.push(widget::horizontal_space(Length::Fixed(space_m.into()))); + row = row.push(widget::Space::with_width(Length::Fixed(space_m.into()))); column = column.push(row); } widget::container(column) .width(Length::Fill) .height(Length::Fill) - .style(theme::Container::Custom(Box::new(|theme| { + .style(|theme| { let cosmic = theme.cosmic(); let mut bg = cosmic.bg_color(); bg.alpha = 0.75; - widget::container::Appearance { + widget::container::Style { background: Some(Color::from(bg).into()), ..Default::default() } - }))) + }) .into() } @@ -3110,7 +3119,7 @@ impl Tab { font_size: f32, line_height: f32, ) -> f32 { - let text: text::Text<'a, font::Font> = text::Text { + let text: text::Text<&'a str, font::Font> = text::Text { content, bounds: Size::INFINITY, size: font_size.into(), @@ -3119,7 +3128,7 @@ impl Tab { horizontal_alignment: Horizontal::Left, vertical_alignment: Vertical::Top, shaping: text::Shaping::default(), - wrap: text::Wrap::None, + wrapping: text::Wrapping::None, }; graphics::text::Paragraph::with_text(text) .min_bounds() @@ -3144,14 +3153,14 @@ impl Tab { let size = self.size_opt.get().unwrap_or(Size::new(0.0, 0.0)); let mut row = widget::row::with_capacity(5) - .align_items(Alignment::Center) + .align_y(Alignment::Center) .padding([space_xxxs, 0]); let mut w = 0.0; let mut prev_button = widget::button::custom(widget::icon::from_name("go-previous-symbolic").size(16)) .padding(space_xxs) - .style(theme::Button::Icon); + .class(theme::Button::Icon); if self.history_i > 0 && !self.history.is_empty() { prev_button = prev_button.on_press(Message::GoPrevious); } @@ -3161,14 +3170,14 @@ impl Tab { let mut next_button = widget::button::custom(widget::icon::from_name("go-next-symbolic").size(16)) .padding(space_xxs) - .style(theme::Button::Icon); + .class(theme::Button::Icon); if self.history_i + 1 < self.history.len() { next_button = next_button.on_press(Message::GoNext); } row = row.push(next_button); w += 16.0 + 2.0 * space_xxs as f32; - row = row.push(widget::horizontal_space(Length::Fixed(space_s.into()))); + row = row.push(widget::Space::with_width(Length::Fixed(space_s.into()))); w += space_s as f32; //TODO: allow resizing? @@ -3180,7 +3189,7 @@ impl Tab { let (sort_name, sort_direction, _) = self.sort_options(); let heading_item = |name, width, msg| { let mut row = widget::row::with_capacity(2) - .align_items(Alignment::Center) + .align_y(Alignment::Center) .spacing(space_xxs) .width(width); row = row.push(widget::text::heading(name)); @@ -3216,7 +3225,7 @@ impl Tab { }, heading_item(fl!("size"), Length::Fixed(size_width), HeadingOptions::Size), ]) - .align_items(Alignment::Center) + .align_y(Alignment::Center) .height(Length::Fixed((space_m + 4).into())) .padding([0, space_xxs]) .spacing(space_xxs); @@ -3230,7 +3239,7 @@ impl Tab { ) .on_press(Message::EditLocation(None)) .padding(space_xxs) - .style(theme::Button::Icon), + .class(theme::Button::Icon), ); row = row.push( widget::text_input("", path.to_string_lossy()) @@ -3243,8 +3252,8 @@ impl Tab { ); let mut column = widget::column::with_capacity(4).padding([0, space_s]); column = column.push(row); - column = column.push(horizontal_rule(1).style(theme::Rule::Custom(Box::new( - |theme: &Theme| rule::Appearance { + column = column.push(horizontal_rule(1).class(theme::Rule::Custom(Box::new( + |theme| rule::Style { color: theme.cosmic().accent_color().into(), width: 1, radius: 0.0.into(), @@ -3262,7 +3271,7 @@ impl Tab { crate::mouse_area::MouseArea::new( widget::button::custom(widget::icon::from_name("edit-symbolic").size(16)) .padding(space_xxs) - .style(theme::Button::Icon) + .class(theme::Button::Icon) .on_press(Message::EditLocation(Some(self.location.clone()))), ) .on_middle_press(move |_| Message::OpenInNewTab(path.clone())), @@ -3280,7 +3289,7 @@ impl Tab { let (name_width, name_text) = if children.is_empty() { ( text_width_heading(&name), - widget::text::heading(name).wrap(text::Wrap::None), + widget::text::heading(name).wrapping(text::Wrapping::None), ) } else { children.push( @@ -3292,7 +3301,7 @@ impl Tab { w += 16.0; ( text_width_body(&name), - widget::text::body(name).wrap(text::Wrap::None), + widget::text::body(name).wrapping(text::Wrapping::None), ) }; @@ -3300,7 +3309,7 @@ impl Tab { w += 2.0 * space_xxxs as f32; let mut row = widget::row::with_capacity(2) - .align_items(Alignment::Center) + .align_y(Alignment::Center) .spacing(space_xxxs); //TODO: figure out why this hardcoded offset is needed after the first item is ellipsed let overflow_offset = 64.0; @@ -3317,7 +3326,7 @@ impl Tab { let mut mouse_area = crate::mouse_area::MouseArea::new( widget::button::custom(row) .padding(space_xxxs) - .style(theme::Button::Link) + .class(theme::Button::Link) .on_press(Message::Location(location.clone())), ); @@ -3351,7 +3360,7 @@ impl Tab { widget::button::custom(widget::text::heading(fl!("trash"))) .padding(space_xxxs) .on_press(Message::Location(Location::Trash)) - .style(theme::Button::Text) + .class(theme::Button::Text) .into(), ); } @@ -3360,7 +3369,7 @@ impl Tab { widget::button::custom(widget::text::heading(fl!("recents"))) .padding(space_xxxs) .on_press(Message::Location(Location::Recents)) - .style(theme::Button::Text) + .class(theme::Button::Text) .into(), ); } @@ -3372,7 +3381,7 @@ impl Tab { uri.clone(), display_name.clone(), ))) - .style(theme::Button::Text) + .class(theme::Button::Text) .into(), ); } @@ -3383,14 +3392,14 @@ impl Tab { } let mut column = widget::column::with_capacity(4).padding([0, space_s]); column = column.push(row); - column = column.push(horizontal_rule(1).style(theme::Rule::Custom(Box::new( - |theme: &Theme| rule::Appearance { + column = column.push( + horizontal_rule(1).class(theme::Rule::Custom(Box::new(|theme| rule::Style { color: theme.cosmic().accent_color().into(), width: 1, radius: 0.0.into(), fill_mode: rule::FillMode::Full, - }, - )))); + }))), + ); if self.config.view == View::List && !condensed { column = column.push(heading_row); @@ -3435,7 +3444,7 @@ impl Tab { ], Mode::Desktop => Vec::new(), }) - .align_items(Alignment::Center) + .align_x(Alignment::Center) .spacing(space_xxs), ) .align_x(Horizontal::Center) @@ -3446,13 +3455,7 @@ impl Tab { .into() } - pub fn grid_view( - &self, - ) -> ( - Option>>, - Element, - bool, - ) { + pub fn grid_view(&self) -> (Option>, Element, bool) { let cosmic_theme::Spacing { space_m, space_xxs, @@ -3543,26 +3546,26 @@ impl Tab { .size(icon_sizes.grid()), ) .padding(space_xxxs) - .style(button_style(item.selected, false, false, false)) + .class(button_style(item.selected, false, false, false)) .into(), widget::tooltip( widget::button::custom(widget::text::body(&item.display_name)) .id(item.button_id.clone()) .padding([0, space_xxxs]) - .style(button_style( + .class(button_style( item.selected, true, true, matches!(self.mode, Mode::Desktop), )), - &item.name, + widget::text::body(&item.name), widget::tooltip::Position::Bottom, ) .into(), ]; let mut column = widget::column::with_capacity(buttons.len()) - .align_items(Alignment::Center) + .align_x(Alignment::Center) .height(Length::Fixed(item_height as f32)) .width(Length::Fixed(item_width as f32)); for button in buttons { @@ -3660,7 +3663,7 @@ impl Tab { let spacer_height = height.checked_sub(max_bottom + top_deduct).unwrap_or(0); if spacer_height > 0 { children.push( - widget::container(vertical_space(Length::Fixed(spacer_height as f32))) + widget::container(Space::with_height(Length::Fixed(spacer_height as f32))) .into(), ) } @@ -3690,7 +3693,7 @@ impl Tab { ) .on_press(Message::Click(Some(*i))) .padding(space_xxxs) - .style(button_style( + .class(button_style( item.selected, false, false, @@ -3700,11 +3703,11 @@ impl Tab { .id(item.button_id.clone()) .on_press(Message::Click(Some(*i))) .padding([0, space_xxxs]) - .style(button_style(item.selected, true, true, false)), + .class(button_style(item.selected, true, true, false)), ]; let mut column = widget::column::with_capacity(buttons.len()) - .align_items(Alignment::Center) + .align_x(Alignment::Center) .height(Length::Fixed(item_height as f32)) .width(Length::Fixed(item_width as f32)); for button in buttons { @@ -3715,14 +3718,13 @@ impl Tab { dnd_item_i += 1; } else { dnd_grid = dnd_grid.push( - widget::container(vertical_space(item_width as f32)) + widget::container(Space::with_height(item_width as f32)) .height(Length::Fixed(item_height as f32)), ); } } } Element::from(dnd_grid) - .map(|m| cosmic::app::Message::App(crate::app::Message::TabMessage(None, m))) }), mouse_area::MouseArea::new( widget::container(widget::column::with_children(children)).width(Length::Fill), @@ -3737,13 +3739,7 @@ impl Tab { ) } - pub fn list_view( - &self, - ) -> ( - Option>>, - Element, - bool, - ) { + pub fn list_view(&self) -> (Option>, Element, bool) { let cosmic_theme::Spacing { space_m, space_s, @@ -3863,7 +3859,7 @@ impl Tab { .into(), ]) .height(Length::Fixed(row_height as f32)) - .align_items(Alignment::Center) + .align_y(Alignment::Center) .spacing(space_xxs) } else if is_search { widget::row::with_children(vec![ @@ -3889,7 +3885,7 @@ impl Tab { .into(), ]) .height(Length::Fixed(row_height as f32)) - .align_items(Alignment::Center) + .align_y(Alignment::Center) .spacing(space_xxs) } else { widget::row::with_children(vec![ @@ -3908,7 +3904,7 @@ impl Tab { .into(), ]) .height(Length::Fixed(row_height as f32)) - .align_items(Alignment::Center) + .align_y(Alignment::Center) .spacing(space_xxs) }; @@ -3918,7 +3914,7 @@ impl Tab { .width(Length::Fill) .id(item.button_id.clone()) .padding([0, space_xxs]) - .style(button_style(item.selected, true, false, false)), + .class(button_style(item.selected, true, false, false)), ) .on_press(move |_| Message::Click(Some(i))) .on_double_click(move |_| Message::DoubleClick(Some(i))) @@ -3944,7 +3940,7 @@ impl Tab { if item.selected || !drag_items.is_empty() { let dnd_row = if !item.selected { - Element::from(vertical_space(Length::Fixed(row_height as f32))) + Element::from(Space::with_height(Length::Fixed(row_height as f32))) } else if condensed { widget::row::with_children(vec![ widget::icon::icon(item.icon_handle_list_condensed.clone()) @@ -3958,7 +3954,7 @@ impl Tab { ]) .into(), ]) - .align_items(Alignment::Center) + .align_y(Alignment::Center) .spacing(space_xxs) .into() } else if is_search { @@ -3984,7 +3980,7 @@ impl Tab { .width(Length::Fixed(size_width)) .into(), ]) - .align_items(Alignment::Center) + .align_y(Alignment::Center) .spacing(space_xxs) .into() } else { @@ -4003,7 +3999,7 @@ impl Tab { .width(Length::Fixed(size_width)) .into(), ]) - .align_items(Alignment::Center) + .align_y(Alignment::Center) .spacing(space_xxs) .into() }; @@ -4039,14 +4035,13 @@ impl Tab { let spacer_height = size.height - y as f32 - top_deduct as f32; if spacer_height > 0. { - children - .push(widget::container(vertical_space(Length::Fixed(spacer_height))).into()); + children.push( + widget::container(Space::with_height(Length::Fixed(spacer_height))).into(), + ); } } - let drag_col = (!drag_items.is_empty()).then(|| { - Element::from(widget::column::with_children(drag_items)) - .map(|m| cosmic::app::Message::App(crate::app::Message::TabMessage(None, m))) - }); + let drag_col = (!drag_items.is_empty()) + .then(|| Element::from(widget::column::with_children(drag_items))); ( drag_col, @@ -4099,22 +4094,19 @@ impl Tab { .collect::>() }) .unwrap_or_default(); - let item_view = DndSource::<_, cosmic::app::Message, ClipboardCopy>::with_id( - item_view, - Id::new("tab-view"), - ); + let item_view = + DndSource::::with_id(item_view, Id::new("tab-view")); let item_view = match drag_list { Some(drag_list) if self.selected_clicked => { - let drag_list = ArcElementWrapper(Arc::new(Mutex::new(drag_list))); + let drag_list = ArcElementWrapper::(Arc::new(Mutex::new(drag_list))); item_view .drag_content(move || { ClipboardCopy::new(crate::clipboard::ClipboardKind::Copy, &files) }) .drag_icon(move || { - let state: tree::State = - Widget::, _, _>::state(&drag_list); - (drag_list.clone().into(), state) + let state: tree::State = Widget::::state(&drag_list); + (Element::from(drag_list.clone()).map(|_m| ()), state) }) } _ => item_view, @@ -4164,7 +4156,7 @@ impl Tab { if !items.is_empty() { tab_column = tab_column.push( widget::layer_container(widget::row::with_children(vec![ - widget::horizontal_space(Length::Fill).into(), + widget::horizontal_space().into(), widget::button::standard(fl!("empty-trash")) .on_press(Message::EmptyTrash) .into(), @@ -4178,7 +4170,7 @@ impl Tab { Location::Network(uri, _display_name) if uri == "network:///" => { tab_column = tab_column.push( widget::layer_container(widget::row::with_children(vec![ - widget::horizontal_space(Length::Fill).into(), + widget::horizontal_space().into(), widget::button::standard(fl!("add-network-drive")) .on_press(Message::AddNetworkDrive) .into(), @@ -4194,11 +4186,8 @@ impl Tab { .width(Length::Fill); if self.dnd_hovered.as_ref().map(|(l, _)| l) == Some(&tab_location) { - tab_view = tab_view.style(cosmic::theme::Container::custom(|t| { - let mut a = cosmic::iced_style::container::StyleSheet::appearance( - t, - &cosmic::theme::Container::default(), - ); + tab_view = tab_view.style(|t| { + let mut a = widget::container::Style::default(); let c = t.cosmic(); a.border = cosmic::iced_core::Border { color: (c.accent_color()).into(), @@ -4206,7 +4195,7 @@ impl Tab { radius: c.radius_0().into(), }; a - })); + }); } let tab_location_2 = self.location.clone(); @@ -4287,10 +4276,9 @@ impl Tab { continue; }; let mime = item.mime.clone(); - subscriptions.push(subscription::channel( + subscriptions.push(Subscription::run_with_id( path.clone(), - 1, - |mut output| async move { + stream::channel(1, |mut output| async move { let message = { let path = path.clone(); tokio::task::spawn_blocking(move || { @@ -4312,7 +4300,7 @@ impl Tab { } std::future::pending().await - }, + }), )); if subscriptions.len() >= jobs { @@ -4327,10 +4315,9 @@ impl Tab { let term = term.clone(); let show_hidden = *show_hidden; let start = start.clone(); - subscriptions.push(subscription::channel( + subscriptions.push(Subscription::run_with_id( location.clone(), - 2, - move |mut output| async move { + stream::channel(2, move |mut output| async move { //TODO: optimal size? let (results_tx, results_rx) = mpsc::channel(65536); @@ -4408,7 +4395,7 @@ impl Tab { let _ = output.lock().await.send(Message::SearchReady(true)).await; std::future::pending().await - }, + }), )); } @@ -4846,7 +4833,7 @@ impl Widget for ArcElementWrapper { state: &mut tree::Tree, layout: cosmic::iced_core::Layout<'_>, renderer: &cosmic::Renderer, - operation: &mut dyn widget::Operation>, + operation: &mut dyn widget::Operation, ) { self.0 .lock() @@ -4891,6 +4878,7 @@ impl Widget for ArcElementWrapper { _state: &'a mut tree::Tree, _layout: cosmic::iced_core::Layout<'_>, _renderer: &cosmic::Renderer, + _translation: cosmic::iced_core::Vector, ) -> Option> { // TODO None