From 5e399b7bc14cdbf1a0f4e5cba167d4e8fbea72be Mon Sep 17 00:00:00 2001 From: Wyatt Herkamp Date: Wed, 24 Jan 2024 09:30:06 -0500 Subject: [PATCH 1/2] update depends --- Cargo.lock | 254 +++++++++++++++++++++++++++++++++++++++-------- Cargo.toml | 11 +- src/localize.rs | 17 ++-- src/mime_icon.rs | 6 +- src/tab.rs | 67 ++++++------- 5 files changed, 264 insertions(+), 91 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e1d66508..74ff1701 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -465,6 +465,18 @@ dependencies = [ "syn 2.0.48", ] +[[package]] +name = "atk-sys" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "251e0b7d90e33e0ba930891a505a9a35ece37b2dd37a14f3ffc306c13b980009" +dependencies = [ + "glib-sys", + "gobject-sys", + "libc", + "system-deps", +] + [[package]] name = "atomic-waker" version = "1.1.2" @@ -659,6 +671,16 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" +[[package]] +name = "cairo-sys-rs" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "685c9fa8e590b8b3d678873528d83411db17242a73fccaed827770ea0fedda51" +dependencies = [ + "libc", + "system-deps", +] + [[package]] name = "calloop" version = "0.6.5" @@ -719,6 +741,16 @@ dependencies = [ "libc", ] +[[package]] +name = "cfg-expr" +version = "0.15.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6100bc57b6209840798d95cb2775684849d332f7bd788db2a8c8caf7ef82a41a" +dependencies = [ + "smallvec", + "target-lexicon", +] + [[package]] name = "cfg-if" version = "0.1.10" @@ -739,9 +771,9 @@ checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" [[package]] name = "chrono" -version = "0.4.31" +version = "0.4.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38" +checksum = "41daef31d7a747c5c847246f36de49ced6f7403b4cdabc807a97b5cc184cda7a" dependencies = [ "android-tzdata", "iana-time-zone", @@ -749,7 +781,7 @@ dependencies = [ "num-traits", "pure-rust-locales", "wasm-bindgen", - "windows-targets 0.48.5", + "windows-targets 0.52.0", ] [[package]] @@ -967,7 +999,7 @@ dependencies = [ [[package]] name = "cosmic-config" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic.git#efe4ce2f5b514e4d553ab82c0c873dca7585c028" +source = "git+https://github.com/pop-os/libcosmic.git#d6e23fe97751d40f181228d1d1c34b51fea23bea" dependencies = [ "atomicwrites", "cosmic-config-derive", @@ -982,7 +1014,7 @@ dependencies = [ [[package]] name = "cosmic-config-derive" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic.git#efe4ce2f5b514e4d553ab82c0c873dca7585c028" +source = "git+https://github.com/pop-os/libcosmic.git#d6e23fe97751d40f181228d1d1c34b51fea23bea" dependencies = [ "quote", "syn 1.0.109", @@ -998,10 +1030,10 @@ dependencies = [ "fork", "i18n-embed", "i18n-embed-fl", - "lazy_static", "lexical-sort", "libcosmic", "log", + "once_cell", "paste", "rust-embed", "serde", @@ -1013,7 +1045,7 @@ dependencies = [ [[package]] name = "cosmic-text" version = "0.10.0" -source = "git+https://github.com/pop-os/cosmic-text.git#db1530c4ec14bcbb290f9c971d8a6197c90e189a" +source = "git+https://github.com/pop-os/cosmic-text.git#e0ae465f918cd1cffca3a8239547dcf8166d3f77" dependencies = [ "bitflags 2.4.2", "fontdb", @@ -1035,7 +1067,7 @@ dependencies = [ [[package]] name = "cosmic-theme" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic.git#efe4ce2f5b514e4d553ab82c0c873dca7585c028" +source = "git+https://github.com/pop-os/libcosmic.git#d6e23fe97751d40f181228d1d1c34b51fea23bea" dependencies = [ "almost", "cosmic-config", @@ -1981,6 +2013,36 @@ dependencies = [ "slab", ] +[[package]] +name = "gdk-pixbuf-sys" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9839ea644ed9c97a34d129ad56d38a25e6756f99f3a88e15cd39c20629caf7" +dependencies = [ + "gio-sys", + "glib-sys", + "gobject-sys", + "libc", + "system-deps", +] + +[[package]] +name = "gdk-sys" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31ff856cb3386dae1703a920f803abafcc580e9b5f711ca62ed1620c25b51ff2" +dependencies = [ + "cairo-sys-rs", + "gdk-pixbuf-sys", + "gio-sys", + "glib-sys", + "gobject-sys", + "libc", + "pango-sys", + "pkg-config", + "system-deps", +] + [[package]] name = "generic-array" version = "0.14.7" @@ -2050,6 +2112,19 @@ version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" +[[package]] +name = "gio-sys" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37566df850baf5e4cb0dfb78af2e4b9898d817ed9263d1090a2df958c64737d2" +dependencies = [ + "glib-sys", + "gobject-sys", + "libc", + "system-deps", + "winapi", +] + [[package]] name = "gl_generator" version = "0.14.0" @@ -2067,6 +2142,16 @@ version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b5418c17512bdf42730f9032c74e1ae39afc408745ebb2acf72fbc4691c17945" +[[package]] +name = "glib-sys" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "063ce2eb6a8d0ea93d2bf8ba1957e78dbab6be1c2220dd3daca57d5a9d869898" +dependencies = [ + "libc", + "system-deps", +] + [[package]] name = "glob" version = "0.3.1" @@ -2105,6 +2190,17 @@ dependencies = [ "wgpu", ] +[[package]] +name = "gobject-sys" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0850127b514d1c4a4654ead6dedadb18198999985908e6ffe4436f53c785ce44" +dependencies = [ + "glib-sys", + "libc", + "system-deps", +] + [[package]] name = "gpu-alloc" version = "0.6.0" @@ -2164,6 +2260,24 @@ version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1df00eed8d1f0db937f6be10e46e8072b0671accb504cf0f959c5c52c679f5b9" +[[package]] +name = "gtk-sys" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "771437bf1de2c1c0b496c11505bdf748e26066bbe942dfc8f614c9460f6d7722" +dependencies = [ + "atk-sys", + "cairo-sys-rs", + "gdk-pixbuf-sys", + "gdk-sys", + "gio-sys", + "glib-sys", + "gobject-sys", + "libc", + "pango-sys", + "system-deps", +] + [[package]] name = "guillotiere" version = "0.6.2" @@ -2264,9 +2378,9 @@ dependencies = [ [[package]] name = "i18n-embed" -version = "0.13.9" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92a86226a7a16632de6723449ee5fe70bac5af718bc642ee9ca2f0f6e14fa1fa" +checksum = "94205d95764f5bb9db9ea98fa77f89653365ca748e27161f5bbea2ffd50e459c" dependencies = [ "arc-swap", "fluent", @@ -2286,9 +2400,9 @@ dependencies = [ [[package]] name = "i18n-embed-fl" -version = "0.6.7" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d26a3d3569737dfaac7fc1c4078e6af07471c3060b8e570bcd83cdd5f4685395" +checksum = "9fc1f8715195dffc4caddcf1cf3128da15fe5d8a137606ea8856c9300047d5a2" dependencies = [ "dashmap", "find-crate", @@ -2344,7 +2458,7 @@ dependencies = [ [[package]] name = "iced" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#efe4ce2f5b514e4d553ab82c0c873dca7585c028" +source = "git+https://github.com/pop-os/libcosmic.git#d6e23fe97751d40f181228d1d1c34b51fea23bea" dependencies = [ "iced_accessibility", "iced_core", @@ -2359,7 +2473,7 @@ dependencies = [ [[package]] name = "iced_accessibility" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic.git#efe4ce2f5b514e4d553ab82c0c873dca7585c028" +source = "git+https://github.com/pop-os/libcosmic.git#d6e23fe97751d40f181228d1d1c34b51fea23bea" dependencies = [ "accesskit", "accesskit_winit", @@ -2368,7 +2482,7 @@ dependencies = [ [[package]] name = "iced_core" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#efe4ce2f5b514e4d553ab82c0c873dca7585c028" +source = "git+https://github.com/pop-os/libcosmic.git#d6e23fe97751d40f181228d1d1c34b51fea23bea" dependencies = [ "bitflags 1.3.2", "instant", @@ -2384,7 +2498,7 @@ dependencies = [ [[package]] name = "iced_futures" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#efe4ce2f5b514e4d553ab82c0c873dca7585c028" +source = "git+https://github.com/pop-os/libcosmic.git#d6e23fe97751d40f181228d1d1c34b51fea23bea" dependencies = [ "futures", "iced_core", @@ -2397,7 +2511,7 @@ dependencies = [ [[package]] name = "iced_graphics" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#efe4ce2f5b514e4d553ab82c0c873dca7585c028" +source = "git+https://github.com/pop-os/libcosmic.git#d6e23fe97751d40f181228d1d1c34b51fea23bea" dependencies = [ "bitflags 1.3.2", "bytemuck", @@ -2420,7 +2534,7 @@ dependencies = [ [[package]] name = "iced_renderer" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#efe4ce2f5b514e4d553ab82c0c873dca7585c028" +source = "git+https://github.com/pop-os/libcosmic.git#d6e23fe97751d40f181228d1d1c34b51fea23bea" dependencies = [ "iced_graphics", "iced_tiny_skia", @@ -2433,7 +2547,7 @@ dependencies = [ [[package]] name = "iced_runtime" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#efe4ce2f5b514e4d553ab82c0c873dca7585c028" +source = "git+https://github.com/pop-os/libcosmic.git#d6e23fe97751d40f181228d1d1c34b51fea23bea" dependencies = [ "iced_core", "iced_futures", @@ -2443,7 +2557,7 @@ dependencies = [ [[package]] name = "iced_style" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#efe4ce2f5b514e4d553ab82c0c873dca7585c028" +source = "git+https://github.com/pop-os/libcosmic.git#d6e23fe97751d40f181228d1d1c34b51fea23bea" dependencies = [ "iced_core", "once_cell", @@ -2453,7 +2567,7 @@ dependencies = [ [[package]] name = "iced_tiny_skia" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#efe4ce2f5b514e4d553ab82c0c873dca7585c028" +source = "git+https://github.com/pop-os/libcosmic.git#d6e23fe97751d40f181228d1d1c34b51fea23bea" dependencies = [ "bytemuck", "cosmic-text", @@ -2471,7 +2585,7 @@ dependencies = [ [[package]] name = "iced_wgpu" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#efe4ce2f5b514e4d553ab82c0c873dca7585c028" +source = "git+https://github.com/pop-os/libcosmic.git#d6e23fe97751d40f181228d1d1c34b51fea23bea" dependencies = [ "bitflags 1.3.2", "bytemuck", @@ -2491,7 +2605,7 @@ dependencies = [ [[package]] name = "iced_widget" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#efe4ce2f5b514e4d553ab82c0c873dca7585c028" +source = "git+https://github.com/pop-os/libcosmic.git#d6e23fe97751d40f181228d1d1c34b51fea23bea" dependencies = [ "iced_renderer", "iced_runtime", @@ -2505,7 +2619,7 @@ dependencies = [ [[package]] name = "iced_winit" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#efe4ce2f5b514e4d553ab82c0c873dca7585c028" +source = "git+https://github.com/pop-os/libcosmic.git#d6e23fe97751d40f181228d1d1c34b51fea23bea" dependencies = [ "iced_graphics", "iced_runtime", @@ -2801,7 +2915,7 @@ checksum = "13e3bf6590cbc649f4d1a3eefc9d5d6eb746f5200ffb04e5e142700b8faa56e7" [[package]] name = "libcosmic" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic.git#efe4ce2f5b514e4d553ab82c0c873dca7585c028" +source = "git+https://github.com/pop-os/libcosmic.git#d6e23fe97751d40f181228d1d1c34b51fea23bea" dependencies = [ "apply", "ashpd", @@ -2823,6 +2937,7 @@ dependencies = [ "iced_winit", "lazy_static", "palette", + "rfd", "slotmap", "taffy", "thiserror", @@ -3699,6 +3814,18 @@ dependencies = [ "syn 2.0.48", ] +[[package]] +name = "pango-sys" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "436737e391a843e5933d6d9aa102cb126d501e815b83601365a948a518555dc5" +dependencies = [ + "glib-sys", + "gobject-sys", + "libc", + "system-deps", +] + [[package]] name = "parking" version = "2.2.0" @@ -3974,9 +4101,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.76" +version = "1.0.78" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95fc56cda0b5c3325f5fbbd7ff9fda9e02bb00bb3dac51252d2f1bfa1cb8cc8c" +checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" dependencies = [ "unicode-ident", ] @@ -4153,9 +4280,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.10.2" +version = "1.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" +checksum = "b62dbe01f0b06f9d8dc7d49e05a0785f153b00b2c227856282f671e0318c9b15" dependencies = [ "aho-corasick", "memchr", @@ -4165,9 +4292,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" +checksum = "3b7fa1134405e2ec9353fd416b17f8dacd46c473d7d3fd1cf202706a14eb792a" dependencies = [ "aho-corasick", "memchr", @@ -4203,6 +4330,30 @@ dependencies = [ "usvg", ] +[[package]] +name = "rfd" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0d8ab342bcc5436e04d3a4c1e09e17d74958bfaddf8d5fad6f85607df0f994f" +dependencies = [ + "ashpd", + "block", + "dispatch", + "glib-sys", + "gobject-sys", + "gtk-sys", + "js-sys", + "log", + "objc", + "objc-foundation", + "objc_id", + "raw-window-handle 0.5.2", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "windows-sys 0.48.0", +] + [[package]] name = "rgb" version = "0.8.37" @@ -4241,9 +4392,9 @@ checksum = "3cd14fd5e3b777a7422cca79358c57a8f6e3a703d9ac187448d0daf220c2407f" [[package]] name = "rust-embed" -version = "6.8.1" +version = "8.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a36224c3276f8c4ebc8c20f158eca7ca4359c8db89991c4925132aaaf6702661" +checksum = "a82c0bbc10308ed323529fd3c1dce8badda635aa319a5ff0e6466f33b8101e3f" dependencies = [ "rust-embed-impl", "rust-embed-utils", @@ -4252,9 +4403,9 @@ dependencies = [ [[package]] name = "rust-embed-impl" -version = "6.8.1" +version = "8.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49b94b81e5b2c284684141a2fb9e2a31be90638caf040bf9afbc5a0416afe1ac" +checksum = "6227c01b1783cdfee1bcf844eb44594cd16ec71c35305bf1c9fb5aade2735e16" dependencies = [ "proc-macro2", "quote", @@ -4265,9 +4416,9 @@ dependencies = [ [[package]] name = "rust-embed-utils" -version = "7.8.1" +version = "8.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d38ff6bf570dc3bb7100fce9f7b60c33fa71d80e88da3f2580df4ff2bdded74" +checksum = "8cb0a25bfbb2d4b4402179c2cf030387d9990857ce08a32592c6238db9fa8665" dependencies = [ "sha2", "walkdir", @@ -4757,6 +4908,19 @@ dependencies = [ "libc", ] +[[package]] +name = "system-deps" +version = "6.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a2d580ff6a20c55dfb86be5f9c238f67835d0e81cbdea8bf5680e0897320331" +dependencies = [ + "cfg-expr", + "heck", + "pkg-config", + "toml 0.8.8", + "version-compare", +] + [[package]] name = "systemicons" version = "0.7.0" @@ -4783,6 +4947,12 @@ dependencies = [ "slotmap", ] +[[package]] +name = "target-lexicon" +version = "0.12.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69758bda2e78f098e4ccb393021a0963bb3442eac05f135c30f61b7370bbafae" + [[package]] name = "tempfile" version = "3.9.0" @@ -5273,6 +5443,12 @@ version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" +[[package]] +name = "version-compare" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "579a42fc0b8e0c63b76519a339be31bed574929511fa53c1a3acae26eb258f29" + [[package]] name = "version_check" version = "0.9.4" @@ -5636,9 +5812,9 @@ dependencies = [ [[package]] name = "weezl" -version = "0.1.7" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9193164d4de03a926d909d3bc7c30543cecb35400c02114792c2cae20d5e2dbb" +checksum = "53a85b86a771b1c87058196170769dd264f66c0782acf1ae6cc51bfd64b39082" [[package]] name = "wgpu" diff --git a/Cargo.toml b/Cargo.toml index 63618461..707ff682 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,7 +7,7 @@ edition = "2021" chrono = { version = "0.4", features = ["unstable-locales"] } dirs = "5.0.1" env_logger = "0.10" -lazy_static = "1" +once_cell = "1.19" lexical-sort = "0.3.1" log = "0.4" paste = "1.0" @@ -15,9 +15,12 @@ serde = { version = "1", features = ["serde_derive"] } tokio = { version = "1" } trash = "3.2.0" # Internationalization -i18n-embed = { version = "0.13", features = ["fluent-system", "desktop-requester"] } -i18n-embed-fl = "0.6" -rust-embed = "6" +i18n-embed = { version = "0.14", features = [ + "fluent-system", + "desktop-requester", +] } +i18n-embed-fl = "0.7" +rust-embed = "8" [dependencies.libcosmic] git = "https://github.com/pop-os/libcosmic.git" diff --git a/src/localize.rs b/src/localize.rs index f5c6fb93..e0416ca9 100644 --- a/src/localize.rs +++ b/src/localize.rs @@ -4,23 +4,22 @@ use i18n_embed::{ fluent::{fluent_language_loader, FluentLanguageLoader}, DefaultLocalizer, LanguageLoader, Localizer, }; +use once_cell::sync::Lazy; use rust_embed::RustEmbed; #[derive(RustEmbed)] #[folder = "i18n/"] struct Localizations; -lazy_static::lazy_static! { - pub static ref LANGUAGE_LOADER: FluentLanguageLoader = { - let loader: FluentLanguageLoader = fluent_language_loader!(); +pub static LANGUAGE_LOADER: Lazy = Lazy::new(|| { + let loader: FluentLanguageLoader = fluent_language_loader!(); - loader - .load_fallback_language(&Localizations) - .expect("Error while loading fallback language"); + loader + .load_fallback_language(&Localizations) + .expect("Error while loading fallback language"); - loader - }; -} + loader +}); #[macro_export] macro_rules! fl { diff --git a/src/mime_icon.rs b/src/mime_icon.rs index 1b029e60..6246dedc 100644 --- a/src/mime_icon.rs +++ b/src/mime_icon.rs @@ -1,6 +1,7 @@ // SPDX-License-Identifier: GPL-3.0-only use cosmic::widget::icon; +use once_cell::sync::Lazy; use std::{collections::HashMap, path::Path, sync::Mutex}; pub const FALLBACK_MIME_ICON: &str = "text-x-generic"; @@ -39,10 +40,7 @@ impl MimeIconCache { .clone() } } - -lazy_static::lazy_static! { - static ref MIME_ICON_CACHE: Mutex = Mutex::new(MimeIconCache::new()); -} +static MIME_ICON_CACHE: Lazy> = Lazy::new(|| Mutex::new(MimeIconCache::new())); pub fn mime_icon>(path: P, size: u16) -> icon::Handle { //TODO: smarter path handling diff --git a/src/tab.rs b/src/tab.rs index f7bfe190..d2abb7c6 100644 --- a/src/tab.rs +++ b/src/tab.rs @@ -8,6 +8,7 @@ use cosmic::{ }, theme, widget, Element, }; +use once_cell::sync::Lazy; use std::{ cmp::Ordering, collections::HashMap, @@ -24,41 +25,37 @@ const DOUBLE_CLICK_DURATION: Duration = Duration::from_millis(500); //TODO: configurable const ICON_SIZE_LIST: u16 = 32; const ICON_SIZE_GRID: u16 = 64; - -lazy_static::lazy_static! { - static ref SPECIAL_DIRS: HashMap = { - let mut special_dirs = HashMap::new(); - if let Some(dir) = dirs::document_dir() { - special_dirs.insert(dir, "folder-documents"); - } - if let Some(dir) = dirs::download_dir() { - special_dirs.insert(dir, "folder-download"); - } - if let Some(dir) = dirs::audio_dir() { - special_dirs.insert(dir, "folder-music"); - } - if let Some(dir) = dirs::picture_dir() { - special_dirs.insert(dir, "folder-pictures"); - } - if let Some(dir) = dirs::public_dir() { - special_dirs.insert(dir, "folder-publicshare"); - } - if let Some(dir) = dirs::template_dir() { - special_dirs.insert(dir, "folder-templates"); - } - if let Some(dir) = dirs::video_dir() { - special_dirs.insert(dir, "folder-videos"); - } - if let Some(dir) = dirs::desktop_dir() { - special_dirs.insert(dir, "user-desktop"); - } - if let Some(dir) = dirs::home_dir() { - special_dirs.insert(dir, "user-home"); - } - special_dirs - }; -} - +static SPECIAL_DIRS: Lazy> = Lazy::new(|| { + let mut special_dirs = HashMap::new(); + if let Some(dir) = dirs::document_dir() { + special_dirs.insert(dir, "folder-documents"); + } + if let Some(dir) = dirs::download_dir() { + special_dirs.insert(dir, "folder-download"); + } + if let Some(dir) = dirs::audio_dir() { + special_dirs.insert(dir, "folder-music"); + } + if let Some(dir) = dirs::picture_dir() { + special_dirs.insert(dir, "folder-pictures"); + } + if let Some(dir) = dirs::public_dir() { + special_dirs.insert(dir, "folder-publicshare"); + } + if let Some(dir) = dirs::template_dir() { + special_dirs.insert(dir, "folder-templates"); + } + if let Some(dir) = dirs::video_dir() { + special_dirs.insert(dir, "folder-videos"); + } + if let Some(dir) = dirs::desktop_dir() { + special_dirs.insert(dir, "user-desktop"); + } + if let Some(dir) = dirs::home_dir() { + special_dirs.insert(dir, "user-home"); + } + special_dirs +}); fn button_style(selected: bool) -> theme::Button { //TODO: move to libcosmic theme::Button::Custom { From cb630b71bff6bb55cd01a57994b22fac03efd6e5 Mon Sep 17 00:00:00 2001 From: Wyatt Herkamp Date: Sun, 28 Jan 2024 06:23:40 -0500 Subject: [PATCH 2/2] Fix Windows Bug --- Cargo.lock | 307 ++++++++++++++++++++++++++++++----------------------- Cargo.toml | 2 +- src/tab.rs | 12 ++- 3 files changed, 187 insertions(+), 134 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 74ff1701..94f904c2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -103,17 +103,6 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aae1277d39aeec15cb388266ecc24b11c80469deae6067e17a1a7aa9e5c1f234" -[[package]] -name = "ahash" -version = "0.7.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a824f2aa7e75a0c98c5a504fceb80649e9c35265d44525b5f94de4771a395cd" -dependencies = [ - "getrandom", - "once_cell", - "version_check", -] - [[package]] name = "ahash" version = "0.8.7" @@ -205,6 +194,54 @@ dependencies = [ "libc", ] +[[package]] +name = "anstream" +version = "0.6.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e2e1ebcb11de5c03c67de28a7df593d32191b44939c482e97702baaaa6ab6a5" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7079075b41f533b8c61d2a4d073c4676e1f8b249ff94a393b0595db304e0dd87" + +[[package]] +name = "anstyle-parse" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c75ac65da39e5fe5ab759307499ddad880d724eed2f6ce5b5e8a26f4f387928c" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e28923312444cdd728e4738b3f9c9cac739500909bb3d3c94b43551b16517648" +dependencies = [ + "windows-sys 0.52.0", +] + +[[package]] +name = "anstyle-wincon" +version = "3.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1cd54b81ec8d6180e24654d0b371ad22fc3dd083b6ff8ba325b72e00c87660a7" +dependencies = [ + "anstyle", + "windows-sys 0.52.0", +] + [[package]] name = "any_ascii" version = "0.1.7" @@ -641,9 +678,9 @@ checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" [[package]] name = "bytemuck" -version = "1.14.0" +version = "1.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "374d28ec25809ee0e23827c2ab573d729e293f281dfe393500e7ad618baa61c6" +checksum = "ed2490600f404f2b94c167e31d3ed1d5f3c225a0f3b80230053b3e0b7b962bd9" dependencies = [ "bytemuck_derive", ] @@ -771,9 +808,9 @@ checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" [[package]] name = "chrono" -version = "0.4.32" +version = "0.4.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41daef31d7a747c5c847246f36de49ced6f7403b4cdabc807a97b5cc184cda7a" +checksum = "9f13690e35a5e4ace198e7beea2895d29f3a9cc55015fcebe6336bd2010af9eb" dependencies = [ "android-tzdata", "iana-time-zone", @@ -887,6 +924,12 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b" +[[package]] +name = "colorchoice" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" + [[package]] name = "com-rs" version = "0.2.1" @@ -902,6 +945,26 @@ dependencies = [ "crossbeam-utils", ] +[[package]] +name = "const-random" +version = "0.1.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5aaf16c9c2c612020bcfd042e170f6e32de9b9d75adb5277cdbbd2e2c8c8299a" +dependencies = [ + "const-random-macro", +] + +[[package]] +name = "const-random-macro" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9d839f2a20b0aee515dc581a6172f2321f96cab76c1a38a4c584a194955390e" +dependencies = [ + "getrandom", + "once_cell", + "tiny-keccak", +] + [[package]] name = "core-foundation" version = "0.7.0" @@ -999,22 +1062,24 @@ dependencies = [ [[package]] name = "cosmic-config" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic.git#d6e23fe97751d40f181228d1d1c34b51fea23bea" +source = "git+https://github.com/pop-os/libcosmic.git#213ede371b8f37780267542eb2e1af09ca0173fc" dependencies = [ "atomicwrites", "cosmic-config-derive", - "dirs 5.0.1", + "dirs", "iced_futures", + "known-folders", "notify", "once_cell", "ron", "serde", + "xdg", ] [[package]] name = "cosmic-config-derive" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic.git#d6e23fe97751d40f181228d1d1c34b51fea23bea" +source = "git+https://github.com/pop-os/libcosmic.git#213ede371b8f37780267542eb2e1af09ca0173fc" dependencies = [ "quote", "syn 1.0.109", @@ -1025,7 +1090,7 @@ name = "cosmic-files" version = "0.1.0" dependencies = [ "chrono", - "dirs 5.0.1", + "dirs", "env_logger", "fork", "i18n-embed", @@ -1067,7 +1132,7 @@ dependencies = [ [[package]] name = "cosmic-theme" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic.git#d6e23fe97751d40f181228d1d1c34b51fea23bea" +source = "git+https://github.com/pop-os/libcosmic.git#213ede371b8f37780267542eb2e1af09ca0173fc" dependencies = [ "almost", "cosmic-config", @@ -1294,7 +1359,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856" dependencies = [ "cfg-if 1.0.0", - "hashbrown 0.14.3", + "hashbrown", "lock_api", "once_cell", "parking_lot_core 0.9.9", @@ -1349,22 +1414,13 @@ dependencies = [ "crypto-common", ] -[[package]] -name = "dirs" -version = "4.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3aa72a6f96ea37bbc5aa912f6788242832f75369bdfdadcb0e38423f100059" -dependencies = [ - "dirs-sys 0.3.7", -] - [[package]] name = "dirs" version = "5.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" dependencies = [ - "dirs-sys 0.4.1", + "dirs-sys", ] [[package]] @@ -1377,17 +1433,6 @@ dependencies = [ "dirs-sys-next", ] -[[package]] -name = "dirs-sys" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6" -dependencies = [ - "libc", - "redox_users", - "winapi", -] - [[package]] name = "dirs-sys" version = "0.4.1" @@ -1448,9 +1493,12 @@ dependencies = [ [[package]] name = "dlv-list" -version = "0.3.0" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0688c2a7f92e427f44895cd63841bff7b29f8d7a1648b9e7e07a4a365b2e1257" +checksum = "442039f5147480ba31067cb00ada1adae6892028e40e45fc5de7b7df6dcc1b5f" +dependencies = [ + "const-random", +] [[package]] name = "downcast-rs" @@ -1520,17 +1568,27 @@ dependencies = [ "syn 2.0.48", ] +[[package]] +name = "env_filter" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a009aa4810eb158359dda09d0c87378e4bbb89b5a801f016885a4707ba24f7ea" +dependencies = [ + "log", + "regex", +] + [[package]] name = "env_logger" -version = "0.10.2" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cd405aab171cb85d6735e5c8d9db038c17d3ca007a4d2c25f337935c3d90580" +checksum = "05e7cf40684ae96ade6232ed84582f40ce0a66efcd43a5117aef610534f8e0b8" dependencies = [ + "anstream", + "anstyle", + "env_filter", "humantime", - "is-terminal", "log", - "regex", - "termcolor", ] [[package]] @@ -1782,11 +1840,11 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "fontconfig-parser" -version = "0.5.3" +version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "674e258f4b5d2dcd63888c01c68413c51f565e8af99d2f7701c7b81d79ef41c4" +checksum = "6a595cb550439a117696039dfc69830492058211b771a2a165379f2a1a53d84d" dependencies = [ - "roxmltree 0.18.1", + "roxmltree", ] [[package]] @@ -1797,7 +1855,7 @@ checksum = "98b88c54a38407f7352dd2c4238830115a6377741098ffd1f997c813d0e088a6" dependencies = [ "fontconfig-parser", "log", - "memmap2 0.9.3", + "memmap2 0.9.4", "slotmap", "tinyvec", "ttf-parser 0.20.0", @@ -1875,11 +1933,11 @@ dependencies = [ [[package]] name = "freedesktop-icons" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9d46a9ae065c46efb83854bb10315de6d333bb6f4526ebe320c004dab7857e" +checksum = "b5339cbd60b2ff6b95ef212ab96bc80bf1a9dff2821b9966c417cdfae2808796" dependencies = [ - "dirs 4.0.0", + "dirs", "once_cell", "rust-ini", "thiserror", @@ -2242,7 +2300,7 @@ checksum = "cc11df1ace8e7e564511f53af41f3e42ddc95b56fd07b3f4445d2a6048bc682c" dependencies = [ "bitflags 2.4.2", "gpu-descriptor-types", - "hashbrown 0.14.3", + "hashbrown", ] [[package]] @@ -2298,22 +2356,13 @@ dependencies = [ "crunchy", ] -[[package]] -name = "hashbrown" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" -dependencies = [ - "ahash 0.7.7", -] - [[package]] name = "hashbrown" version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" dependencies = [ - "ahash 0.8.7", + "ahash", "allocator-api2", ] @@ -2458,7 +2507,7 @@ dependencies = [ [[package]] name = "iced" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#d6e23fe97751d40f181228d1d1c34b51fea23bea" +source = "git+https://github.com/pop-os/libcosmic.git#213ede371b8f37780267542eb2e1af09ca0173fc" dependencies = [ "iced_accessibility", "iced_core", @@ -2473,7 +2522,7 @@ dependencies = [ [[package]] name = "iced_accessibility" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic.git#d6e23fe97751d40f181228d1d1c34b51fea23bea" +source = "git+https://github.com/pop-os/libcosmic.git#213ede371b8f37780267542eb2e1af09ca0173fc" dependencies = [ "accesskit", "accesskit_winit", @@ -2482,7 +2531,7 @@ dependencies = [ [[package]] name = "iced_core" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#d6e23fe97751d40f181228d1d1c34b51fea23bea" +source = "git+https://github.com/pop-os/libcosmic.git#213ede371b8f37780267542eb2e1af09ca0173fc" dependencies = [ "bitflags 1.3.2", "instant", @@ -2498,7 +2547,7 @@ dependencies = [ [[package]] name = "iced_futures" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#d6e23fe97751d40f181228d1d1c34b51fea23bea" +source = "git+https://github.com/pop-os/libcosmic.git#213ede371b8f37780267542eb2e1af09ca0173fc" dependencies = [ "futures", "iced_core", @@ -2511,7 +2560,7 @@ dependencies = [ [[package]] name = "iced_graphics" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#d6e23fe97751d40f181228d1d1c34b51fea23bea" +source = "git+https://github.com/pop-os/libcosmic.git#213ede371b8f37780267542eb2e1af09ca0173fc" dependencies = [ "bitflags 1.3.2", "bytemuck", @@ -2534,7 +2583,7 @@ dependencies = [ [[package]] name = "iced_renderer" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#d6e23fe97751d40f181228d1d1c34b51fea23bea" +source = "git+https://github.com/pop-os/libcosmic.git#213ede371b8f37780267542eb2e1af09ca0173fc" dependencies = [ "iced_graphics", "iced_tiny_skia", @@ -2547,7 +2596,7 @@ dependencies = [ [[package]] name = "iced_runtime" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#d6e23fe97751d40f181228d1d1c34b51fea23bea" +source = "git+https://github.com/pop-os/libcosmic.git#213ede371b8f37780267542eb2e1af09ca0173fc" dependencies = [ "iced_core", "iced_futures", @@ -2557,7 +2606,7 @@ dependencies = [ [[package]] name = "iced_style" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#d6e23fe97751d40f181228d1d1c34b51fea23bea" +source = "git+https://github.com/pop-os/libcosmic.git#213ede371b8f37780267542eb2e1af09ca0173fc" dependencies = [ "iced_core", "once_cell", @@ -2567,7 +2616,7 @@ dependencies = [ [[package]] name = "iced_tiny_skia" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#d6e23fe97751d40f181228d1d1c34b51fea23bea" +source = "git+https://github.com/pop-os/libcosmic.git#213ede371b8f37780267542eb2e1af09ca0173fc" dependencies = [ "bytemuck", "cosmic-text", @@ -2585,7 +2634,7 @@ dependencies = [ [[package]] name = "iced_wgpu" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#d6e23fe97751d40f181228d1d1c34b51fea23bea" +source = "git+https://github.com/pop-os/libcosmic.git#213ede371b8f37780267542eb2e1af09ca0173fc" dependencies = [ "bitflags 1.3.2", "bytemuck", @@ -2605,7 +2654,7 @@ dependencies = [ [[package]] name = "iced_widget" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#d6e23fe97751d40f181228d1d1c34b51fea23bea" +source = "git+https://github.com/pop-os/libcosmic.git#213ede371b8f37780267542eb2e1af09ca0173fc" dependencies = [ "iced_renderer", "iced_runtime", @@ -2619,7 +2668,7 @@ dependencies = [ [[package]] name = "iced_winit" version = "0.12.0" -source = "git+https://github.com/pop-os/libcosmic.git#d6e23fe97751d40f181228d1d1c34b51fea23bea" +source = "git+https://github.com/pop-os/libcosmic.git#213ede371b8f37780267542eb2e1af09ca0173fc" dependencies = [ "iced_graphics", "iced_runtime", @@ -2699,7 +2748,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" dependencies = [ "equivalent", - "hashbrown 0.14.3", + "hashbrown", ] [[package]] @@ -2764,17 +2813,6 @@ dependencies = [ "windows-sys 0.48.0", ] -[[package]] -name = "is-terminal" -version = "0.4.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bad00257d07be169d870ab665980b06cdb366d792ad690bf2e76876dc503455" -dependencies = [ - "hermit-abi", - "rustix 0.38.30", - "windows-sys 0.52.0", -] - [[package]] name = "jni-sys" version = "0.3.0" @@ -2843,6 +2881,15 @@ version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2db585e1d738fc771bf08a151420d3ed193d9d895a36df7f6f8a9456b911ddc" +[[package]] +name = "known-folders" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4397c789f2709d23cfcb703b316e0766a8d4b17db2d47b0ab096ef6047cae1d8" +dependencies = [ + "windows-sys 0.52.0", +] + [[package]] name = "kqueue" version = "1.0.8" @@ -2915,7 +2962,7 @@ checksum = "13e3bf6590cbc649f4d1a3eefc9d5d6eb746f5200ffb04e5e142700b8faa56e7" [[package]] name = "libcosmic" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic.git#d6e23fe97751d40f181228d1d1c34b51fea23bea" +source = "git+https://github.com/pop-os/libcosmic.git#213ede371b8f37780267542eb2e1af09ca0173fc" dependencies = [ "apply", "ashpd", @@ -3053,7 +3100,7 @@ version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2994eeba8ed550fd9b47a0b38f0242bc3344e496483c6180b69139cc2fa5d1d7" dependencies = [ - "hashbrown 0.14.3", + "hashbrown", ] [[package]] @@ -3143,9 +3190,9 @@ dependencies = [ [[package]] name = "memmap2" -version = "0.9.3" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45fd3a57831bf88bc63f8cebc0cf956116276e97fef3966103e96416209f7c92" +checksum = "fe751422e4a8caa417e13c3ea66452215d7d63e19e604f4980461212f3ae1322" dependencies = [ "libc", ] @@ -3730,12 +3777,12 @@ dependencies = [ [[package]] name = "ordered-multimap" -version = "0.4.3" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccd746e37177e1711c20dd619a1620f34f5c8b569c53590a72dedd5344d8924a" +checksum = "a4d6a8c22fc714f0c2373e6091bf6f5e9b37b1bc0b1184874b7e0a4e303d318f" dependencies = [ "dlv-list", - "hashbrown 0.12.3", + "hashbrown", ] [[package]] @@ -3942,18 +3989,18 @@ checksum = "5be167a7af36ee22fe3115051bc51f6e6c7054c9348e28deb4f49bd6f705a315" [[package]] name = "pin-project" -version = "1.1.3" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fda4ed1c6c173e3fc7a83629421152e01d7b1f9b7f65fb301e490e8cfc656422" +checksum = "0302c4a0442c456bd56f841aee5c3bfd17967563f6fadc9ceb9f9c23cf3807e0" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.3" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" +checksum = "266c042b60c9c76b8d53061e52b2e0d1116abc57cefc8c5cd671619a56ac3690" dependencies = [ "proc-macro2", "quote", @@ -4292,9 +4339,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b7fa1134405e2ec9353fd416b17f8dacd46c473d7d3fd1cf202706a14eb792a" +checksum = "5bb987efffd3c6d0d8f5f89510bb458559eab11e4f869acb20bf845e016259cd" dependencies = [ "aho-corasick", "memchr", @@ -4375,15 +4422,6 @@ dependencies = [ "serde_derive", ] -[[package]] -name = "roxmltree" -version = "0.18.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "862340e351ce1b271a378ec53f304a5558f7db87f3769dc655a8f6ecbb68b302" -dependencies = [ - "xmlparser", -] - [[package]] name = "roxmltree" version = "0.19.0" @@ -4426,9 +4464,9 @@ dependencies = [ [[package]] name = "rust-ini" -version = "0.18.0" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6d5f2436026b4f6e79dc829837d467cc7e9a55ee40e750d716713540715a2df" +checksum = "3e0698206bcb8882bf2a9ecb4c1e7785db57ff052297085a6efd4fe42302068a" dependencies = [ "cfg-if 1.0.0", "ordered-multimap", @@ -4562,18 +4600,18 @@ checksum = "58bf37232d3bb9a2c4e641ca2a11d83b5062066f88df7fed36c28772046d65ba" [[package]] name = "serde" -version = "1.0.195" +version = "1.0.196" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63261df402c67811e9ac6def069e4786148c4563f4b50fd4bf30aa370d626b02" +checksum = "870026e60fa08c69f064aa766c10f10b1d62db9ccd4d0abb206472bee0ce3b32" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.195" +version = "1.0.196" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46fe8f8603d81ba86327b23a2e9cdf49e1255fb94a4c5f297f6ee0547178ea2c" +checksum = "33c85360c95e7d137454dc81d9a4ed2b8efd8fbe19cee57357b32b9771fccb67" dependencies = [ "proc-macro2", "quote", @@ -4725,7 +4763,7 @@ dependencies = [ "cursor-icon", "libc", "log", - "memmap2 0.9.3", + "memmap2 0.9.4", "rustix 0.38.30", "thiserror", "wayland-backend", @@ -4784,7 +4822,7 @@ dependencies = [ "foreign-types 0.5.0", "js-sys", "log", - "memmap2 0.9.3", + "memmap2 0.9.4", "objc", "raw-window-handle 0.5.2", "redox_syscall 0.4.1", @@ -5017,6 +5055,15 @@ dependencies = [ "weezl", ] +[[package]] +name = "tiny-keccak" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" +dependencies = [ + "crunchy", +] + [[package]] name = "tiny-skia" version = "0.8.4" @@ -5402,7 +5449,7 @@ dependencies = [ "imagesize", "kurbo", "log", - "roxmltree 0.19.0", + "roxmltree", "simplecss", "siphasher", "svgtypes", @@ -5437,6 +5484,12 @@ dependencies = [ "tiny-skia-path 0.11.3", ] +[[package]] +name = "utf8parse" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" + [[package]] name = "vec_map" version = "0.8.2" @@ -6305,9 +6358,9 @@ dependencies = [ [[package]] name = "winnow" -version = "0.5.34" +version = "0.5.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7cf47b659b318dccbd69cc4797a39ae128f533dce7902a1096044d1967b9c16" +checksum = "1931d78a9c73861da0134f453bb1f790ce49b2e30eba8410b4b79bac72b46a2d" dependencies = [ "memchr", ] @@ -6413,12 +6466,6 @@ version = "0.8.19" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fcb9cbac069e033553e8bb871be2fbdffcab578eb25bd0f7c508cedc6dcd75a" -[[package]] -name = "xmlparser" -version = "0.13.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66fee0b777b0f5ac1c69bb06d361268faafa61cd4682ae064a171c16c433e9e4" - [[package]] name = "xmlwriter" version = "0.1.0" diff --git a/Cargo.toml b/Cargo.toml index 707ff682..95e1899b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" [dependencies] chrono = { version = "0.4", features = ["unstable-locales"] } dirs = "5.0.1" -env_logger = "0.10" +env_logger = "0.11" once_cell = "1.19" lexical-sort = "0.3.1" log = "0.4" diff --git a/src/tab.rs b/src/tab.rs index d2abb7c6..cccbe8f0 100644 --- a/src/tab.rs +++ b/src/tab.rs @@ -169,10 +169,16 @@ fn open_command(path: &PathBuf) -> process::Command { #[cfg(target_os = "windows")] fn open_command(path: &PathBuf) -> process::Command { + use std::os::windows::process::CommandExt; + let mut command = process::Command::new("cmd"); - command.arg("/c"); - command.arg("start"); - command.arg(path); + + command + .arg("/c") + .arg("start") + .raw_arg("\"\"") + .arg(path) + .creation_flags(0x08000000); command }