From d9a96866393ea727be06cfb91cff2b6a94ab6341 Mon Sep 17 00:00:00 2001 From: Eduardo Flores Date: Sat, 26 Oct 2024 15:08:47 +0200 Subject: [PATCH] chore: update libcosmic and improve error handling --- Cargo.lock | 1200 ++++++++++++---------- src/app.rs | 23 +- src/content.rs | 28 +- src/core/Cargo.toml | 2 +- src/core/src/error.rs | 33 + src/core/src/lib.rs | 2 + src/core/src/models/list.rs | 2 + src/core/src/service.rs | 7 +- src/core/src/services/computer.rs | 22 +- src/core/src/services/computer/engine.rs | 41 +- src/core/src/task_service.rs | 26 +- src/details.rs | 21 +- src/main.rs | 1 + src/todo.rs | 24 +- 14 files changed, 787 insertions(+), 645 deletions(-) create mode 100644 src/core/src/error.rs diff --git a/Cargo.lock b/Cargo.lock index b30d246..e703b6f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -20,64 +20,75 @@ 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#956955342dadab7e588e21be726817fca39510f3" + +[[package]] +name = "accesskit_atspi_common" +version = "0.9.0" +source = "git+https://github.com/wash2/accesskit?tag=iced-xdg-surface-0.13#956955342dadab7e588e21be726817fca39510f3" +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#956955342dadab7e588e21be726817fca39510f3" 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#956955342dadab7e588e21be726817fca39510f3" 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#956955342dadab7e588e21be726817fca39510f3" 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", "zbus 3.15.2", ] [[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#956955342dadab7e588e21be726817fca39510f3" 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#956955342dadab7e588e21be726817fca39510f3" dependencies = [ "accesskit", "accesskit_macos", @@ -144,12 +155,12 @@ 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.5.0", + "bitflags 2.6.0", "cc", "cesu8", "jni", @@ -158,7 +169,7 @@ dependencies = [ "log", "ndk", "ndk-context", - "ndk-sys", + "ndk-sys 0.6.0+11769913", "num_enum", "thiserror", ] @@ -235,9 +246,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.86" +version = "1.0.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" +checksum = "c042108f3ed77fd83760a5fd79b53be043192bb3b9dba91d8c574c0ada7850c8" [[package]] name = "apply" @@ -268,9 +279,9 @@ checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" [[package]] name = "arrayvec" -version = "0.7.4" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" [[package]] name = "as-raw-xcb-connection" @@ -280,11 +291,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]] @@ -293,7 +304,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", @@ -370,18 +381,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" @@ -657,20 +656,26 @@ 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 = "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" @@ -686,9 +691,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.5.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" dependencies = [ "serde", ] @@ -708,33 +713,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" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e58aa60e59d8dbfcc36138f5f18be5f24394d33b38b24f7fd0b1caa33095f22f" +checksum = "2c132eebf10f5cad5289222520a4a058514204aed6d791f1cf4fe8088b82d15f" dependencies = [ - "block-sys", - "objc2 0.5.2", + "objc2", ] [[package]] @@ -794,27 +779,13 @@ version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" -[[package]] -name = "calloop" -version = "0.12.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fba7adb4dd5aa98e5553510223000e7148f621165ec5f9acd7113f6ca4995298" -dependencies = [ - "bitflags 2.5.0", - "log", - "polling 3.7.0", - "rustix 0.38.34", - "slab", - "thiserror", -] - [[package]] name = "calloop" version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b99da2f8558ca23c71f4fd15dc57c906239752dd27ff3c00a1d56b685b7cbfec" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "log", "polling 3.7.0", "rustix 0.38.34", @@ -822,25 +793,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.34", - "wayland-backend", - "wayland-client 0.31.4", -] - [[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.34", "wayland-backend", "wayland-client 0.31.4", @@ -933,7 +892,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#a83bf83784276aaa882ef13555295a2ad9edd265" dependencies = [ "objc", "objc-foundation", @@ -943,7 +902,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#a83bf83784276aaa882ef13555295a2ad9edd265" dependencies = [ "dnd", "mime", @@ -953,7 +912,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#a83bf83784276aaa882ef13555295a2ad9edd265" dependencies = [ "thiserror", "x11rb 0.13.1", @@ -1124,7 +1083,7 @@ dependencies = [ [[package]] name = "cosmic-config" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic.git#173a9557c2f03bc5fda132e884c11bf8661256ff" +source = "git+https://github.com/pop-os/libcosmic.git#fde0516484750e0a7d2499e54964c5ed6ba8e16b" dependencies = [ "atomicwrites 0.4.2", "cosmic-config-derive", @@ -1146,7 +1105,7 @@ dependencies = [ [[package]] name = "cosmic-config-derive" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic.git#173a9557c2f03bc5fda132e884c11bf8661256ff" +source = "git+https://github.com/pop-os/libcosmic.git#fde0516484750e0a7d2499e54964c5ed6ba8e16b" dependencies = [ "quote", "syn 1.0.109", @@ -1165,13 +1124,13 @@ name = "cosmic-text" version = "0.12.1" source = "git+https://github.com/pop-os/cosmic-text.git#4fe90bb6126c22f589b46768d7754d65ae300c5e" dependencies = [ - "bitflags 2.5.0", - "fontdb", + "bitflags 2.6.0", + "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", @@ -1186,7 +1145,7 @@ dependencies = [ [[package]] name = "cosmic-theme" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic.git#173a9557c2f03bc5fda132e884c11bf8661256ff" +source = "git+https://github.com/pop-os/libcosmic.git#fde0516484750e0a7d2499e54964c5ed6ba8e16b" dependencies = [ "almost", "cosmic-config", @@ -1322,11 +1281,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.5.0", - "libloading 0.8.3", + "bitflags 2.6.0", + "libloading", "winapi", ] @@ -1492,7 +1452,7 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "330c60081dcc4c72131f8eb70510f1ac07223e5d4163db481a04a0befcffa412" dependencies = [ - "libloading 0.8.3", + "libloading", ] [[package]] @@ -1507,15 +1467,24 @@ 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#a83bf83784276aaa882ef13555295a2ad9edd265" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "mime", "raw-window-handle", - "smithay-client-toolkit 0.19.1", + "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 = "dotenvy" version = "0.15.7" @@ -1528,13 +1497,18 @@ 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#b1852274c0251d7f24ba2cb32fa53812b37b1c79" + [[package]] name = "drm" version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a0f8a69e60d75ae7dab4ef26a59ca99f2a89d4c142089b537775ae0c198bdcde" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "bytemuck", "drm-ffi", "drm-fourcc", @@ -1860,7 +1834,7 @@ dependencies = [ "fluent-syntax", "intl-memoizer", "intl_pluralrules", - "rustc-hash", + "rustc-hash 1.1.0", "self_cell 0.10.3", "smallvec", "unic-langid", @@ -1916,7 +1890,7 @@ version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a595cb550439a117696039dfc69830492058211b771a2a165379f2a1a53d84d" dependencies = [ - "roxmltree", + "roxmltree 0.19.0", ] [[package]] @@ -1933,6 +1907,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.4", + "slotmap", + "tinyvec", + "ttf-parser 0.21.1", +] + [[package]] name = "foreign-types" version = "0.5.0" @@ -2180,16 +2168,6 @@ dependencies = [ "wasi", ] -[[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" @@ -2219,9 +2197,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 = "glow" @@ -2237,31 +2215,20 @@ 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 = "gpu-alloc" version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fbcd2dba93594b227a1f57ee09b8b9da8892c34d55aa332e034a228d0fe6a171" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "gpu-alloc-types", ] @@ -2271,14 +2238,14 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "98ff03b468aa837d70984d55f5d3f846f6ec31fe34bbb97c4f85219caeee1ca4" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", ] [[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", @@ -2289,22 +2256,22 @@ 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.5.0", + "bitflags 2.6.0", "gpu-descriptor-types", "hashbrown", ] [[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.5.0", + "bitflags 2.6.0", ] [[package]] @@ -2358,10 +2325,10 @@ version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "af2a7e73e1f34c48da31fb668a907f250794837e08faa144fd24f0b8b741e890" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "com", "libc", - "libloading 0.8.3", + "libloading", "thiserror", "widestring", "winapi", @@ -2493,7 +2460,7 @@ dependencies = [ "iana-time-zone-haiku", "js-sys", "wasm-bindgen", - "windows-core", + "windows-core 0.52.0", ] [[package]] @@ -2507,8 +2474,8 @@ dependencies = [ [[package]] name = "iced" -version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#173a9557c2f03bc5fda132e884c11bf8661256ff" +version = "0.14.0-dev" +source = "git+https://github.com/pop-os/libcosmic.git#fde0516484750e0a7d2499e54964c5ed6ba8e16b" dependencies = [ "dnd", "iced_accessibility", @@ -2526,7 +2493,7 @@ dependencies = [ [[package]] name = "iced_accessibility" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic.git#173a9557c2f03bc5fda132e884c11bf8661256ff" +source = "git+https://github.com/pop-os/libcosmic.git#fde0516484750e0a7d2499e54964c5ed6ba8e16b" dependencies = [ "accesskit", "accesskit_winit", @@ -2534,46 +2501,61 @@ dependencies = [ [[package]] name = "iced_core" -version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#173a9557c2f03bc5fda132e884c11bf8661256ff" +version = "0.14.0-dev" +source = "git+https://github.com/pop-os/libcosmic.git#fde0516484750e0a7d2499e54964c5ed6ba8e16b" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", + "bytes", "dnd", + "glam", "log", "mime", "num-traits", + "once_cell", "palette", "raw-window-handle", + "rustc-hash 2.0.0", "serde", "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#173a9557c2f03bc5fda132e884c11bf8661256ff" +version = "0.14.0-dev" +source = "git+https://github.com/pop-os/libcosmic.git#fde0516484750e0a7d2499e54964c5ed6ba8e16b" 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#173a9557c2f03bc5fda132e884c11bf8661256ff" +version = "0.14.0-dev" +source = "git+https://github.com/pop-os/libcosmic.git#fde0516484750e0a7d2499e54964c5ed6ba8e16b" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "bytemuck", "cosmic-text", - "glam", "half", "iced_core", "iced_futures", @@ -2583,16 +2565,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#173a9557c2f03bc5fda132e884c11bf8661256ff" +version = "0.14.0-dev" +source = "git+https://github.com/pop-os/libcosmic.git#fde0516484750e0a7d2499e54964c5ed6ba8e16b" dependencies = [ "iced_graphics", "iced_tiny_skia", @@ -2603,63 +2584,56 @@ dependencies = [ [[package]] name = "iced_runtime" -version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#173a9557c2f03bc5fda132e884c11bf8661256ff" +version = "0.14.0-dev" +source = "git+https://github.com/pop-os/libcosmic.git#fde0516484750e0a7d2499e54964c5ed6ba8e16b" dependencies = [ + "bytes", "dnd", "iced_core", "iced_futures", + "raw-window-handle", "thiserror", "window_clipboard", ] -[[package]] -name = "iced_style" -version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#173a9557c2f03bc5fda132e884c11bf8661256ff" -dependencies = [ - "iced_core", - "once_cell", - "palette", -] - [[package]] name = "iced_tiny_skia" -version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#173a9557c2f03bc5fda132e884c11bf8661256ff" +version = "0.14.0-dev" +source = "git+https://github.com/pop-os/libcosmic.git#fde0516484750e0a7d2499e54964c5ed6ba8e16b" 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#173a9557c2f03bc5fda132e884c11bf8661256ff" +version = "0.14.0-dev" +source = "git+https://github.com/pop-os/libcosmic.git#fde0516484750e0a7d2499e54964c5ed6ba8e16b" dependencies = [ "as-raw-xcb-connection", - "bitflags 2.5.0", + "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.34", - "smithay-client-toolkit 0.19.1", + "smithay-client-toolkit", + "thiserror", "tiny-xlib", "wayland-backend", "wayland-client 0.31.4", @@ -2671,15 +2645,16 @@ dependencies = [ [[package]] name = "iced_widget" -version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#173a9557c2f03bc5fda132e884c11bf8661256ff" +version = "0.14.0-dev" +source = "git+https://github.com/pop-os/libcosmic.git#fde0516484750e0a7d2499e54964c5ed6ba8e16b" dependencies = [ "dnd", "iced_renderer", "iced_runtime", - "iced_style", "num-traits", + "once_cell", "ouroboros", + "rustc-hash 2.0.0", "thiserror", "unicode-segmentation", "window_clipboard", @@ -2687,43 +2662,24 @@ dependencies = [ [[package]] name = "iced_winit" -version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#173a9557c2f03bc5fda132e884c11bf8661256ff" +version = "0.14.0-dev" +source = "git+https://github.com/pop-os/libcosmic.git#fde0516484750e0a7d2499e54964c5ed6ba8e16b" dependencies = [ "dnd", + "iced_futures", "iced_graphics", "iced_runtime", - "iced_style", "log", + "rustc-hash 2.0.0", "thiserror", "tracing", + "wasm-bindgen-futures", "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", -] - [[package]] name = "ident_case" version = "1.0.1" @@ -2750,7 +2706,7 @@ dependencies = [ "byteorder", "color_quant", "exr", - "gif 0.13.1", + "gif", "jpeg-decoder", "num-traits", "png", @@ -2764,6 +2720,15 @@ version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "029d73f573d8e8d63e6d5020011d3255b28c3ba85d6cf870a07184ed23de9284" +[[package]] +name = "immutable-chunkmap" +version = "2.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12f97096f508d54f8f8ab8957862eee2ccd628847b6217af1a335e1c44dee578" +dependencies = [ + "arrayvec", +] + [[package]] name = "indexmap" version = "2.2.6" @@ -2915,9 +2880,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.69" +version = "0.3.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" +checksum = "6a88f1bda2bd75b0452a14784937d796722fdebfe50df998aeb3f0b7603019a9" dependencies = [ "wasm-bindgen", ] @@ -2938,7 +2903,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6aae1df220ece3c0ada96b8153459b67eebe9ae9212258bb0134ae60416fdf76" dependencies = [ "libc", - "libloading 0.8.3", + "libloading", "pkg-config", ] @@ -2979,11 +2944,22 @@ dependencies = [ [[package]] name = "kurbo" -version = "0.9.5" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1618d4ebd923e97d67e7cd363d80aef35fe961005cbbbb3d2dad8bdd1bc63440" +dependencies = [ + "arrayvec", + "smallvec", +] + +[[package]] +name = "kurbo" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd85a5776cd9500c2e2059c8c76c3b01528566b7fcbaf8098b55a33fc298849b" +checksum = "89234b2cc610a7dd927ebde6b41dd1a5d4214cffaef4cf1fb2195d592f92518f" dependencies = [ "arrayvec", + "smallvec", ] [[package]] @@ -3007,7 +2983,7 @@ checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" [[package]] name = "libcosmic" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic.git#173a9557c2f03bc5fda132e884c11bf8661256ff" +source = "git+https://github.com/pop-os/libcosmic.git#fde0516484750e0a7d2499e54964c5ed6ba8e16b" dependencies = [ "apply", "ashpd 0.9.1", @@ -3024,7 +3000,6 @@ dependencies = [ "iced_futures", "iced_renderer", "iced_runtime", - "iced_style", "iced_tiny_skia", "iced_wgpu", "iced_widget", @@ -3044,16 +3019,6 @@ dependencies = [ "zbus 4.2.2", ] -[[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.3" @@ -3076,7 +3041,7 @@ version = "0.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3af92c55d7d839293953fcd0fda5ecfe93297cfde6ffbdec13b41d99c0ba6607" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "libc", "redox_syscall 0.4.1", ] @@ -3087,7 +3052,7 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "libc", ] @@ -3136,6 +3101,12 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0b5399f6804fbab912acbd8878ed3532d506b7c951b8f9f164ef90fef39e3f4" +[[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" @@ -3170,9 +3141,6 @@ name = "lru" version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3262e75e648fce39813cb56ac41f3c3e3f65217ebf3844d818d1f9398cfb0dc" -dependencies = [ - "hashbrown", -] [[package]] name = "lyon" @@ -3288,11 +3256,11 @@ 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.5.0", + "bitflags 2.6.0", "block", "core-graphics-types", "foreign-types", @@ -3304,7 +3272,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#a83bf83784276aaa882ef13555295a2ad9edd265" dependencies = [ "smithay-clipboard", ] @@ -3345,18 +3313,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", "bit-set", - "bitflags 2.5.0", + "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", @@ -3365,14 +3334,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.5.0", + "bitflags 2.6.0", "jni-sys", "log", - "ndk-sys", + "ndk-sys 0.6.0+11769913", "num_enum", "raw-window-handle", "thiserror", @@ -3393,6 +3362,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.24.3" @@ -3423,7 +3401,7 @@ version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ab2156c4fce2f8df6c499cc1c763e4394b7482525bf2a9701c9d79d215f519e4" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "cfg-if", "cfg_aliases 0.1.1", "libc", @@ -3446,7 +3424,7 @@ version = "6.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6205bd8bb1e454ad2e27422015fb5e4f2bcc7e08fa8f27058670d208324a4d2d" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "crossbeam-channel", "filetime", "fsevent-sys", @@ -3586,7 +3564,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "915b1b472bc21c53464d6c8461c9d3af805ba1ef837e1cac254428f4a77177b1" dependencies = [ "malloc_buf", - "objc_exception", ] [[package]] @@ -3608,50 +3585,206 @@ checksum = "cdb91bdd390c7ce1a8607f35f3ca7151b65afc0ff5ff3b34fa350f7d7c7e4310" [[package]] name = "objc2" -version = "0.4.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "559c5a40fdd30eb5e344fbceacf7595a81e242529fb4e21cf5f43fb4f11ff98d" +checksum = "46a785d4eeff09c14c487497c162e92766fbb3e4059a71840cecc03d9a50b804" dependencies = [ "objc-sys", - "objc2-encode 3.0.0", + "objc2-encode", ] [[package]] -name = "objc2" -version = "0.5.2" +name = "objc2-app-kit" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46a785d4eeff09c14c487497c162e92766fbb3e4059a71840cecc03d9a50b804" +checksum = "e4e89ad9e3d7d297152b17d39ed92cd50ca8063a89a9fa569046d41568891eff" dependencies = [ - "objc-sys", - "objc2-encode 4.0.3", + "bitflags 2.6.0", + "block2", + "libc", + "objc2", + "objc2-core-data", + "objc2-core-image", + "objc2-foundation", + "objc2-quartz-core", ] [[package]] -name = "objc2-encode" -version = "3.0.0" +name = "objc2-cloud-kit" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d079845b37af429bfe5dfa76e6d087d788031045b25cfc6fd898486fd9847666" +checksum = "74dd3b56391c7a0596a295029734d3c1c5e7e510a4cb30245f8221ccea96b009" +dependencies = [ + "bitflags 2.6.0", + "block2", + "objc2", + "objc2-core-location", + "objc2-foundation", +] [[package]] -name = "objc2-encode" -version = "4.0.3" +name = "objc2-contacts" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7891e71393cd1f227313c9379a26a584ff3d7e6e7159e988851f0934c993f0f8" +checksum = "a5ff520e9c33812fd374d8deecef01d4a840e7b41862d849513de77e44aa4889" +dependencies = [ + "block2", + "objc2", + "objc2-foundation", +] [[package]] -name = "objc_exception" -version = "0.1.2" +name = "objc2-core-data" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad970fb455818ad6cba4c122ad012fae53ae8b4795f86378bce65e4f6bab2ca4" +checksum = "617fbf49e071c178c0b24c080767db52958f716d9eabdf0890523aeae54773ef" dependencies = [ - "cc", + "bitflags 2.6.0", + "block2", + "objc2", + "objc2-foundation", ] [[package]] -name = "objc_id" -version = "0.1.1" +name = "objc2-core-image" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c92d4ddb4bd7b50d730c215ff871754d0da6b2178849f8a2a2ab69712d0c073b" +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" +version = "4.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7891e71393cd1f227313c9379a26a584ff3d7e6e7159e988851f0934c993f0f8" + +[[package]] +name = "objc2-foundation" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ee638a5da3799329310ad4cfa62fbf045d5f56e3ef5ba4149e7452dcf89d5a8" +dependencies = [ + "bitflags 2.6.0", + "block2", + "dispatch", + "libc", + "objc2", +] + +[[package]] +name = "objc2-link-presentation" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1a1ae721c5e35be65f01a03b6d2ac13a54cb4fa70d8a5da293d7b0020261398" +dependencies = [ + "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]] +name = "objc_id" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c92d4ddb4bd7b50d730c215ff871754d0da6b2178849f8a2a2ab69712d0c073b" dependencies = [ "objc", ] @@ -3729,9 +3862,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", @@ -3740,13 +3873,14 @@ 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.66", ] @@ -3906,7 +4040,7 @@ version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "90fcb95eef784c2ac79119d1dd819e162b5da872ce6f3c3abe1e8ca1c082f72b" dependencies = [ - "siphasher", + "siphasher 0.3.11", ] [[package]] @@ -3915,6 +4049,26 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5be167a7af36ee22fe3115051bc51f6e6c7054c9348e28deb4f49bd6f705a315" +[[package]] +name = "pin-project" +version = "1.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be57f64e946e500c8ee36ef6331845d40a93055567ec57e8fae13efd33759b95" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c0f5fad0874fc7abcd4d750e76917eaebbecaa2c20bde22e1dbeeba8beb758c" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.66", +] + [[package]] name = "pin-project-lite" version = "0.2.14" @@ -4064,6 +4218,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.66", + "version_check", + "yansi", +] + [[package]] name = "profiling" version = "1.0.15" @@ -4165,12 +4332,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.19.3" @@ -4190,15 +4351,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" @@ -4214,7 +4366,7 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "469052894dcb553421e483e4209ee581a45100d31b4018de03e5a7ad86374a7e" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", ] [[package]] @@ -4265,15 +4417,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", @@ -4318,8 +4469,8 @@ version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b91f7eff05f748767f183df4320a63d6936e9c6107d97c9e6bdd9784f4289c94" dependencies = [ - "base64", - "bitflags 2.5.0", + "base64 0.21.7", + "bitflags 2.6.0", "serde", "serde_derive", ] @@ -4330,6 +4481,12 @@ version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3cd14fd5e3b777a7422cca79358c57a8f6e3a703d9ac187448d0daf220c2407f" +[[package]] +name = "roxmltree" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c20b6793b5c2fa6553b250154b78d6d0db37e72700ae35fad9387a46f487c97" + [[package]] name = "rust-embed" version = "8.4.0" @@ -4386,6 +4543,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" @@ -4406,7 +4569,7 @@ version = "0.38.34" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "errno", "libc", "linux-raw-sys 0.4.14", @@ -4419,35 +4582,19 @@ version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" -[[package]] -name = "rustybuzz" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0ae5692c5beaad6a9e22830deeed7874eae8a4e3ba4076fb48e12c56856222c" -dependencies = [ - "bitflags 2.5.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" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cfb9cf8877777222e4a3bc7eb247e398b56baba500c38c1c46842431adc8b55c" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "bytemuck", "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", ] @@ -4481,14 +4628,14 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "sctk-adwaita" -version = "0.8.1" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82b2eaf3a5b264a521b988b2e73042e742df700c4f962cde845d1541adb46550" +checksum = "b6277f0217056f77f1d8f49f2950ac6c278c0d607c45f5ee99328d792ede24ec" dependencies = [ "ab_glyph", "log", "memmap2 0.9.4", - "smithay-client-toolkit 0.18.1", + "smithay-client-toolkit", "tiny-skia", ] @@ -4623,6 +4770,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.19.3" @@ -4659,39 +4812,14 @@ 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.5.0", - "calloop 0.12.4", - "calloop-wayland-source 0.2.0", - "cursor-icon", - "libc", - "log", - "memmap2 0.9.4", - "rustix 0.38.34", - "thiserror", - "wayland-backend", - "wayland-client 0.31.4", - "wayland-csd-frame", - "wayland-cursor", - "wayland-protocols 0.31.2", - "wayland-protocols-wlr 0.2.0", - "wayland-scanner 0.31.3", - "xkeysym", -] - -[[package]] -name = "smithay-client-toolkit" -version = "0.19.1" +version = "0.19.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "837d3067369e24aeda699a5d9fc5aa14ca14a84dd70aeed7156bfa04a5605b32" +checksum = "3457dea1f0eb631b4034d61d4d8c32074caa6cd1ab2d59f2327bd8461e2c0016" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "bytemuck", - "calloop 0.13.0", - "calloop-wayland-source 0.3.0", + "calloop", + "calloop-wayland-source", "cursor-icon", "libc", "log", @@ -4704,7 +4832,7 @@ dependencies = [ "wayland-csd-frame", "wayland-cursor", "wayland-protocols 0.32.2", - "wayland-protocols-wlr 0.3.2", + "wayland-protocols-wlr", "wayland-scanner 0.31.3", "xkbcommon", "xkeysym", @@ -4717,7 +4845,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.1", + "smithay-client-toolkit", "wayland-backend", ] @@ -4795,7 +4923,7 @@ version = "0.3.0+sdk-1.3.268.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eda41003dc44290527a59b13432d4a0379379fa074b70174882adfbdfd917844" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", ] [[package]] @@ -4956,12 +5084,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]] @@ -5048,7 +5176,6 @@ dependencies = [ name = "tasks-core" version = "0.1.0" dependencies = [ - "anyhow", "async-trait", "chrono", "derive-getters", @@ -5060,6 +5187,7 @@ dependencies = [ "serde", "serde_json", "sqlx", + "thiserror", "tracing", "uuid", ] @@ -5087,18 +5215,18 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.61" +version = "1.0.65" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c546c80d6be4bc6a00c0f01730c08df82eaa7a7a61f11d656526506112cc1709" +checksum = "5d11abd9594d9b38965ef50805c5e469ca9cc6f197f883f717e0269a3057b3d5" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.61" +version = "1.0.65" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533" +checksum = "ae71770322cbd277e69d762a16c444af02aa0575ac0d174f0b9562d3b37f8602" dependencies = [ "proc-macro2", "quote", @@ -5192,7 +5320,7 @@ checksum = "1d52f22673960ad13af14ff4025997312def1223bfa7c8e4949d099e6b3d5d1c" dependencies = [ "as-raw-xcb-connection", "ctor-lite", - "libloading 0.8.3", + "libloading", "pkg-config", "tracing", ] @@ -5235,10 +5363,33 @@ dependencies = [ "pin-project-lite", "signal-hook-registry", "socket2 0.5.7", + "tokio-macros", "tracing", "windows-sys 0.48.0", ] +[[package]] +name = "tokio-macros" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.66", +] + +[[package]] +name = "tokio-stream" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f4e6ce100d0eb49a2734f8c0812bcd324cf357d21810932c5df6b96ef2b86f1" +dependencies = [ + "futures-core", + "pin-project-lite", + "tokio", +] + [[package]] name = "toml" version = "0.5.11" @@ -5368,7 +5519,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]] @@ -5413,24 +5564,12 @@ version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" -[[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" @@ -5533,63 +5672,29 @@ dependencies = [ [[package]] name = "usvg" -version = "0.37.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" +version = "0.42.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", + "pico-args", + "roxmltree 0.20.0", + "rustybuzz", "simplecss", - "siphasher", + "siphasher 1.0.1", + "strict-num", "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", + "tiny-skia-path", "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", - "strict-num", - "svgtypes", - "tiny-skia-path", + "xmlwriter", ] [[package]] @@ -5655,19 +5760,20 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.92" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" +checksum = "128d1e363af62632b8eb57219c8fd7877144af57558fb2ef0368d0087bddeb2e" dependencies = [ "cfg-if", + "once_cell", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.92" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" +checksum = "cb6dd4d3ca0ddffd1dd1c9c04f94b868c37ff5fac97c30b97cff2d74fce3a358" dependencies = [ "bumpalo", "log", @@ -5680,9 +5786,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.42" +version = "0.4.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" +checksum = "cc7ec4f8827a71586374db3e87abdb5a2bb3a15afed140221307c3ec06b1f63b" dependencies = [ "cfg-if", "js-sys", @@ -5692,9 +5798,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.92" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" +checksum = "e79384be7f8f5a9dd5d7167216f022090cf1f9ec128e6e6a482a2cb5c5422c56" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -5702,9 +5808,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.92" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" +checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68" dependencies = [ "proc-macro2", "quote", @@ -5715,9 +5821,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.92" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" +checksum = "65fc09f10666a9f147042251e0dda9c18f166ff7de300607007e96bdebc1068d" [[package]] name = "wasm-timer" @@ -5769,7 +5875,7 @@ version = "0.31.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08bd0f46c069d3382a36c8666c1b9ccef32b8b04f41667ca1fef06a1adcc2982" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "rustix 0.38.34", "wayland-backend", "wayland-scanner 0.31.3", @@ -5793,7 +5899,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "625c5029dbd43d25e6aa9615e88b829a5cad13b2819c4ae129fdbb7c31ab4c7e" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "cursor-icon", "wayland-backend", ] @@ -5821,25 +5927,13 @@ dependencies = [ "wayland-scanner 0.29.5", ] -[[package]] -name = "wayland-protocols" -version = "0.31.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f81f365b8b4a97f422ac0e8737c438024b5951734506b0e1d775c73030561f4" -dependencies = [ - "bitflags 2.5.0", - "wayland-backend", - "wayland-client 0.31.4", - "wayland-scanner 0.31.3", -] - [[package]] name = "wayland-protocols" version = "0.32.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1794d82d869f38439d15c24b26f06f6c8603d27d47b4f786d5197c99044de415" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "wayland-backend", "wayland-client 0.31.4", "wayland-scanner 0.31.3", @@ -5847,27 +5941,14 @@ dependencies = [ [[package]] name = "wayland-protocols-plasma" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23803551115ff9ea9bce586860c5c5a971e360825a0309264102a9495a5ff479" -dependencies = [ - "bitflags 2.5.0", - "wayland-backend", - "wayland-client 0.31.4", - "wayland-protocols 0.31.2", - "wayland-scanner 0.31.3", -] - -[[package]] -name = "wayland-protocols-wlr" -version = "0.2.0" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad1f61b76b6c2d8742e10f9ba5c3737f6530b4c243132c2a2ccc8aa96fe25cd6" +checksum = "8eb6d270c3fe425ebd636f2017971feb1c0e40e048b3307a71ca342a3c3201ba" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "wayland-backend", "wayland-client 0.31.4", - "wayland-protocols 0.31.2", + "wayland-protocols 0.32.2", "wayland-scanner 0.31.3", ] @@ -5877,7 +5958,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fa43c961473aed713d44c1f616f775186249dfca657f256d8841ca0690366aba" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "wayland-backend", "wayland-client 0.31.4", "wayland-protocols 0.32.2", @@ -5929,9 +6010,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.69" +version = "0.3.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" +checksum = "f6488b90108c040df0fe62fa815cbdee25124641df01814dd7282749234c6112" dependencies = [ "js-sys", "wasm-bindgen", @@ -5939,9 +6020,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", @@ -5955,12 +6036,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", - "cfg-if", "cfg_aliases 0.1.1", + "document-features", "js-sys", "log", "naga", @@ -5979,14 +6061,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", "bit-vec", - "bitflags 2.5.0", + "bitflags 2.6.0", "cfg_aliases 0.1.1", - "codespan-reporting", + "document-features", "indexmap", "log", "naga", @@ -5994,24 +6077,24 @@ 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", "ash", "bit-set", - "bitflags 2.5.0", + "bitflags 2.6.0", "block", "cfg_aliases 0.1.1", "core-graphics-types", @@ -6025,10 +6108,11 @@ dependencies = [ "js-sys", "khronos-egl", "libc", - "libloading 0.8.3", + "libloading", "log", "metal", "naga", + "ndk-sys 0.5.0+25.2.9519653", "objc", "once_cell", "parking_lot 0.12.3", @@ -6036,7 +6120,7 @@ dependencies = [ "range-alloc", "raw-window-handle", "renderdoc-sys", - "rustc-hash", + "rustc-hash 1.1.0", "smallvec", "thiserror", "wasm-bindgen", @@ -6047,10 +6131,11 @@ 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.5.0", + "bitflags 2.6.0", "js-sys", "web-sys", ] @@ -6104,7 +6189,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#a83bf83784276aaa882ef13555295a2ad9edd265" dependencies = [ "clipboard-win 5.3.1", "clipboard_macos", @@ -6118,22 +6203,23 @@ dependencies = [ [[package]] name = "windows" -version = "0.48.0" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" +checksum = "e48a53791691ab099e5e2ad123536d0fff50652600abaf43bbf952894110d0be" dependencies = [ - "windows-implement", - "windows-interface", - "windows-targets 0.48.5", + "windows-core 0.52.0", + "windows-targets 0.52.5", ] [[package]] name = "windows" -version = "0.52.0" +version = "0.54.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e48a53791691ab099e5e2ad123536d0fff50652600abaf43bbf952894110d0be" +checksum = "9252e5725dbed82865af151df558e754e4a3c2c30818359eb17465f1346a1b49" dependencies = [ - "windows-core", + "windows-core 0.54.0", + "windows-implement", + "windows-interface", "windows-targets 0.52.5", ] @@ -6146,26 +6232,45 @@ dependencies = [ "windows-targets 0.52.5", ] +[[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.5", +] + [[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.66", ] [[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.66", +] + +[[package]] +name = "windows-result" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e383302e8ec8515204254685643de10811af0ed97ea37210dc26fb0032647f8" +dependencies = [ + "windows-targets 0.52.5", ] [[package]] @@ -6375,46 +6480,50 @@ checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" [[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#b1852274c0251d7f24ba2cb32fa53812b37b1c79" dependencies = [ "ahash", "android-activity", "atomic-waker", - "bitflags 2.5.0", + "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.4", "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.34", "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 0.31.4", - "wayland-protocols 0.31.2", + "wayland-protocols 0.32.2", "wayland-protocols-plasma", "web-sys", "web-time", - "windows-sys 0.48.0", + "windows-sys 0.52.0", "x11-dl", "x11rb 0.13.1", "xkbcommon-dl", @@ -6498,7 +6607,7 @@ dependencies = [ "as-raw-xcb-connection", "gethostname 0.4.3", "libc", - "libloading 0.8.3", + "libloading", "once_cell", "rustix 0.38.34", "x11rb-protocol 0.13.1", @@ -6558,7 +6667,7 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d039de8032a9a8856a6be89cea3e5d12fdd82306ab7c94d74e6deab2460651c5" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "dlib", "log", "once_cell", @@ -6587,10 +6696,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec7a2a501ed189703dba8b08142f057e887dfc4b2cc4db2d343ac6376ba3e0b9" [[package]] -name = "xxhash-rust" -version = "0.8.10" +name = "yansi" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "927da81e25be1e1a2901d59b81b37dd2efd1fc9c9345a55007f09bf5a2d3ee03" +checksum = "cfe53a6657fd280eaa890a3bc59152892ffa3e30101319d168b781ed6529b049" [[package]] name = "yazi" @@ -6605,15 +6714,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", @@ -6630,6 +6733,7 @@ dependencies = [ "serde_repr", "sha1", "static_assertions", + "tokio", "tracing", "uds_windows", "winapi", @@ -6647,7 +6751,7 @@ checksum = "989c3977a7aafa97b12b9a35d21cdcff9b0d2289762b14683f45d66b1ba6c48f" dependencies = [ "async-broadcast 0.7.0", "async-executor", - "async-fs 2.1.2", + "async-fs", "async-io 2.3.2", "async-lock 3.3.0", "async-process 2.2.2", diff --git a/src/app.rs b/src/app.rs index 8633795..9b9cc59 100644 --- a/src/app.rs +++ b/src/app.rs @@ -18,7 +18,7 @@ use cosmic::widget::segmented_button::{Entity, EntityMut, SingleSelect}; use cosmic::widget::{horizontal_space, scrollable, segmented_button}; use cosmic::{ app, cosmic_config, cosmic_theme, executor, theme, widget, Application, ApplicationExt, - Command, Element, + Element, Task as Command, }; use tasks_core::models::list::List; use tasks_core::models::task::Task; @@ -190,7 +190,7 @@ impl Tasks { .padding(spacing.space_none) .into(), ]) - .align_items(Alignment::Center) + .align_x(Alignment::Center) .spacing(spacing.space_xxs) .width(Length::Fill) .into() @@ -363,7 +363,7 @@ impl Application for Tasks { .control( widget::container(scrollable(widget::row::with_children(vec![ widget::flex_row(icon_buttons).into(), - horizontal_space(Length::Fixed(f32::from(spacing.space_s))).into(), + horizontal_space().into(), ]))) .height(Length::Fixed(300.0)), ); @@ -465,7 +465,9 @@ impl Application for Tasks { if let Some(list) = location_opt { let message = Message::Content(content::Message::List(Some(list.clone()))); let window_title = format!("{} - {}", list.name, fl!("tasks")); - commands.push(self.set_window_title(window_title, self.main_window_id())); + if let Some(window_id) = self.core.main_window_id() { + commands.push(self.set_window_title(window_title, window_id)); + } return self.update(message); } @@ -477,11 +479,10 @@ impl Application for Tasks { struct ThemeSubscription; let mut subscriptions = vec![ - event::listen_with(|event, status| match event { - Event::Keyboard(KeyEvent::KeyPressed { key, modifiers, .. }) => match status { - event::Status::Ignored => Some(Message::Key(modifiers, key)), - event::Status::Captured => None, - }, + event::listen_with(|event, _status, _window_id| match event { + Event::Keyboard(KeyEvent::KeyPressed { key, modifiers, .. }) => { + Some(Message::Key(modifiers, key)) + } Event::Keyboard(KeyEvent::ModifiersChanged(modifiers)) => { Some(Message::Modifiers(modifiers)) } @@ -677,7 +678,9 @@ impl Application for Tasks { self.set_context_title(context_page.clone().title()); } Message::WindowClose => { - return window::close(window::Id::MAIN); + if let Some(window_id) = self.core.main_window_id() { + return window::close(window_id); + } } Message::WindowNew => match env::current_exe() { Ok(exe) => match process::Command::new(&exe).spawn() { diff --git a/src/content.rs b/src/content.rs index 93114cf..2ff244f 100644 --- a/src/content.rs +++ b/src/content.rs @@ -35,7 +35,7 @@ pub enum Message { } pub enum Command { - Iced(cosmic::app::Command), + Iced(cosmic::app::Task), GetTasks(String), DisplayTask(Task), UpdateTask(Task), @@ -58,14 +58,14 @@ impl Content { fn list_header<'a>(&'a self, list: &'a List) -> Element<'a, Message> { let spacing = theme::active().cosmic().spacing; let export_button = widget::button::icon(IconCache::get_handle("share-symbolic", 18)) - .style(theme::Button::Suggested) + .class(cosmic::style::Button::Suggested) .padding(spacing.space_xxs) .on_press(Message::Export(self.tasks.values().cloned().collect())); let default_icon = emojis::get_by_shortcode("pencil").unwrap().to_string(); let icon = list.icon.clone().unwrap_or(default_icon); widget::row::with_capacity(3) - .align_items(Alignment::Center) + .align_y(Alignment::Center) .spacing(spacing.space_s) .padding([spacing.space_none, spacing.space_xxs]) .push(widget::text(icon).size(spacing.space_m)) @@ -87,21 +87,19 @@ impl Content { .padding([spacing.space_none, spacing.space_xxs]); for (id, item) in &self.tasks { - let item_checkbox = - widget::checkbox("", item.status == Status::Completed, move |value| { - Message::Complete(id, value) - }); + let item_checkbox = widget::checkbox("", item.status == Status::Completed) + .on_toggle(move |value| Message::Complete(id, value)); let delete_button = widget::button::icon(IconCache::get_handle("user-trash-full-symbolic", 18)) .padding(spacing.space_xxs) - .style(theme::Button::Destructive) + .class(cosmic::style::Button::Destructive) .on_press(Message::Delete(id)); let details_button = widget::button::icon(IconCache::get_handle("info-outline-symbolic", 18)) .padding(spacing.space_xxs) - .style(theme::Button::Standard) + .class(cosmic::style::Button::Standard) .on_press(Message::Select(item.clone())); let task_item_text = widget::editable_input( @@ -116,7 +114,7 @@ impl Content { .width(Length::Fill); let row = widget::row::with_capacity(4) - .align_items(Alignment::Center) + .align_y(Alignment::Center) .spacing(spacing.space_xxs) .padding([spacing.space_xxxs, spacing.space_xxs]) .push(item_checkbox) @@ -148,7 +146,7 @@ impl Content { widget::text(fl!("no-tasks-suggestion")).into(), ]) .spacing(10) - .align_items(Alignment::Center), + .align_x(Alignment::Center), ) .align_y(Vertical::Center) .align_x(Horizontal::Center) @@ -172,15 +170,15 @@ impl Content { .into(), widget::button::icon(IconCache::get_handle("mail-send-symbolic", 18)) .padding(spacing.space_xxs) - .style(theme::Button::Suggested) + .class(cosmic::style::Button::Suggested) .on_press(Message::AddTask) .into(), ]) .padding(spacing.space_xxs) .spacing(spacing.space_xxs) - .align_items(Alignment::Center) + .align_y(Alignment::Center) .apply(widget::container) - .style(cosmic::style::Container::ContextDrawer) + .class(cosmic::style::Container::ContextDrawer) .into() } @@ -280,7 +278,7 @@ impl Content { widget::text(fl!("no-list-suggestion")).into(), ]) .spacing(10) - .align_items(Alignment::Center), + .align_x(Alignment::Center), ) .align_y(Vertical::Center) .align_x(Horizontal::Center) diff --git a/src/core/Cargo.toml b/src/core/Cargo.toml index 5ab903b..98430a2 100644 --- a/src/core/Cargo.toml +++ b/src/core/Cargo.toml @@ -6,7 +6,6 @@ edition = "2021" [dependencies] serde_json = "1.0.87" ron = "0.8.1" -anyhow = "1.0.66" tracing = "0.1.37" async-trait = "0.1.68" libset = "0.1.6" @@ -14,6 +13,7 @@ emojis = "0.6.1" dirs = "5.0.1" derive-getters = "0.3.0" derive_setters = "0.1.6" +thiserror = "1.0.65" [dependencies.sqlx] version = "0.8.0" diff --git a/src/core/src/error.rs b/src/core/src/error.rs new file mode 100644 index 0000000..15ab3ea --- /dev/null +++ b/src/core/src/error.rs @@ -0,0 +1,33 @@ +use thiserror::Error; + +#[derive(Debug, Error)] +pub enum Error { + #[error("The requested service was unavailable")] + ServiceUnavailable, + #[error("IO error: {0}")] + Io(#[from] std::io::Error), + #[error("Ron spanned error: {0}")] + RonSpanned(#[from] ron::error::SpannedError), + #[error("Ron deserialization error: {0}")] + RonDeserialization(#[from] ron::de::Error), + #[error("Sqlx error: {0}")] + Sqlx(#[from] sqlx::Error), + #[error("Libset error: {0}")] + Libset(#[from] libset::Error), + #[error("TaskS error: {0}")] + Tasks(#[from] TasksError), +} + +#[derive(Debug, Error)] +pub enum TasksError { + #[error("The requested service is unavailable")] + ServiceUnavailable, + #[error("Task not found")] + TaskNotFound, + #[error("Task already exists")] + ExistingTask, + #[error("List not found")] + ListNotFound, + #[error("List already exists")] + ExistingList, +} diff --git a/src/core/src/lib.rs b/src/core/src/lib.rs index 43b2ac2..fe39ec0 100644 --- a/src/core/src/lib.rs +++ b/src/core/src/lib.rs @@ -1,4 +1,6 @@ +pub mod error; pub mod models; pub mod service; pub mod services; pub(crate) mod task_service; +pub use error::*; diff --git a/src/core/src/models/list.rs b/src/core/src/models/list.rs index 5fa04f4..cb465b8 100644 --- a/src/core/src/models/list.rs +++ b/src/core/src/models/list.rs @@ -12,6 +12,8 @@ pub struct List { pub icon: Option, } +unsafe impl Send for List {} + impl FromIterator for List { fn from_iter>(iter: T) -> Self { let mut list = Self::default(); diff --git a/src/core/src/service.rs b/src/core/src/service.rs index 5dfd765..93bfbce 100644 --- a/src/core/src/service.rs +++ b/src/core/src/service.rs @@ -1,5 +1,6 @@ use std::path::PathBuf; +use crate::Error; use chrono::NaiveDateTime; use serde::{Deserialize, Serialize}; use sqlx::{sqlite::SqliteRow, Connection}; @@ -53,7 +54,7 @@ impl TaskService { } } - pub async fn migrate(app_id: &str) -> Result<(), Box> { + pub async fn migrate(app_id: &str) -> Result<(), Error> { if let Some(mut service) = TaskService::new(app_id, Provider::Computer).get_service() { let database_path = dirs::config_dir() .unwrap() @@ -80,7 +81,7 @@ impl TaskService { use sqlx::Row; -async fn get_tasks(database_path: &PathBuf) -> Result, Box> { +async fn get_tasks(database_path: &PathBuf) -> Result, Error> { let mut conn = sqlx::SqliteConnection::connect(database_path.to_str().unwrap()).await?; let tasks = sqlx::query("SELECT * FROM tasks") .map(|row: SqliteRow| Task { @@ -122,7 +123,7 @@ async fn get_tasks(database_path: &PathBuf) -> Result, Box Result, Box> { +async fn get_lists(database_path: &PathBuf) -> Result, Error> { let mut conn = sqlx::SqliteConnection::connect(database_path.to_str().unwrap()).await?; let tasks = sqlx::query("SELECT * FROM lists") .map(|row: SqliteRow| List { diff --git a/src/core/src/services/computer.rs b/src/core/src/services/computer.rs index 43217c7..b131197 100644 --- a/src/core/src/services/computer.rs +++ b/src/core/src/services/computer.rs @@ -1,9 +1,9 @@ -use anyhow::Result; use async_trait::async_trait; use crate::{ models::{list::List, task::Task}, task_service::TasksProvider, + Error, }; use self::engine::ComputerStorageEngine; @@ -23,43 +23,43 @@ impl ComputerStorage { #[async_trait] impl TasksProvider for ComputerStorage { - async fn get_task(&mut self, list_id: String, task_id: String) -> Result { + async fn get_task(&mut self, list_id: String, task_id: String) -> Result { self.engine.get_task(&list_id, &task_id) } - async fn get_tasks_from_list(&mut self, parent_list: String) -> Result> { + async fn get_tasks_from_list(&mut self, parent_list: String) -> Result, Error> { self.engine.tasks(&parent_list) } - async fn create_task(&mut self, task: Task) -> Result { + async fn create_task(&mut self, task: Task) -> Result { self.engine.create_task(task) } - async fn update_task(&mut self, task: Task) -> Result<()> { + async fn update_task(&mut self, task: Task) -> Result<(), Error> { self.engine.update_task(task) } - async fn delete_task(&mut self, list_id: String, task_id: String) -> Result<()> { + async fn delete_task(&mut self, list_id: String, task_id: String) -> Result<(), Error> { self.engine.delete_task(&list_id, &task_id) } - async fn get_lists(&mut self) -> Result> { + async fn get_lists(&mut self) -> Result, Error> { self.engine.lists() } - async fn get_list(&mut self, id: String) -> Result { + async fn get_list(&mut self, id: String) -> Result { self.engine.get_list(&id) } - async fn create_list(&mut self, list: List) -> Result { + async fn create_list(&mut self, list: List) -> Result { self.engine.create_list(list) } - async fn update_list(&mut self, list: List) -> Result<()> { + async fn update_list(&mut self, list: List) -> Result<(), Error> { self.engine.update_list(list) } - async fn delete_list(&mut self, id: String) -> Result<()> { + async fn delete_list(&mut self, id: String) -> Result<(), Error> { self.engine.delete_list(&id) } } diff --git a/src/core/src/services/computer/engine.rs b/src/core/src/services/computer/engine.rs index ce0cb72..07f0eae 100644 --- a/src/core/src/services/computer/engine.rs +++ b/src/core/src/services/computer/engine.rs @@ -1,6 +1,9 @@ use std::path::PathBuf; -use crate::models::{list::List, task::Task}; +use crate::{ + models::{list::List, task::Task}, + Error, TasksError, +}; #[derive(Debug, Clone)] pub struct ComputerStorageEngine { @@ -23,7 +26,7 @@ impl ComputerStorageEngine { Some(engine) } - pub fn tasks(&self, list_id: &str) -> anyhow::Result> { + pub fn tasks(&self, list_id: &str) -> Result, Error> { let mut tasks = vec![]; let path = self.tasks_path().join(list_id); if !path.exists() { @@ -39,7 +42,7 @@ impl ComputerStorageEngine { Ok(tasks) } - pub fn lists(&self) -> anyhow::Result> { + pub fn lists(&self) -> Result, Error> { let mut tasks = vec![]; let path = self.lists_path(); if !path.exists() { @@ -55,7 +58,7 @@ impl ComputerStorageEngine { Ok(tasks) } - pub fn get_task(&self, list_id: &str, task_id: &str) -> anyhow::Result { + pub fn get_task(&self, list_id: &str, task_id: &str) -> Result { let path = self .tasks_path() .join(list_id) @@ -66,11 +69,11 @@ impl ComputerStorageEngine { let task = ron::from_str(&content)?; Ok(task) } else { - Err(anyhow::anyhow!("Task does not exist")) + Err(Error::Tasks(TasksError::TaskNotFound)) } } - pub fn create_task(&self, task: Task) -> anyhow::Result { + pub fn create_task(&self, task: Task) -> Result { let path = self .tasks_path() .join(&task.parent) @@ -82,11 +85,11 @@ impl ComputerStorageEngine { std::fs::write(path, content)?; Ok(task) } else { - Err(anyhow::anyhow!("Task already exists")) + Err(Error::Tasks(TasksError::ExistingTask)) } } - pub fn update_task(&self, task: Task) -> anyhow::Result<()> { + pub fn update_task(&self, task: Task) -> Result<(), Error> { let path = self .tasks_path() .join(&task.parent) @@ -97,11 +100,11 @@ impl ComputerStorageEngine { std::fs::write(path, content)?; Ok(()) } else { - Err(anyhow::anyhow!("Task does not exist")) + Err(Error::Tasks(TasksError::TaskNotFound)) } } - pub fn delete_task(&self, list_id: &str, task_id: &str) -> anyhow::Result<()> { + pub fn delete_task(&self, list_id: &str, task_id: &str) -> Result<(), Error> { let path = self .tasks_path() .join(list_id) @@ -111,44 +114,44 @@ impl ComputerStorageEngine { std::fs::remove_file(path)?; Ok(()) } else { - Err(anyhow::anyhow!("Task does not exist")) + Err(Error::Tasks(TasksError::TaskNotFound)) } } - pub fn get_list(&self, list_id: &str) -> anyhow::Result { + pub fn get_list(&self, list_id: &str) -> Result { let path = self.lists_path().join(list_id).with_extension("ron"); if path.exists() { let content = std::fs::read_to_string(path)?; let list = ron::from_str(&content)?; Ok(list) } else { - Err(anyhow::anyhow!("List does not exist")) + Err(Error::Tasks(TasksError::ListNotFound)) } } - pub fn create_list(&self, list: List) -> anyhow::Result { + pub fn create_list(&self, list: List) -> Result { let path = self.lists_path().join(&list.id).with_extension("ron"); if !path.exists() { let content = ron::to_string(&list)?; std::fs::write(path, content).unwrap(); Ok(list) } else { - Err(anyhow::anyhow!("List already exists")) + Err(Error::Tasks(TasksError::ExistingList)) } } - pub fn update_list(&self, list: List) -> anyhow::Result<()> { + pub fn update_list(&self, list: List) -> Result<(), Error> { let path = self.lists_path().join(&list.id).with_extension("ron"); if path.exists() { let content = ron::to_string(&list)?; std::fs::write(path, content)?; Ok(()) } else { - Err(anyhow::anyhow!("List does not exist")) + Err(Error::Tasks(TasksError::ListNotFound)) } } - pub fn delete_list(&self, list_id: &str) -> anyhow::Result<()> { + pub fn delete_list(&self, list_id: &str) -> Result<(), Error> { let path = self.lists_path().join(list_id).with_extension("ron"); let tasks = self.tasks_path().join(list_id); if path.exists() { @@ -156,7 +159,7 @@ impl ComputerStorageEngine { std::fs::remove_dir_all(tasks)?; Ok(()) } else { - Err(anyhow::anyhow!("List does not exist")) + Err(Error::Tasks(TasksError::ListNotFound)) } } diff --git a/src/core/src/task_service.rs b/src/core/src/task_service.rs index d62c524..a65b6ec 100644 --- a/src/core/src/task_service.rs +++ b/src/core/src/task_service.rs @@ -1,37 +1,39 @@ -use anyhow::Result; use async_trait::async_trait; -use crate::models::{list::List, task::Task}; +use crate::{ + models::{list::List, task::Task}, + Error, +}; #[async_trait] pub trait TasksProvider: Sync + Send { /// Reads a single task by its id. - async fn get_task(&mut self, task_list_id: String, task_id: String) -> Result; + async fn get_task(&mut self, task_list_id: String, task_id: String) -> Result; /// Read all the tasks from a list. - async fn get_tasks_from_list(&mut self, parent_list: String) -> Result>; + async fn get_tasks_from_list(&mut self, parent_list: String) -> Result, Error>; /// Creates a single task. - async fn create_task(&mut self, task: Task) -> Result; + async fn create_task(&mut self, task: Task) -> Result; /// Updates a single task. - async fn update_task(&mut self, task: Task) -> Result<()>; + async fn update_task(&mut self, task: Task) -> Result<(), Error>; /// Deltes a single task. - async fn delete_task(&mut self, list_id: String, task_id: String) -> Result<()>; + async fn delete_task(&mut self, list_id: String, task_id: String) -> Result<(), Error>; /// Read all the lists from a service. - async fn get_lists(&mut self) -> Result>; + async fn get_lists(&mut self) -> Result, Error>; /// Read a single list from a service. - async fn get_list(&mut self, id: String) -> Result; + async fn get_list(&mut self, id: String) -> Result; /// Creates a single task list. - async fn create_list(&mut self, list: List) -> Result; + async fn create_list(&mut self, list: List) -> Result; /// Updates a single task list. - async fn update_list(&mut self, list: List) -> Result<()>; + async fn update_list(&mut self, list: List) -> Result<(), Error>; /// Deletes a single task list. - async fn delete_list(&mut self, id: String) -> Result<()>; + async fn delete_list(&mut self, id: String) -> Result<(), Error>; } diff --git a/src/details.rs b/src/details.rs index 01904ec..3a04404 100644 --- a/src/details.rs +++ b/src/details.rs @@ -42,7 +42,7 @@ pub enum Command { Focus(widget::Id), UpdateTask(Task), OpenCalendarDialog, - Iced(cosmic::app::Command), + Iced(cosmic::app::Task), } impl Details { @@ -174,10 +174,8 @@ impl Details { if let Some(task) = self.task.as_ref() { let mut sub_tasks: Vec> = vec![]; for (id, sub_task) in &self.subtasks { - let item_checkbox = - widget::checkbox("", sub_task.status == Status::Completed, move |value| { - Message::CompleteSubTask(id, value) - }); + let item_checkbox = widget::checkbox("", sub_task.status == Status::Completed) + .on_toggle(move |value| Message::CompleteSubTask(id, value)); let sub_task_item = widget::editable_input( fl!("title"), @@ -192,11 +190,10 @@ impl Details { let delete_button = widget::button::icon(IconCache::get_handle("user-trash-full-symbolic", 18)) .padding(spacing.space_xxs) - .style(widget::button::Style::Destructive) .on_press(Message::DeleteSubTask(id)); let row = widget::row::with_capacity(3) - .align_items(Alignment::Center) + .align_y(Alignment::Center) .padding([spacing.space_none, spacing.space_s]) .spacing(spacing.space_xs) .push(item_checkbox) @@ -222,11 +219,9 @@ impl Details { .padding([0, 15, 0, 15]), ) .add( - widget::settings::item::builder(fl!("favorite")).control(widget::checkbox( - "", - task.favorite, - Message::Favorite, - )), + widget::settings::item::builder(fl!("favorite")).control( + widget::checkbox("", task.favorite).on_toggle(Message::Favorite), + ), ) .add( widget::settings::item::builder(fl!("priority")).control( @@ -295,7 +290,7 @@ impl Details { ]) .padding([spacing.space_none, spacing.space_s]) .spacing(spacing.space_xs) - .align_items(Alignment::Center) + .align_y(Alignment::Center) .into() } } diff --git a/src/main.rs b/src/main.rs index be75786..53f1829 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,6 +1,7 @@ mod app; mod content; mod details; +pub use tasks_core::Error; mod todo; pub fn main() -> cosmic::iced::Result { diff --git a/src/todo.rs b/src/todo.rs index 4d7a6fa..ddbdc98 100644 --- a/src/todo.rs +++ b/src/todo.rs @@ -1,39 +1,40 @@ use crate::app::markdown::Markdown; -use std::error::Error; +use crate::Error; use tasks_core::models::list::List; use tasks_core::models::task::Task; use tasks_core::service::TaskService; +use tasks_core::TasksError; -pub async fn update_list(list: List, service: TaskService) -> Result<(), Box> { +pub async fn update_list(list: List, service: TaskService) -> Result<(), Error> { if let Some(mut service) = service.get_service() { service.update_list(list).await?; } Ok(()) } -pub async fn delete_list(id: String, service: TaskService) -> Result<(), Box> { +pub async fn delete_list(id: String, service: TaskService) -> Result<(), Error> { if let Some(mut service) = service.get_service() { service.delete_list(id).await?; } Ok(()) } -pub async fn create_list(list: List, service: TaskService) -> Result> { +pub async fn create_list(list: List, service: TaskService) -> Result { if let Some(mut service) = service.get_service() { let list = service.create_list(list).await?; return Ok(list); } - Err("No service found".into()) + Err(Error::Tasks(TasksError::ServiceUnavailable)) } -pub async fn create_task(task: Task, service: TaskService) -> Result<(), Box> { +pub async fn create_task(task: Task, service: TaskService) -> Result<(), Error> { if let Some(mut service) = service.get_service() { service.create_task(task).await?; } Ok(()) } -pub async fn fetch_lists(service: TaskService) -> Result, Box> { +pub async fn fetch_lists(service: TaskService) -> Result, Error> { if let Some(mut service) = service.get_service() { let lists = service.get_lists().await?; return Ok(lists); @@ -41,10 +42,7 @@ pub async fn fetch_lists(service: TaskService) -> Result, Box Result, Box> { +pub async fn fetch_tasks(list_id: String, service: TaskService) -> Result, Error> { if let Some(mut service) = service.get_service() { let tasks = service.get_tasks_from_list(list_id).await?; return Ok(tasks); @@ -52,7 +50,7 @@ pub async fn fetch_tasks( Ok(vec![]) } -pub async fn update_task(task: Task, service: TaskService) -> Result<(), Box> { +pub async fn update_task(task: Task, service: TaskService) -> Result<(), Error> { if let Some(mut service) = service.get_service() { service.update_task(task).await?; } @@ -63,7 +61,7 @@ pub async fn delete_task( list_id: String, task_id: String, service: TaskService, -) -> Result<(), Box> { +) -> Result<(), Error> { if let Some(mut service) = service.get_service() { service.delete_task(list_id, task_id).await?; }