diff --git a/Cargo.lock b/Cargo.lock index 3834662..f32efbe 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3,29 +3,27 @@ version = 3 [[package]] -name = "aho-corasick" -version = "0.7.20" +name = "addr2line" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc936419f96fa211c1b9166887b38e5e40b19958e5b895be7c1f93adec7071ac" +checksum = "6e4503c46a5c0c7844e948c9a4d6acd9f50cccb4de1c48eb9e291ea17470c678" dependencies = [ - "memchr", + "gimli", ] [[package]] -name = "anyhow" -version = "1.0.69" +name = "adler" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "224afbd727c3d6e4b90103ece64b8d1b67fbb1973b1046c2281eed3f3803f800" +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" [[package]] -name = "async-trait" -version = "0.1.66" +name = "aho-corasick" +version = "0.7.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b84f9ebcc6c1f5b8cb160f6990096a5c127f423fcb6e1ccc46c370cbdfb75dfc" +checksum = "cc936419f96fa211c1b9166887b38e5e40b19958e5b895be7c1f93adec7071ac" dependencies = [ - "proc-macro2", - "quote", - "syn", + "memchr", ] [[package]] @@ -34,11 +32,26 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +[[package]] +name = "backtrace" +version = "0.3.73" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5cc23269a4f8976d0a4d2e7109211a419fe30e8d88d677cd60b6bc79c5732e0a" +dependencies = [ + "addr2line", + "cc", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", +] + [[package]] name = "bitflags" -version = "1.3.2" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" [[package]] name = "block" @@ -54,23 +67,22 @@ checksum = "0d261e256854913907f67ed06efbc3338dfe6179796deefc1ff763fc1aee5535" [[package]] name = "cairo-rs" -version = "0.16.7" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3125b15ec28b84c238f6f476c6034016a5f6cc0221cb514ca46c532139fc97d" +checksum = "797fd5a634dcb0ad0d7d583df794deb0a236d88e759cd34b7da20198c6c9d145" dependencies = [ "bitflags", "cairo-sys-rs", "glib", "libc", - "once_cell", "thiserror", ] [[package]] name = "cairo-sys-rs" -version = "0.16.3" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c48f4af05fabdcfa9658178e1326efa061853f040ce7d72e33af6885196f421" +checksum = "428290f914b9b86089f60f5d8a9f6e440508e1bcff23b25afd51502b0a2da88f" dependencies = [ "glib-sys", "libc", @@ -79,17 +91,18 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.79" +version = "1.0.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" +checksum = "96c51067fd44124faa7f870b4b1c969379ad32b2ba805aa959430ceaa384f695" [[package]] name = "cfg-expr" -version = "0.11.0" +version = "0.15.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0357a6402b295ca3a86bc148e84df46c02e41f41fef186bda662557ef6328aa" +checksum = "d067ad48b8650848b989a59a86c6c36a995d02d2bf778d45c3c5d57bc2718f02" dependencies = [ "smallvec", + "target-lexicon", ] [[package]] @@ -117,6 +130,21 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "deranged" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" +dependencies = [ + "powerfmt", +] + +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + [[package]] name = "field-offset" version = "0.3.5" @@ -129,14 +157,13 @@ dependencies = [ [[package]] name = "flume" -version = "0.10.14" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1657b4441c3403d9f7b3409e47575237dac27b1b5726df654a6ecbf92f0f7577" +checksum = "55ac459de2512911e4b674ce33cf20befaba382d05b62b008afc1c8b57cbf181" dependencies = [ "futures-core", "futures-sink", "nanorand", - "pin-project", "spin", ] @@ -148,9 +175,9 @@ checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" [[package]] name = "futures" -version = "0.3.26" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13e2792b0ff0340399d58445b88fd9770e3489eff258a4cbc1523418f12abf84" +checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" dependencies = [ "futures-channel", "futures-core", @@ -163,9 +190,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.26" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e5317663a9089767a1ec00a487df42e0ca174b61b4483213ac24448e4664df5" +checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" dependencies = [ "futures-core", "futures-sink", @@ -173,15 +200,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.26" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec90ff4d0fe1f57d600049061dc6bb68ed03c7d2fbd697274c41805dcb3f8608" +checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" [[package]] name = "futures-executor" -version = "0.3.26" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8de0a35a6ab97ec8869e32a2473f4b1324459e14c29275d14b10cb1fd19b50e" +checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" dependencies = [ "futures-core", "futures-task", @@ -190,38 +217,38 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.26" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfb8371b6fb2aeb2d280374607aeabfc99d95c72edfe51692e42d3d7f0d08531" +checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" [[package]] name = "futures-macro" -version = "0.3.26" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95a73af87da33b5acf53acfebdc339fe592ecf5357ac7c0a7734ab9d8c876a70" +checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.72", ] [[package]] name = "futures-sink" -version = "0.3.26" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f310820bb3e8cfd46c80db4d7fb8353e15dfff853a127158425f31e0be6c8364" +checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" [[package]] name = "futures-task" -version = "0.3.26" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcf79a1bf610b10f42aea489289c5a2c478a786509693b80cd39c44ccd936366" +checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" [[package]] name = "futures-util" -version = "0.3.26" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c1d6de3acfef38d2be4b1f543f553131788603495be83da675e180c8d6b7bd1" +checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" dependencies = [ "futures-channel", "futures-core", @@ -237,11 +264,10 @@ dependencies = [ [[package]] name = "gdk-pixbuf" -version = "0.16.7" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3578c60dee9d029ad86593ed88cb40f35c1b83360e12498d055022385dd9a05" +checksum = "28bb53ecb56857c683c9ec859908e076dd3969c7d67598bd8b1ce095d211304a" dependencies = [ - "bitflags", "gdk-pixbuf-sys", "gio", "glib", @@ -250,9 +276,9 @@ dependencies = [ [[package]] name = "gdk-pixbuf-sys" -version = "0.16.3" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3092cf797a5f1210479ea38070d9ae8a5b8e9f8f1be9f32f4643c529c7d70016" +checksum = "9f6681a0c1330d1d3968bec1529f7172d62819ef0bdbb0d18022320654158b03" dependencies = [ "gio-sys", "glib-sys", @@ -263,11 +289,10 @@ dependencies = [ [[package]] name = "gdk4" -version = "0.5.5" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb2181330ebf9d091f8ea7fed6877f7adc92114128592e1fdaeb1da28e0d01e9" +checksum = "4b7d7237c1487ed4b300aac7744efcbf1319e12d60d7afcd6f505414bd5b5dea" dependencies = [ - "bitflags", "cairo-rs", "gdk-pixbuf", "gdk4-sys", @@ -279,9 +304,9 @@ dependencies = [ [[package]] name = "gdk4-sys" -version = "0.5.5" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de55cb49432901fe2b3534177fa06844665b9b0911d85d8601a8d8b88b7791db" +checksum = "a67576c8ec012156d7f680e201a807b4432a77babb3157e0555e990ab6bcd878" dependencies = [ "cairo-sys-rs", "gdk-pixbuf-sys", @@ -327,13 +352,18 @@ dependencies = [ "temp-dir", ] +[[package]] +name = "gimli" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" + [[package]] name = "gio" -version = "0.16.7" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a1c84b4534a290a29160ef5c6eff2a9c95833111472e824fc5cb78b513dd092" +checksum = "398e3da68749fdc32783cbf7521ec3f65c9cf946db8c7774f8460af49e52c6e2" dependencies = [ - "bitflags", "futures-channel", "futures-core", "futures-io", @@ -341,7 +371,6 @@ dependencies = [ "gio-sys", "glib", "libc", - "once_cell", "pin-project-lite", "smallvec", "thiserror", @@ -349,22 +378,22 @@ dependencies = [ [[package]] name = "gio-sys" -version = "0.16.3" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9b693b8e39d042a95547fc258a7b07349b1f0b48f4b2fa3108ba3c51c0b5229" +checksum = "e4feb96b31c32730ea3e1e89aecd2e4e37ecb1c473ad8f685e3430a159419f63" dependencies = [ "glib-sys", "gobject-sys", "libc", "system-deps", - "winapi", + "windows-sys", ] [[package]] name = "glib" -version = "0.16.7" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddd4df61a866ed7259d6189b8bcb1464989a77f1d85d25d002279bbe9dd38b2f" +checksum = "fee90a615ce05be7a32932cfb8adf2c4bbb4700e80d37713c981fb24c0c56238" dependencies = [ "bitflags", "futures-channel", @@ -377,31 +406,29 @@ dependencies = [ "glib-sys", "gobject-sys", "libc", - "once_cell", + "memchr", "smallvec", "thiserror", ] [[package]] name = "glib-macros" -version = "0.16.3" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e084807350b01348b6d9dbabb724d1a0bb987f47a2c85de200e98e12e30733bf" +checksum = "4da558d8177c0c8c54368818b508a4244e1286fce2858cef4e547023f0cfa5ef" dependencies = [ - "anyhow", "heck", "proc-macro-crate", - "proc-macro-error", "proc-macro2", "quote", - "syn", + "syn 2.0.72", ] [[package]] name = "glib-sys" -version = "0.16.3" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c61a4f46316d06bfa33a7ac22df6f0524c8be58e3db2d9ca99ccb1f357b62a65" +checksum = "4958c26e5a01c9af00dea669a97369eccbec29a8e6d125c24ea2d85ee7467b60" dependencies = [ "libc", "system-deps", @@ -409,9 +436,9 @@ dependencies = [ [[package]] name = "gobject-sys" -version = "0.16.3" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3520bb9c07ae2a12c7f2fbb24d4efc11231c8146a86956413fb1a79bb760a0f1" +checksum = "c6908864f5ffff15b56df7e90346863904f49b949337ed0456b9287af61903b8" dependencies = [ "glib-sys", "libc", @@ -420,9 +447,9 @@ dependencies = [ [[package]] name = "graphene-rs" -version = "0.16.3" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95ecb4d347e6d09820df3bdfd89a74a8eec07753a06bb92a3aac3ad31d04447b" +checksum = "630e940ad5824f90221d6579043a9cd1f8bec86b4a17faaf7827d58eb16e8c1f" dependencies = [ "glib", "graphene-sys", @@ -431,9 +458,9 @@ dependencies = [ [[package]] name = "graphene-sys" -version = "0.16.3" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9aa82337d3972b4eafdea71e607c23f47be6f27f749aab613f1ad8ddbe6dcd6" +checksum = "6fb8fade7b754982f47ebbed241fd2680816fdd4598321784da10b9e1168836a" dependencies = [ "glib-sys", "libc", @@ -443,11 +470,10 @@ dependencies = [ [[package]] name = "gsk4" -version = "0.5.5" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "591239f5c52ca803b222124ac9c47f230cd180cee9b114c4d672e4a94b74f491" +checksum = "1f3cf2091e1af185b347b3450817d93dea6fe435df7abd4c2cd7fb5bcb4cfda8" dependencies = [ - "bitflags", "cairo-rs", "gdk4", "glib", @@ -459,9 +485,9 @@ dependencies = [ [[package]] name = "gsk4-sys" -version = "0.5.5" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "195a63f0be42529f98c3eb3bae0decfd0428ba2cc683b3e20ced88f340904ec5" +checksum = "6aa69614a26d8760c186c3690f1b0fbb917572ca23ef83137445770ceddf8cde" dependencies = [ "cairo-sys-rs", "gdk4-sys", @@ -475,11 +501,10 @@ dependencies = [ [[package]] name = "gtk4" -version = "0.5.5" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd89dba65def483a233dc4fdd3f3dab01576e3d83f80f6c9303ebe421661855e" +checksum = "eaffc6c743c9160514cc9b67eace364e5dc5798369fa809cdb04e035c21c5c5d" dependencies = [ - "bitflags", "cairo-rs", "field-offset", "futures-channel", @@ -492,29 +517,26 @@ dependencies = [ "gtk4-macros", "gtk4-sys", "libc", - "once_cell", "pango", ] [[package]] name = "gtk4-macros" -version = "0.5.5" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "832687a415d9d8bc11fe9c17dda1bf13ee262c41b995dd4df1d1cce33cead405" +checksum = "188211f546ce5801f6d0245c37b6249143a2cb4fa040e54829ca1e76796e9f09" dependencies = [ - "anyhow", "proc-macro-crate", - "proc-macro-error", "proc-macro2", "quote", - "syn", + "syn 2.0.72", ] [[package]] name = "gtk4-sys" -version = "0.5.5" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e370564e3fdacff7cffc99f7366b6a4689feb44e819d3ccee598a9a215b71605" +checksum = "1114a207af8ada02cf4658a76692f4190f06f093380d5be07e3ca8b43aa7c666" dependencies = [ "cairo-sys-rs", "gdk-pixbuf-sys", @@ -531,15 +553,15 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.12.3" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" [[package]] name = "heck" -version = "0.4.1" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" [[package]] name = "hermit-abi" @@ -552,11 +574,11 @@ dependencies = [ [[package]] name = "indexmap" -version = "1.9.2" +version = "2.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399" +checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" dependencies = [ - "autocfg", + "equivalent", "hashbrown", ] @@ -583,28 +605,24 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libadwaita" -version = "0.2.1" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9dfa0722d4f1724f661cbf668c273c5926296ca411ed3814e206f8fd082b6c48" +checksum = "2ff9c222b5c783729de45185f07b2fec2d43a7f9c63961e777d3667e20443878" dependencies = [ - "bitflags", - "futures-channel", - "gdk-pixbuf", "gdk4", "gio", "glib", "gtk4", "libadwaita-sys", "libc", - "once_cell", "pango", ] [[package]] name = "libadwaita-sys" -version = "0.2.1" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de902982372b454a0081d7fd9dd567b37b73ae29c8f6da1820374d345fd95d5b" +checksum = "1c44d8bdbad31d6639e1f20cc9c1424f1a8e02d751fc28d44659bf743fb9eca6" dependencies = [ "gdk4-sys", "gio-sys", @@ -618,9 +636,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.139" +version = "0.2.155" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "201de327520df007757c1f0adce6e827fe8562fbc28bfd9c15571c66ca1f5f79" +checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" [[package]] name = "locale_config" @@ -665,9 +683,9 @@ dependencies = [ [[package]] name = "memchr" -version = "2.5.0" +version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] name = "memoffset" @@ -678,6 +696,15 @@ dependencies = [ "autocfg", ] +[[package]] +name = "miniz_oxide" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08" +dependencies = [ + "adler", +] + [[package]] name = "nanorand" version = "0.7.0" @@ -697,6 +724,12 @@ dependencies = [ "winapi", ] +[[package]] +name = "num-conv" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" + [[package]] name = "num_cpus" version = "1.15.0" @@ -736,11 +769,20 @@ dependencies = [ "objc", ] +[[package]] +name = "object" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "576dfe1fc8f9df304abb159d767a29d0476f7750fbf8aa7ad07816004a207434" +dependencies = [ + "memchr", +] + [[package]] name = "once_cell" -version = "1.17.1" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] name = "overload" @@ -750,23 +792,21 @@ checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" [[package]] name = "pango" -version = "0.16.5" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdff66b271861037b89d028656184059e03b0b6ccb36003820be19f7200b1e94" +checksum = "54768854025df6903061d0084fd9702a253ddfd60db7d9b751d43b76689a7f0a" dependencies = [ - "bitflags", "gio", "glib", "libc", - "once_cell", "pango-sys", ] [[package]] name = "pango-sys" -version = "0.16.3" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e134909a9a293e04d2cc31928aa95679c5e4df954d0b85483159bd20d8f047f" +checksum = "b07cc57d10cee4ec661f718a6902cee18c2f4cfae08e87e5a390525946913390" dependencies = [ "glib-sys", "gobject-sys", @@ -774,31 +814,11 @@ dependencies = [ "system-deps", ] -[[package]] -name = "pin-project" -version = "1.0.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad29a609b6bcd67fee905812e544992d216af9d755757c05ed2d0e15a74c6ecc" -dependencies = [ - "pin-project-internal", -] - -[[package]] -name = "pin-project-internal" -version = "1.0.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "069bdb1e05adc7a8990dce9cc75370895fbe4e3d58b9b73bf1aee56359344a55" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "pin-project-lite" -version = "0.2.9" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" +checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" [[package]] name = "pin-utils" @@ -808,58 +828,39 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "pkg-config" -version = "0.3.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ac9a59f73473f1b8d852421e59e64809f025994837ef743615c6d0c5b305160" - -[[package]] -name = "proc-macro-crate" -version = "1.3.1" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" -dependencies = [ - "once_cell", - "toml_edit", -] +checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" [[package]] -name = "proc-macro-error" -version = "1.0.4" +name = "powerfmt" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" -dependencies = [ - "proc-macro-error-attr", - "proc-macro2", - "quote", - "syn", - "version_check", -] +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" [[package]] -name = "proc-macro-error-attr" -version = "1.0.4" +name = "proc-macro-crate" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" +checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" dependencies = [ - "proc-macro2", - "quote", - "version_check", + "toml_edit 0.21.1", ] [[package]] name = "proc-macro2" -version = "1.0.51" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d727cae5b39d21da60fa540906919ad737832fe0b1c165da3a34d6548c849d6" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.23" +version = "1.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8856d8364d252a14d474036ea1358d63c9e6965c8e5c1885c18f73d70bff9c7b" +checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" dependencies = [ "proc-macro2", ] @@ -883,17 +884,17 @@ checksum = "456c603be3e8d448b072f410900c09faf164fbce2d480456f50eea6e25f9c848" [[package]] name = "relm4" -version = "0.5.1" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01a298c830b43bdafdef3d6eeb2d48920b04f541974b03caa52b840e8afb8fbf" +checksum = "cf0363f92b6a7eefd985b47f27b7ae168dd2fd5cd4013a338c9b111c33744d1f" dependencies = [ - "async-trait", "flume", "fragile", "futures", "gtk4", "libadwaita", "once_cell", + "relm4-css", "relm4-macros", "tokio", "tracing", @@ -901,38 +902,51 @@ dependencies = [ [[package]] name = "relm4-components" -version = "0.5.1" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28eccf5b92be562651bb0137232b6d0f6833ad72f3e11e093aed14c9c6b53210" +checksum = "fb3d67f2982131c5e6047af4278d8fe750266767e57b58bc15f2e11e190eef36" dependencies = [ "once_cell", "relm4", "tracker", ] +[[package]] +name = "relm4-css" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d3b924557df1cddc687b60b313c4b76620fdbf0e463afa4b29f67193ccf37f9" + [[package]] name = "relm4-macros" -version = "0.5.1" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24d4191e434a6524bb17d16addb3a0aff740e13f1c32a4a2e9562b590d27a326" +checksum = "fc5885640821d60062497737dd42fd04248d13c7ecccee620caaa4b210fe9905" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.72", ] [[package]] name = "rhino-setup" -version = "0.1.0" +version = "0.2.0" dependencies = [ "gettext-rs", "relm4", "relm4-components", + "time", "tracing", "tracing-appender", "tracing-subscriber", ] +[[package]] +name = "rustc-demangle" +version = "0.1.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" + [[package]] name = "rustc_version" version = "0.4.0" @@ -956,9 +970,32 @@ checksum = "58bc9567378fc7690d6b2addae4e60ac2eeea07becb2c64b9f218b53865cba2a" [[package]] name = "serde" -version = "1.0.152" +version = "1.0.204" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb7d1f0d3021d347a83e556fc4683dea2ea09d87bccdf88ff5c12545d89d5efb" +checksum = "bc76f558e0cbb2a839d37354c575f1dc3fdc6546b5be373ba43d95f231bf7c12" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.204" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0cd7e117be63d3c3678776753929474f3b04a43a080c744d6b0ae2a8c28e222" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.72", +] + +[[package]] +name = "serde_spanned" +version = "0.6.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb5b1b31579f3811bf615c144393417496f152e12ac8b7663bf664f4a815306d" +dependencies = [ + "serde", +] [[package]] name = "sharded-slab" @@ -980,15 +1017,15 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.10.0" +version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" [[package]] name = "spin" -version = "0.9.5" +version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dccf47db1b41fa1573ed27ccf5e08e3ca771cb994f776668c5ebda893b248fc" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" dependencies = [ "lock_api", ] @@ -1004,11 +1041,22 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "syn" +version = "2.0.72" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc4b9b9bf2add8093d3f2c0204471e951b2285580335de42f9d2534f3ae7a8af" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + [[package]] name = "system-deps" -version = "6.0.3" +version = "7.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2955b1fe31e1fa2fbd1976b71cc69a606d7d4da16f6de3333d0c92d51419aeff" +checksum = "6c81f13d9a334a6c242465140bd262fae382b752ff2011c4f7419919a9c97922" dependencies = [ "cfg-expr", "heck", @@ -1017,6 +1065,12 @@ dependencies = [ "version-compare", ] +[[package]] +name = "target-lexicon" +version = "0.12.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4873307b7c257eddcb50c9bedf158eb669578359fb28428bef438fec8e6ba7c2" + [[package]] name = "temp-dir" version = "0.1.11" @@ -1040,7 +1094,7 @@ checksum = "5420d42e90af0c38c3290abcca25b9b3bdf379fc9f55c528f53a269d9c9a267e" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -1055,11 +1109,14 @@ dependencies = [ [[package]] name = "time" -version = "0.3.20" +version = "0.3.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd0cbfecb4d19b5ea75bb31ad904eb5b9fa13f21079c3b92017ebdf4999a5890" +checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" dependencies = [ + "deranged", "itoa", + "num-conv", + "powerfmt", "serde", "time-core", "time-macros", @@ -1067,64 +1124,82 @@ dependencies = [ [[package]] name = "time-core" -version = "0.1.0" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e153e1f1acaef8acc537e68b44906d2db6436e2b35ac2c6b42640fff91f00fd" +checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.8" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd80a657e71da814b8e5d60d3374fc6d35045062245d80224748ae522dd76f36" +checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" dependencies = [ + "num-conv", "time-core", ] [[package]] name = "tokio" -version = "1.26.0" +version = "1.38.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03201d01c3c27a29c8a5cee5b55a93ddae1ccf6f08f65365c2c918f8c1b76f64" +checksum = "ba4f4a02a7a80d6f274636f0aa95c7e383b912d41fe721a31f29e29698585a4a" dependencies = [ - "autocfg", + "backtrace", "num_cpus", "pin-project-lite", - "windows-sys", ] [[package]] name = "toml" -version = "0.5.11" +version = "0.8.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" +checksum = "ac2caab0bf757388c6c0ae23b3293fdb463fee59434529014f85e3263b995c28" dependencies = [ "serde", + "serde_spanned", + "toml_datetime", + "toml_edit 0.22.16", ] [[package]] name = "toml_datetime" -version = "0.6.1" +version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ab8ed2edee10b50132aed5f331333428b011c99402b5a534154ed15746f9622" +checksum = "4badfd56924ae69bcc9039335b2e017639ce3f9b001c393c1b2d1ef846ce2cbf" +dependencies = [ + "serde", +] + +[[package]] +name = "toml_edit" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" +dependencies = [ + "indexmap", + "toml_datetime", + "winnow 0.5.40", +] [[package]] name = "toml_edit" -version = "0.19.4" +version = "0.22.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a1eb0622d28f4b9c90adc4ea4b2b46b47663fde9ac5fafcb14a1369d5508825" +checksum = "278f3d518e152219c994ce877758516bca5e118eaed6996192a774fb9fbf0788" dependencies = [ "indexmap", + "serde", + "serde_spanned", "toml_datetime", - "winnow", + "winnow 0.6.16", ] [[package]] name = "tracing" -version = "0.1.37" +version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" dependencies = [ - "cfg-if", "pin-project-lite", "tracing-attributes", "tracing-core", @@ -1143,20 +1218,20 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.23" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4017f8f45139870ca7e672686113917c71c7a6e02d4924eda67186083c03081a" +checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.72", ] [[package]] name = "tracing-core" -version = "0.1.30" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24eb03ba0eab1fd845050058ce5e616558e8f8d8fca633e6b163fe25c797213a" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" dependencies = [ "once_cell", "valuable", @@ -1189,22 +1264,22 @@ dependencies = [ [[package]] name = "tracker" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4948dd579c7facd8b583a8838956177740021c7bbcc1074ff49f7a5e76a150fd" +checksum = "ff9636d15e370187f6bf55b79ce62ebf4221998bc0ba1774d7fa208b007f6bf8" dependencies = [ "tracker-macros", ] [[package]] name = "tracker-macros" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32b086e6cb7f65c79bc0b132db4e468c4159133c917da44e1b97594101e9e7e0" +checksum = "ca029746fbe0efda3298205de77bf759d7fef23ac97902641e0b49a623b0455f" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.72", ] [[package]] @@ -1221,15 +1296,9 @@ checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" [[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" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +checksum = "852e951cb7832cb45cb1169900d19760cfa39b82bc0ea9c0e5a14ae88411c98b" [[package]] name = "wasi" @@ -1258,7 +1327,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn", + "syn 1.0.109", "wasm-bindgen-shared", ] @@ -1280,7 +1349,7 @@ checksum = "2aff81306fcac3c7515ad4e177f521b5c9a15f2b08f4e32d823066102f35a5f6" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -1315,22 +1384,23 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windows-sys" -version = "0.45.0" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ "windows-targets", ] [[package]] name = "windows-targets" -version = "0.42.1" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e2522491fbfcd58cc84d47aeb2958948c4b8982e9a2d8a2a35bbaed431390e7" +checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" dependencies = [ "windows_aarch64_gnullvm", "windows_aarch64_msvc", "windows_i686_gnu", + "windows_i686_gnullvm", "windows_i686_msvc", "windows_x86_64_gnu", "windows_x86_64_gnullvm", @@ -1339,51 +1409,66 @@ dependencies = [ [[package]] name = "windows_aarch64_gnullvm" -version = "0.42.1" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c9864e83243fdec7fc9c5444389dcbbfd258f745e7853198f365e3c4968a608" +checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" [[package]] name = "windows_aarch64_msvc" -version = "0.42.1" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c8b1b673ffc16c47a9ff48570a9d85e25d265735c503681332589af6253c6c7" +checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" [[package]] name = "windows_i686_gnu" -version = "0.42.1" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3887528ad530ba7bdbb1faa8275ec7a1155a45ffa57c37993960277145d640" +checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" [[package]] name = "windows_i686_msvc" -version = "0.42.1" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf4d1122317eddd6ff351aa852118a2418ad4214e6613a50e0191f7004372605" +checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" [[package]] name = "windows_x86_64_gnu" -version = "0.42.1" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1040f221285e17ebccbc2591ffdc2d44ee1f9186324dd3e84e99ac68d699c45" +checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" [[package]] name = "windows_x86_64_gnullvm" -version = "0.42.1" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "628bfdf232daa22b0d64fdb62b09fcc36bb01f05a3939e20ab73aaf9470d0463" +checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" [[package]] name = "windows_x86_64_msvc" -version = "0.42.1" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" + +[[package]] +name = "winnow" +version = "0.5.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "447660ad36a13288b1db4d4248e857b510e8c3a225c822ba4fb748c0aafecffd" +checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" +dependencies = [ + "memchr", +] [[package]] name = "winnow" -version = "0.3.4" +version = "0.6.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c95fb4ff192527911dd18eb138ac30908e7165b8944e528b6af93aa4c842d345" +checksum = "b480ae9340fc261e6be3e95a1ba86d54ae3f9171132a73ce8d4bbaf68339507c" dependencies = [ "memchr", ] diff --git a/Cargo.toml b/Cargo.toml index 9845c39..3c0cf42 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rhino-setup" -version = "0.1.0" +version = "0.2.0" edition = "2021" [profile.release] @@ -10,8 +10,9 @@ lto = true [dependencies] gettext-rs = { version = "0.7.0", features = ["gettext-system"] } -relm4 = { version = "0.5.1", features = ["libadwaita"] } -relm4-components = "0.5.1" +relm4 = { version = "0.9.0", features = ["libadwaita"] } +relm4-components = "0.9.1" tracing = "0.1.37" tracing-appender = "0.2.2" tracing-subscriber = "0.3.17" +time = "=0.3.36" diff --git a/meson.build b/meson.build index 99ccef6..eafecf5 100644 --- a/meson.build +++ b/meson.build @@ -1,6 +1,6 @@ project('rhino-setup', 'rust', - version: '0.1.0', + version: '0.2.0', meson_version: '>= 0.59.0', license: 'GPL-3.0-or-later' ) diff --git a/po/POTFILES.in b/po/POTFILES.in index 74e185b..39c1d25 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -3,4 +3,3 @@ data/org.rhinolinux.RhinoSetup.gschema.xml.in src/main.rs src/welcome.rs -src/theme.rs diff --git a/po/ar.po b/po/ar.po index 3b991bc..a5521ff 100644 --- a/po/ar.po +++ b/po/ar.po @@ -58,7 +58,7 @@ msgstr "Nala هي واجهة بديلة لـ APT, مع جمالية واجهة msgid "Apport is a crash reporting system that helps us improve the stability of the system." msgstr "Apport هو نظام تقارير الأعطال يساعدك على الحفاظ على استقرار الجهاز." -#: src/extra_settings.rs:84 src/package_manager.rs:104 src/theme.rs:83 +#: src/extra_settings.rs:84 src/package_manager.rs:104 msgid "Next" msgstr "التالي" @@ -98,14 +98,6 @@ msgstr "تنسيق قابل للتنفيذ ومضغوط ذاتيًا لمنصة msgid "The changes are being applied. Please Wait..." msgstr "يتم تطبيق التغييرات. من فضلك انتظر..." -#: src/theme.rs:77 -msgid "Color Scheme" -msgstr "نظام الألوان" - -#: src/theme.rs:78 -msgid "Choose a color scheme for your system." -msgstr "إختر نظام الألوان الخاص بنظامك." - #: src/welcome.rs:44 msgid "Make your choices, this wizard will take care of everything." msgstr "إتخذ قرارك, هذا الويزارد سيهتم بكل شيء." diff --git a/po/bn.po b/po/bn.po index 9a2cb51..1e8c958 100644 --- a/po/bn.po +++ b/po/bn.po @@ -65,7 +65,7 @@ msgstr "" "Apport একটি ক্র্যাশ রিপোর্টিং সিস্টেম যা আমাদের সিস্টেমের স্থিতিশীলতা উন্নত করতে " "সাহায্য করে।" -#: src/extra_settings.rs:84 src/package_manager.rs:104 src/theme.rs:83 +#: src/extra_settings.rs:84 src/package_manager.rs:104 msgid "Next" msgstr "পরবর্তী" @@ -106,14 +106,6 @@ msgstr "Linux প্ল্যাটফর্মের জন্য স্বয msgid "The changes are being applied. Please Wait..." msgstr "পরিবর্তনগুলো স্থাপন করা হচ্ছে। অনুগ্রহকরে অপেক্ষা করুন..." -#: src/theme.rs:77 -msgid "Color Scheme" -msgstr "বর্ণবিন্যাস" - -#: src/theme.rs:78 -msgid "Choose a color scheme for your system." -msgstr "আপনার সিস্টেমের জন্য একটি বর্ণবিন্যাস চয়ন করুন।" - #: src/welcome.rs:44 msgid "Make your choices, this wizard will take care of everything." msgstr "আপনি পছন্দ করুন, এই উইজার্ড সবকিছুর যত্ন নেবে।" diff --git a/po/de.po b/po/de.po index 50f5a43..014c65d 100644 --- a/po/de.po +++ b/po/de.po @@ -63,7 +63,7 @@ msgstr "" msgid "Apport is a crash reporting system that helps us improve the stability of the system." msgstr "Apport ist ein Absturzberichtsprogramm, welches uns hilft die Stabilität des Systems zu verbessern." -#: src/extra_settings.rs:84 src/package_manager.rs:104 src/theme.rs:83 +#: src/extra_settings.rs:84 src/package_manager.rs:104 msgid "Next" msgstr "Weiter" @@ -105,14 +105,6 @@ msgstr "Komprimiertes Format für Ausführbare Dateien für Linux-Plattformen, u msgid "The changes are being applied. Please Wait..." msgstr "Die Änderungen werden angewandt. Bitte warten Sie..." -#: src/theme.rs:77 -msgid "Color Scheme" -msgstr "Farbschema" - -#: src/theme.rs:78 -msgid "Choose a color scheme for your system." -msgstr "Wählen Sie ein Farbschema für Ihr System" - #: src/welcome.rs:44 msgid "Make your choices, this wizard will take care of everything." msgstr "Treffen Sie Ihre Auswahl, dieser Assistent wird sich um alles weitere kümmern." diff --git a/po/enm.po b/po/enm.po index 26863cb..f602f40 100644 --- a/po/enm.po +++ b/po/enm.po @@ -54,7 +54,7 @@ msgstr "" msgid "Apport is a crash reporting system that helps us improve the stability of the system." msgstr "" -#: src/extra_settings.rs:84 src/package_manager.rs:104 src/theme.rs:83 +#: src/extra_settings.rs:84 src/package_manager.rs:104 msgid "Next" msgstr "" @@ -94,14 +94,6 @@ msgstr "" msgid "The changes are being applied. Please Wait..." msgstr "" -#: src/theme.rs:77 -msgid "Color Scheme" -msgstr "" - -#: src/theme.rs:78 -msgid "Choose a color scheme for your system." -msgstr "" - #: src/welcome.rs:44 msgid "Make your choices, this wizard will take care of everything." msgstr "" diff --git a/po/es.po b/po/es.po index 51bd6ea..f571293 100644 --- a/po/es.po +++ b/po/es.po @@ -65,7 +65,7 @@ msgstr "" "Apport es un sistema de notificación de fallos que nos ayuda a mejorar la " "estabilidad del sistema." -#: src/extra_settings.rs:84 src/package_manager.rs:104 src/theme.rs:83 +#: src/extra_settings.rs:84 src/package_manager.rs:104 msgid "Next" msgstr "Próximo" @@ -108,14 +108,6 @@ msgstr "Formato ejecutable autocontenido y comprimido para la plataforma Linux." msgid "The changes are being applied. Please Wait..." msgstr "Se están aplicando los cambios. Espere por favor..." -#: src/theme.rs:77 -msgid "Color Scheme" -msgstr "Esquema de Colores" - -#: src/theme.rs:78 -msgid "Choose a color scheme for your system." -msgstr "Elija una esquema de colores para tú sistema." - #: src/welcome.rs:44 msgid "Make your choices, this wizard will take care of everything." msgstr "Elija tú elecciones, este programa ayuda con todo." diff --git a/po/fr.po b/po/fr.po index 95115aa..2847576 100644 --- a/po/fr.po +++ b/po/fr.po @@ -57,7 +57,7 @@ msgstr "" msgid "Apport is a crash reporting system that helps us improve the stability of the system." msgstr "" -#: src/extra_settings.rs:84 src/package_manager.rs:104 src/theme.rs:83 +#: src/extra_settings.rs:84 src/package_manager.rs:104 msgid "Next" msgstr "" @@ -97,14 +97,6 @@ msgstr "" msgid "The changes are being applied. Please Wait..." msgstr "" -#: src/theme.rs:77 -msgid "Color Scheme" -msgstr "" - -#: src/theme.rs:78 -msgid "Choose a color scheme for your system." -msgstr "" - #: src/welcome.rs:44 msgid "Make your choices, this wizard will take care of everything." msgstr "" diff --git a/po/hi.po b/po/hi.po index 016d05a..29a7d33 100644 --- a/po/hi.po +++ b/po/hi.po @@ -64,7 +64,7 @@ msgstr "" "Apport एक क्रैश रिपोर्टिंग सिस्टम है जो सिस्टम की स्थिरता को बेहतर बनाने में हमारी मदद " "करता है।" -#: src/extra_settings.rs:84 src/package_manager.rs:104 src/theme.rs:83 +#: src/extra_settings.rs:84 src/package_manager.rs:104 msgid "Next" msgstr "अगला" @@ -105,14 +105,6 @@ msgstr "Linux प्लेटफॉर्म के लिए स्व-नि msgid "The changes are being applied. Please Wait..." msgstr "परिवर्तन लागू किए जा रहे हैं। कृपया प्रतीक्षा करें..." -#: src/theme.rs:77 -msgid "Color Scheme" -msgstr "रंग योजना" - -#: src/theme.rs:78 -msgid "Choose a color scheme for your system." -msgstr "अपने सिस्टम के लिए एक रंग योजना चुनें।" - #: src/welcome.rs:44 msgid "Make your choices, this wizard will take care of everything." msgstr "अपने चुनाव करें, यह सॉफ्टवेयर सब कुछ संभाल लेगा।" diff --git a/po/id.po b/po/id.po index 45d2fa3..7c7b72c 100644 --- a/po/id.po +++ b/po/id.po @@ -62,7 +62,7 @@ msgstr "" "Apport adalah sistem pelaporan kerusakan yang membantu kami meningkatkan " "stabilitas sistem." -#: src/extra_settings.rs:84 src/package_manager.rs:104 src/theme.rs:83 +#: src/extra_settings.rs:84 src/package_manager.rs:104 msgid "Next" msgstr "Berikutnya" @@ -105,14 +105,6 @@ msgstr "" msgid "The changes are being applied. Please Wait..." msgstr "Perubahan sedang diterapkan. Mohon Tunggu..." -#: src/theme.rs:77 -msgid "Color Scheme" -msgstr "Skema Warna" - -#: src/theme.rs:78 -msgid "Choose a color scheme for your system." -msgstr "Pilih skema warna untuk sistem Anda." - #: src/welcome.rs:44 msgid "Make your choices, this wizard will take care of everything." msgstr "Tentukan pilihan Anda, wizard ini akan mengurus semuanya." diff --git a/po/ie.po b/po/ie.po index 252b7b6..26e79a0 100644 --- a/po/ie.po +++ b/po/ie.po @@ -59,7 +59,7 @@ msgstr "" "Apport es un sistema de raportation de fracasses, quel assiste nos ameliorar " "li stabilitá del sistema." -#: src/extra_settings.rs:84 src/package_manager.rs:104 src/theme.rs:83 +#: src/extra_settings.rs:84 src/package_manager.rs:104 msgid "Next" msgstr "Avan" @@ -100,14 +100,6 @@ msgstr "" msgid "The changes are being applied. Please Wait..." msgstr "Li modificationes ea applicat. Ples atender…" -#: src/theme.rs:77 -msgid "Color Scheme" -msgstr "Schema de colores" - -#: src/theme.rs:78 -msgid "Choose a color scheme for your system." -msgstr "Selecte un schema de colores por vor sistema." - #: src/welcome.rs:44 msgid "Make your choices, this wizard will take care of everything." msgstr "Fa vor selectiones, e li assistente va far omnicos." diff --git a/po/it.po b/po/it.po index 4d4deb4..e3240f9 100644 --- a/po/it.po +++ b/po/it.po @@ -61,7 +61,7 @@ msgstr "" "Apport è un sistema di crash report che ci aiuta a migliorare la stabilità " "del sistema." -#: src/extra_settings.rs:84 src/package_manager.rs:104 src/theme.rs:83 +#: src/extra_settings.rs:84 src/package_manager.rs:104 msgid "Next" msgstr "Prossimo" @@ -103,14 +103,6 @@ msgstr "Formato eseguibile autonomo e compresso per la piattaforma Linux." msgid "The changes are being applied. Please Wait..." msgstr "Attendi mentre vengono apportate le modifiche." -#: src/theme.rs:77 -msgid "Color Scheme" -msgstr "Schema Colori" - -#: src/theme.rs:78 -msgid "Choose a color scheme for your system." -msgstr "Scegli uno schema colori per il tuo sistema." - #: src/welcome.rs:44 msgid "Make your choices, this wizard will take care of everything." msgstr "Fai la tua scelta, questa procedura si prenderà cura di tutto il resto." diff --git a/po/ka.po b/po/ka.po index 7e1ba83..74f3a9d 100644 --- a/po/ka.po +++ b/po/ka.po @@ -57,7 +57,7 @@ msgstr "" msgid "Apport is a crash reporting system that helps us improve the stability of the system." msgstr "" -#: src/extra_settings.rs:84 src/package_manager.rs:104 src/theme.rs:83 +#: src/extra_settings.rs:84 src/package_manager.rs:104 msgid "Next" msgstr "შემდეგი" @@ -99,14 +99,6 @@ msgstr "" msgid "The changes are being applied. Please Wait..." msgstr "მიმდინარეობს ცვლილებების გადატარება. მოითმინეთ..." -#: src/theme.rs:77 -msgid "Color Scheme" -msgstr "ფერების სქემა" - -#: src/theme.rs:78 -msgid "Choose a color scheme for your system." -msgstr "აირჩიეთ თქვენი სისტემის ფერის სქემა." - #: src/welcome.rs:44 msgid "Make your choices, this wizard will take care of everything." msgstr "გააკეთეთ არჩევანი, ოსტატი ყველაფერს მიხედავს." diff --git a/po/ko.po b/po/ko.po index 4f05ffa..929e1d3 100644 --- a/po/ko.po +++ b/po/ko.po @@ -60,7 +60,7 @@ msgstr "Nala는 아름다운 UI/UX를 특징으로 하는 APT의 대체 프론 msgid "Apport is a crash reporting system that helps us improve the stability of the system." msgstr "Apport는 시스템의 안정성을 개선하는 데 도움이 되는 충돌 보고 시스템입니다." -#: src/extra_settings.rs:84 src/package_manager.rs:104 src/theme.rs:83 +#: src/extra_settings.rs:84 src/package_manager.rs:104 msgid "Next" msgstr "다음" @@ -100,14 +100,6 @@ msgstr "Linux 플랫폼을 위한 독립적이고 압축된 실행 가능한 형 msgid "The changes are being applied. Please Wait..." msgstr "변경 사항이 적용되고 있습니다. 잠시 기다려주세요..." -#: src/theme.rs:77 -msgid "Color Scheme" -msgstr "색 구성표" - -#: src/theme.rs:78 -msgid "Choose a color scheme for your system." -msgstr "시스템의 색 구성표를 선택하세요." - #: src/welcome.rs:44 msgid "Make your choices, this wizard will take care of everything." msgstr "선택만 하면 마법사가 모든 것을 알아서 처리합니다." diff --git a/po/nl.po b/po/nl.po index 8f78985..02db7f9 100644 --- a/po/nl.po +++ b/po/nl.po @@ -66,7 +66,7 @@ msgstr "" "Apport is een crashmeldingssysteem die ons helpt om de stabiliteit van het " "systeem te verbeteren." -#: src/extra_settings.rs:84 src/package_manager.rs:104 src/theme.rs:83 +#: src/extra_settings.rs:84 src/package_manager.rs:104 msgid "Next" msgstr "Volgende" @@ -110,14 +110,6 @@ msgstr "" msgid "The changes are being applied. Please Wait..." msgstr "De wijzigingen worden toegepast - even geduld…" -#: src/theme.rs:77 -msgid "Color Scheme" -msgstr "Thema" - -#: src/theme.rs:78 -msgid "Choose a color scheme for your system." -msgstr "Kies het systeemthema dat u wilt gebruiken." - #: src/welcome.rs:44 msgid "Make your choices, this wizard will take care of everything." msgstr "Maak uw eigen keuzes - de instelhulp doet de rest." diff --git a/po/pt_BR.po b/po/pt_BR.po index d9a6f93..d5f1397 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -62,7 +62,7 @@ msgstr "" "Apport é um sistema de relatório de falhas que nos ajuda a melhorar a " "estabilidade do sistema." -#: src/extra_settings.rs:84 src/package_manager.rs:104 src/theme.rs:83 +#: src/extra_settings.rs:84 src/package_manager.rs:104 msgid "Next" msgstr "Próximo" @@ -104,14 +104,6 @@ msgstr "Formato executável independente e compactado para a plataforma Linux." msgid "The changes are being applied. Please Wait..." msgstr "As alterações estão sendo aplicadas. Por favor, aguarde..." -#: src/theme.rs:77 -msgid "Color Scheme" -msgstr "Esquema de cores" - -#: src/theme.rs:78 -msgid "Choose a color scheme for your system." -msgstr "Escolha um esquema de cores para o seu sistema." - #: src/welcome.rs:44 msgid "Make your choices, this wizard will take care of everything." msgstr "Faça suas escolhas, este assistente cuidará de tudo." diff --git a/po/rhino-setup.pot b/po/rhino-setup.pot index 2ea8832..1c9173f 100644 --- a/po/rhino-setup.pot +++ b/po/rhino-setup.pot @@ -54,7 +54,7 @@ msgstr "" msgid "Apport is a crash reporting system that helps us improve the stability of the system." msgstr "" -#: src/extra_settings.rs:84 src/package_manager.rs:104 src/theme.rs:83 +#: src/extra_settings.rs:84 src/package_manager.rs:104 msgid "Next" msgstr "" @@ -94,14 +94,6 @@ msgstr "" msgid "The changes are being applied. Please Wait..." msgstr "" -#: src/theme.rs:77 -msgid "Color Scheme" -msgstr "" - -#: src/theme.rs:78 -msgid "Choose a color scheme for your system." -msgstr "" - #: src/welcome.rs:44 msgid "Make your choices, this wizard will take care of everything." msgstr "" diff --git a/po/ro.po b/po/ro.po index 74e72cb..5f93230 100644 --- a/po/ro.po +++ b/po/ro.po @@ -54,7 +54,7 @@ msgstr "" msgid "Apport is a crash reporting system that helps us improve the stability of the system." msgstr "" -#: src/extra_settings.rs:84 src/package_manager.rs:104 src/theme.rs:83 +#: src/extra_settings.rs:84 src/package_manager.rs:104 msgid "Next" msgstr "" @@ -94,14 +94,6 @@ msgstr "" msgid "The changes are being applied. Please Wait..." msgstr "" -#: src/theme.rs:77 -msgid "Color Scheme" -msgstr "" - -#: src/theme.rs:78 -msgid "Choose a color scheme for your system." -msgstr "" - #: src/welcome.rs:44 msgid "Make your choices, this wizard will take care of everything." msgstr "" diff --git a/po/ru.po b/po/ru.po index 46340bc..28e3428 100644 --- a/po/ru.po +++ b/po/ru.po @@ -60,7 +60,7 @@ msgstr "" "Apport — система сообщений о сбоях, помогающая нам улучшать стабильность " "системы." -#: src/extra_settings.rs:84 src/package_manager.rs:104 src/theme.rs:83 +#: src/extra_settings.rs:84 src/package_manager.rs:104 msgid "Next" msgstr "Далее" @@ -100,14 +100,6 @@ msgstr "Автономный и сжатый формат исполняемых msgid "The changes are being applied. Please Wait..." msgstr "Применение настроек..." -#: src/theme.rs:77 -msgid "Color Scheme" -msgstr "Цветовая схема" - -#: src/theme.rs:78 -msgid "Choose a color scheme for your system." -msgstr "Выберите цветовую схему для системы." - #: src/welcome.rs:44 msgid "Make your choices, this wizard will take care of everything." msgstr "Выберите нужное, а мастер все настроит." diff --git a/po/sv.po b/po/sv.po index dacddf7..574fddd 100644 --- a/po/sv.po +++ b/po/sv.po @@ -63,7 +63,7 @@ msgstr "" "Apport är ett felrapporteringsprogram som hjälper oss att förbättra " "systemets stabilitet." -#: src/extra_settings.rs:84 src/package_manager.rs:104 src/theme.rs:83 +#: src/extra_settings.rs:84 src/package_manager.rs:104 msgid "Next" msgstr "Nästa" @@ -104,14 +104,6 @@ msgstr "Fristående och komprimerade körbara format för Linux Plattform." msgid "The changes are being applied. Please Wait..." msgstr "Inställningarna tillämpas. Var vänligt vänta..." -#: src/theme.rs:77 -msgid "Color Scheme" -msgstr "Färgschema" - -#: src/theme.rs:78 -msgid "Choose a color scheme for your system." -msgstr "Välj ett färgschema för ditt system." - #: src/welcome.rs:44 msgid "Make your choices, this wizard will take care of everything." msgstr "Gör dina val, installationsguiden tar hand om resten." diff --git a/po/uk.po b/po/uk.po index 6243eee..bc78614 100644 --- a/po/uk.po +++ b/po/uk.po @@ -62,7 +62,7 @@ msgstr "" "Apport - це система повідомлень про збої, яка допомагає нам підвищити " "стабільність системи." -#: src/extra_settings.rs:84 src/package_manager.rs:104 src/theme.rs:83 +#: src/extra_settings.rs:84 src/package_manager.rs:104 msgid "Next" msgstr "Далі" @@ -104,14 +104,6 @@ msgstr "Самодостатній і стислий виконуваний фо msgid "The changes are being applied. Please Wait..." msgstr "Зміни застосовуються. Будь ласка, зачекайте..." -#: src/theme.rs:77 -msgid "Color Scheme" -msgstr "Кольорова схема" - -#: src/theme.rs:78 -msgid "Choose a color scheme for your system." -msgstr "Виберіть кольорову схему для вашої системи." - #: src/welcome.rs:44 msgid "Make your choices, this wizard will take care of everything." msgstr "Зробіть свій вибір, цей чарівник подбає про все." diff --git a/po/ur.po b/po/ur.po index d7ee3ba..4a1d487 100644 --- a/po/ur.po +++ b/po/ur.po @@ -54,7 +54,7 @@ msgstr "" msgid "Apport is a crash reporting system that helps us improve the stability of the system." msgstr "" -#: src/extra_settings.rs:84 src/package_manager.rs:104 src/theme.rs:83 +#: src/extra_settings.rs:84 src/package_manager.rs:104 msgid "Next" msgstr "" @@ -94,14 +94,6 @@ msgstr "" msgid "The changes are being applied. Please Wait..." msgstr "" -#: src/theme.rs:77 -msgid "Color Scheme" -msgstr "" - -#: src/theme.rs:78 -msgid "Choose a color scheme for your system." -msgstr "" - #: src/welcome.rs:44 msgid "Make your choices, this wizard will take care of everything." msgstr "" diff --git a/po/zh_Hans.po b/po/zh_Hans.po index 52f038f..a2fdb3c 100644 --- a/po/zh_Hans.po +++ b/po/zh_Hans.po @@ -57,7 +57,7 @@ msgstr "Nala 是 APT 的替代前端,具有漂亮的 UI/UX。" msgid "Apport is a crash reporting system that helps us improve the stability of the system." msgstr "Apport 是崩溃日志上报系统,可以帮助我们改进系统稳定性。" -#: src/extra_settings.rs:84 src/package_manager.rs:104 src/theme.rs:83 +#: src/extra_settings.rs:84 src/package_manager.rs:104 msgid "Next" msgstr "继续" @@ -97,14 +97,6 @@ msgstr "适用于 Linux 平台的独立压缩可执行格式。" msgid "The changes are being applied. Please Wait..." msgstr "正在应用更改。请稍候…" -#: src/theme.rs:77 -msgid "Color Scheme" -msgstr "配色方案" - -#: src/theme.rs:78 -msgid "Choose a color scheme for your system." -msgstr "请为你的系统选择配色方案。" - #: src/welcome.rs:44 msgid "Make your choices, this wizard will take care of everything." msgstr "做出你的选择,安装向导会处理一切。" diff --git a/src/carousel.rs b/src/carousel.rs index bd38151..7287679 100644 --- a/src/carousel.rs +++ b/src/carousel.rs @@ -1,22 +1,22 @@ use relm4::adw::prelude::*; use relm4::{adw, Component, ComponentController, ComponentParts, Controller, SimpleComponent}; +use crate::containers::{ContainersModel, ContainersOutput}; use crate::done::DoneModel; use crate::extra_settings::{ExtraSettingsModel, ExtraSettingsOutput}; use crate::package_manager::{PackageManagerModel, PackageManagerOutput}; use crate::progress::{ProgressInput, ProgressModel, ProgressOutput}; -use crate::theme::{ThemeModel, ThemeOutput}; use crate::welcome::{WelcomeModel, WelcomeOutput}; -pub(crate) struct CarouselModel { - current_page: u32, +pub(crate) struct CarouselPagesModel { + current: u32, - welcome_page: Controller, - theme_page: Controller, - package_manager_page: Controller, - extra_settings_page: Controller, - progress_page: Controller, - done_page: Controller, + welcome: Controller, + package_manager: Controller, + containers: Controller, + extra_settings: Controller, + progress: Controller, + done: Controller, } #[derive(Debug)] @@ -27,7 +27,7 @@ pub(crate) enum CarouselInput { /// Move to the previous page. PreviousPage, /// An error has occurred in one of the pages. - /// Move to the [crate::done] page, with the error state. + /// Move to the [`crate::done`] page, with the error state. SkipToErrorPage, } @@ -40,7 +40,7 @@ pub(crate) enum CarouselOutput { } #[relm4::component(pub)] -impl SimpleComponent for CarouselModel { +impl SimpleComponent for CarouselPagesModel { type Init = (); type Input = CarouselInput; type Output = CarouselOutput; @@ -55,54 +55,52 @@ impl SimpleComponent for CarouselModel { set_allow_mouse_drag: false, set_allow_long_swipes: false, - append: model.welcome_page.widget(), - append: model.theme_page.widget(), - append: model.package_manager_page.widget(), - append: model.extra_settings_page.widget(), - append: model.progress_page.widget(), - append: model.done_page.widget(), + append: model.welcome.widget(), + append: model.package_manager.widget(), + append: model.containers.widget(), + append: model.extra_settings.widget(), + append: model.progress.widget(), + append: model.done.widget(), } } fn init( _init: Self::Init, - root: &Self::Root, + root: Self::Root, sender: relm4::ComponentSender, ) -> relm4::ComponentParts { - let model = CarouselModel { - current_page: 0, - welcome_page: WelcomeModel::builder().launch(()).forward( - sender.input_sender(), - |msg| match msg { - WelcomeOutput::NextPage => CarouselInput::NextPage, - }, - ), - theme_page: ThemeModel::builder() + let model = CarouselPagesModel { + current: 0, + welcome: WelcomeModel::builder() .launch(()) .forward(sender.input_sender(), |msg| match msg { - ThemeOutput::NextPage => CarouselInput::NextPage, - ThemeOutput::ErrorOccured => CarouselInput::SkipToErrorPage, + WelcomeOutput::NextPage => CarouselInput::NextPage, }), - package_manager_page: PackageManagerModel::builder().launch(()).forward( + package_manager: PackageManagerModel::builder().launch(()).forward( sender.input_sender(), |msg| match msg { PackageManagerOutput::NextPage => CarouselInput::NextPage, }, ), - extra_settings_page: ExtraSettingsModel::builder().launch(()).forward( + containers: ContainersModel::builder().launch(()).forward( sender.input_sender(), |msg| match msg { - ExtraSettingsOutput::NextPage => CarouselInput::NextPage, + ContainersOutput::NextPage => CarouselInput::NextPage, }, ), - progress_page: ProgressModel::builder().launch(()).forward( + extra_settings: ExtraSettingsModel::builder().launch(()).forward( sender.input_sender(), |msg| match msg { - ProgressOutput::InstallationComplete => CarouselInput::NextPage, - ProgressOutput::InstallationError => CarouselInput::SkipToErrorPage, + ExtraSettingsOutput::NextPage => CarouselInput::NextPage, }, ), - done_page: DoneModel::builder().launch(()).detach(), + progress: ProgressModel::builder() + .launch(()) + .forward(sender.input_sender(), |msg| match msg { + ProgressOutput::InstallationComplete => CarouselInput::NextPage, + ProgressOutput::InstallationError => CarouselInput::SkipToErrorPage, + }), + done: DoneModel::builder().launch(()).detach(), }; let widgets = view_output!(); @@ -113,36 +111,36 @@ impl SimpleComponent for CarouselModel { fn update(&mut self, message: Self::Input, sender: relm4::ComponentSender) { match message { CarouselInput::NextPage => { - self.current_page += 1; + self.current += 1; // If the user hasn't reached the progress page yet. - if self.current_page < 4 { + if self.current < 4 { sender.output(CarouselOutput::ShowBackButton).unwrap(); } // When the user is at the progress page. - if self.current_page == 4 { + if self.current == 4 { // Hide the back button, as the user is not supposed to return to previous pages // after this point. sender.output(CarouselOutput::HideBackButton).unwrap(); - self.progress_page + self.progress .sender() .send(ProgressInput::StartInstallation) .unwrap(); } }, CarouselInput::PreviousPage => { - self.current_page -= 1; + self.current -= 1; // When on the first page (pages starts from 0), disable the back button. - if self.current_page == 0 { + if self.current == 0 { sender.output(CarouselOutput::HideBackButton).unwrap(); } }, CarouselInput::SkipToErrorPage => { - self.current_page = 5; - self.done_page + self.current = 5; + self.done .sender() .send(crate::done::DoneInput::SwitchToErrorState) .unwrap(); @@ -151,5 +149,5 @@ impl SimpleComponent for CarouselModel { } } - fn post_view() { carousel.scroll_to(&carousel.nth_page(model.current_page), true); } + fn post_view() { carousel.scroll_to(&carousel.nth_page(model.current), true); } } diff --git a/src/containers.rs b/src/containers.rs new file mode 100644 index 0000000..346301a --- /dev/null +++ b/src/containers.rs @@ -0,0 +1,308 @@ +use gettextrs::gettext; +use relm4::adw::prelude::*; +use relm4::{adw, gtk, Component, ComponentParts, ComponentSender}; + +use crate::COMMANDS; + +#[derive(Debug)] +#[allow(clippy::struct_excessive_bools)] +pub(crate) struct ContainersModel { + enable_docker: bool, + enable_podman: bool, + enable_distrobox: bool, + enable_apptainer: bool, + enable_qemu: bool, + enable_virtualbox: bool, +} + +#[derive(Debug)] +pub(crate) enum ContainersInput { + /// Represents the container engines switch states + Docker(bool), + Podman(bool), + Apptainer(bool), + /// Represents the Distrobox switch state + Distrobox(bool), + #[allow(clippy::upper_case_acronyms)] + /// Represents the virtual machine switch states + QEMU(bool), + Virtualbox(bool), +} + +#[derive(Debug)] +pub(crate) enum ContainersOutput { + /// Move to the next page + NextPage, +} + +#[relm4::component(pub)] +impl Component for ContainersModel { + type CommandOutput = (); + type Init = (); + type Input = ContainersInput; + type Output = ContainersOutput; + type Widgets = ContainersWidgets; + + view! { + #[root] + adw::Bin { + set_halign: gtk::Align::Fill, + set_valign: gtk::Align::Fill, + set_hexpand: true, + + adw::StatusPage { + set_halign: gtk::Align::Fill, + set_valign: gtk::Align::Fill, + set_hexpand: true, + + set_icon_name: Some("rhinosetup-package-symbolic"), + set_title: &gettext("Containerization"), + set_description: Some(&gettext("Container Engines and Virtual Machines")), + + gtk::Box { + set_orientation: gtk::Orientation::Vertical, + set_vexpand: true, + set_hexpand: true, + set_valign: gtk::Align::Center, + + adw::PreferencesPage { + add = &adw::PreferencesGroup { + adw::ActionRow { + set_title: "Docker", + set_subtitle: &gettext("The open-source application container engine."), + set_tooltip_text: Some(&gettext("Enable the Docker container engine.")), + add_suffix = >k::Switch { + set_valign: gtk::Align::Center, + set_active: false, + connect_active_notify[sender] => move |switch| { + sender.input(Self::Input::Docker(switch.is_active())); + } + } + }, + adw::ActionRow { + set_title: "Podman", + set_subtitle: &gettext("Engine to run OCI-based containers in Pods."), + set_tooltip_text: Some(&gettext("Enable the Podman container engine.")), + add_suffix = >k::Switch { + set_valign: gtk::Align::Center, + set_active: false, + connect_active_notify[sender] => move |switch| { + sender.input(Self::Input::Podman(switch.is_active())); + } + } + }, + #[name="distrobox"] + adw::ActionRow { + set_title: "Distrobox", + set_subtitle: &gettext("Use any linux distribution inside your terminal.\nRequires Docker or Podman. "), + set_sensitive: false, + set_visible: true, + + #[name="distrobox_switch"] + add_suffix = >k::Switch { + set_valign: gtk::Align::Center, + + connect_active_notify[sender] => move |switch| { + sender.input(Self::Input::Distrobox(switch.is_active())); + } + } + }, + adw::ActionRow { + set_title: "Apptainer", + set_subtitle: &gettext("Container platform focused on supporting \"Mobility of Compute\""), + set_tooltip_text: Some(&gettext("Enable the Apptainer container engine.")), + set_visible: cfg!(target_arch = "x86_64"), + add_suffix = >k::Switch { + set_valign: gtk::Align::Center, + + connect_active_notify[sender] => move |switch| { + sender.input(Self::Input::Apptainer(switch.is_active())); + } + } + }, + adw::ActionRow { + set_title: "QEMU", + set_subtitle: &gettext("QEMU full system emulation"), + + add_suffix = >k::Switch { + set_valign: gtk::Align::Center, + + connect_active_notify[sender] => move |switch| { + sender.input(Self::Input::QEMU(switch.is_active())); + } + } + }, + adw::ActionRow { + set_title: "VirtualBox", + set_subtitle: &gettext("x86 virtualization solution"), + set_visible: cfg!(target_arch = "x86_64"), + add_suffix = >k::Switch { + set_valign: gtk::Align::Center, + + connect_active_notify[sender] => move |switch| { + sender.input(Self::Input::Virtualbox(switch.is_active())); + } + } + }, + } + }, + gtk::Button::with_label(&gettext("Next")) { + set_halign: gtk::Align::Center, + set_css_classes: &["pill", "suggested-action"], + + connect_clicked[sender] => move |_| { + sender.output(Self::Output::NextPage).unwrap(); + } + } + } + } + } + } + + fn init( + _init: Self::Init, + root: Self::Root, + sender: ComponentSender, + ) -> ComponentParts { + let model = ContainersModel { + enable_docker: false, + enable_podman: false, + enable_apptainer: false, + enable_distrobox: false, + enable_qemu: false, + enable_virtualbox: false, + }; + + let widgets = view_output!(); + + ComponentParts { model, widgets } + } + + #[allow(clippy::too_many_lines)] + fn update_with_view( + &mut self, + widgets: &mut Self::Widgets, + message: Self::Input, + _sender: ComponentSender, + _root: &Self::Root, + ) { + match message { + Self::Input::Docker(switched_on) => { + tracing::info!( + "{}", + if switched_on { + "Enabling Docker" + } else { + "Disabling Docker" + } + ); + + self.enable_docker = switched_on; + + widgets + .distrobox + .set_sensitive(self.enable_docker || self.enable_podman); + if !(self.enable_docker || self.enable_podman) { + widgets.distrobox_switch.set_active(false); + } + }, + Self::Input::Podman(switched_on) => { + tracing::info!( + "{}", + if switched_on { + "Enabling Podman" + } else { + "Disabling Podman" + } + ); + + self.enable_podman = switched_on; + + widgets + .distrobox + .set_sensitive(self.enable_docker || self.enable_podman); + if !(self.enable_docker || self.enable_podman) { + widgets.distrobox_switch.set_active(false); + } + }, + Self::Input::Distrobox(switched_on) => { + tracing::info!( + "{}", + if switched_on { + "Enabling Distrobox" + } else { + "Disabling Distrobox" + } + ); + + self.enable_distrobox = switched_on; + }, + Self::Input::Apptainer(switched_on) => { + tracing::info!( + "{}", + if switched_on { + "Enabling Apptainer" + } else { + "Disabling Apptainer" + } + ); + + self.enable_distrobox = switched_on; + }, + Self::Input::QEMU(switched_on) => { + tracing::info!( + "{}", + if switched_on { + "Enabling QEMU" + } else { + "Disabling QEMU" + } + ); + + self.enable_qemu = switched_on; + }, + Self::Input::Virtualbox(switched_on) => { + tracing::info!( + "{}", + if switched_on { + "Enabling Virtualbox" + } else { + "Disabling Virtualbox" + } + ); + + self.enable_virtualbox = switched_on; + }, + } + + let mut commands: Vec<&str> = Vec::new(); + + if self.enable_docker { + commands.push( + "pacstall -PIQ docker-bin docker-buildx-plugin-bin docker-compose-plugin-bin", + ); + } + + if self.enable_podman { + commands.push("sudo apt-get install -y podman"); + } + + if self.enable_distrobox && (self.enable_docker || self.enable_podman) { + commands.push("pacstall -PIQ distrobox"); + } + + if self.enable_apptainer { + commands.push("pacstall -PIQ apptainer"); + } + + if self.enable_qemu { + commands.push("sudo apt-get install -y qemu-system qemu-user-static qemu-utils"); + } + + if self.enable_virtualbox { + commands.push("sudo apt-get install -y virtualbox"); + } + + COMMANDS.write_inner().insert("containers", commands); + } +} diff --git a/src/done.rs b/src/done.rs index 7fc78d7..e43db1d 100644 --- a/src/done.rs +++ b/src/done.rs @@ -4,6 +4,8 @@ use gettextrs::gettext; use relm4::adw::prelude::*; use relm4::{adw, gtk, main_application, ComponentParts, ComponentSender, SimpleComponent}; +use crate::config::PROFILE; + #[derive(Debug)] pub(crate) struct DoneModel { icon: &'static str, @@ -16,7 +18,7 @@ pub(crate) struct DoneModel { pub(crate) enum DoneInput { /// Restarts the OS. Reboot, - /// Sent by the [crate::carousel] whenever an error occurs. + /// Sent by the [`crate::carousel`] whenever an error occurs. /// This signals the done page to switch to a "error" page state. SwitchToErrorState, /// Sent when an error has occurred, and the user has clicked the "close" @@ -82,7 +84,7 @@ impl SimpleComponent for DoneModel { fn init( _init: Self::Init, - root: &Self::Root, + root: Self::Root, sender: ComponentSender, ) -> ComponentParts { let model = DoneModel { @@ -100,7 +102,11 @@ impl SimpleComponent for DoneModel { fn update(&mut self, message: Self::Input, _sender: ComponentSender) { match message { Self::Input::Reboot => { - Command::new("/sbin/reboot").status().unwrap(); + if PROFILE != "Devel" { + Command::new("/sbin/reboot").status().unwrap(); + } + tracing::info!("Not rebooting, closing the application instead"); + main_application().quit(); }, Self::Input::SwitchToErrorState => { self.error_state = true; diff --git a/src/extra_settings.rs b/src/extra_settings.rs index 841dd18..a45daa7 100644 --- a/src/extra_settings.rs +++ b/src/extra_settings.rs @@ -5,10 +5,12 @@ use relm4::{adw, gtk, ComponentParts, ComponentSender, SimpleComponent}; use crate::COMMANDS; #[derive(Debug)] +#[allow(clippy::struct_excessive_bools)] pub(crate) struct ExtraSettingsModel { remove_nala: bool, enable_apport: bool, enable_github: bool, + enable_redshift: bool, } #[derive(Debug)] @@ -17,8 +19,10 @@ pub(crate) enum ExtraSettingsInput { Nala(bool), /// Represents the Apport switch state Apport(bool), - // Represents the GitHub switch state + /// Represents the GitHub switch state Github(bool), + /// Represents the Redshift switch state + Redshift(bool), } #[derive(Debug)] @@ -95,6 +99,18 @@ impl SimpleComponent for ExtraSettingsModel { } } }, + adw::ActionRow { + set_title: "Redshift", + set_subtitle: &gettext("Adjusts the color temperature of your screen."), + + add_suffix = >k::Switch { + set_valign: gtk::Align::Center, + + connect_active_notify[sender] => move |switch| { + sender.input(Self::Input::Redshift(switch.is_active())); + } + } + }, } }, gtk::Button::with_label(&gettext("Next")) { @@ -112,13 +128,14 @@ impl SimpleComponent for ExtraSettingsModel { fn init( _init: Self::Init, - root: &Self::Root, + root: Self::Root, sender: ComponentSender, ) -> ComponentParts { let model = ExtraSettingsModel { remove_nala: false, enable_apport: false, enable_github: false, + enable_redshift: false, }; let widgets = view_output!(); @@ -164,6 +181,18 @@ impl SimpleComponent for ExtraSettingsModel { self.enable_apport = switched_on; }, + Self::Input::Redshift(switched_on) => { + tracing::info!( + "{}", + if switched_on { + "Enabling redshift" + } else { + "Disabling redshift" + } + ); + + self.enable_redshift = switched_on; + }, } let mut commands: Vec<&str> = Vec::new(); @@ -174,16 +203,15 @@ impl SimpleComponent for ExtraSettingsModel { if self.enable_apport { commands.push("sudo apt-get install -y apport"); - commands.push("systemctl enable apport.service || true"); + commands.push("{ sudo systemctl enable apport.service || :; }"); } if self.enable_github { - commands.push("echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers"); - commands.push( - "HOME=/home/$USER runuser -l $USER -c 'SUDO_USER=$USER \ - PACSTALL_DOWNLOADER=quiet-wget pacstall -PI github-cli-deb'", - ); - commands.push("sudo sed -i 's/%sudo ALL=(ALL) NOPASSWD:ALL//' /etc/sudoers"); + commands.push("pacstall -PIQ github-cli-deb"); + } + + if self.enable_redshift { + commands.push("sudo apt-get install -y redshift redshift-gtk"); } COMMANDS.write_inner().insert("extra_settings", commands); diff --git a/src/main.rs b/src/main.rs index ca505bb..d7230e9 100644 --- a/src/main.rs +++ b/src/main.rs @@ -4,7 +4,7 @@ use std::collections::HashMap; use std::env; use std::path::Path; -use carousel::{CarouselInput, CarouselModel, CarouselOutput}; +use carousel::{CarouselInput, CarouselOutput, CarouselPagesModel}; use config::{APP_ID, GETTEXT_PACKAGE, LOCALEDIR, RESOURCES_FILE}; use gettextrs::{gettext, LocaleCategory}; use relm4::adw::prelude::*; @@ -18,11 +18,11 @@ use tracing_subscriber::fmt::writer::MakeWriterExt; mod carousel; mod config; +mod containers; mod done; mod extra_settings; mod package_manager; mod progress; -mod theme; mod welcome; /// Gathers all the commands to be executed from different pages. @@ -30,7 +30,7 @@ pub(crate) static COMMANDS: SharedState> SharedState::new(); struct AppModel { - carousel: Controller, + carousel: Controller, back_button_visible: bool, } @@ -50,8 +50,8 @@ impl SimpleComponent for AppModel { view! { adw::ApplicationWindow { - set_default_width: 750, - set_default_height: 750, + set_default_width: 800, + set_default_height: 900, gtk::Box { set_orientation: gtk::Orientation::Vertical, @@ -93,11 +93,11 @@ impl SimpleComponent for AppModel { // Initialize the UI. fn init( _counter: Self::Init, - root: &Self::Root, + root: Self::Root, sender: ComponentSender, ) -> ComponentParts { let model = AppModel { - carousel: CarouselModel::builder().launch(()).forward( + carousel: CarouselPagesModel::builder().launch(()).forward( sender.input_sender(), |message| match message { CarouselOutput::ShowBackButton => AppInput::ShowBackButton, @@ -155,7 +155,7 @@ fn main() { provider.load_from_resource("/org/rhinolinux/RhinoSetup/style.css"); if let Some(display) = gdk::Display::default() { - gtk::StyleContext::add_provider_for_display( + gtk::style_context_add_provider_for_display( &display, &provider, gtk::STYLE_PROVIDER_PRIORITY_APPLICATION, @@ -174,16 +174,6 @@ fn main() { .style_manager() .set_color_scheme(adw::ColorScheme::PreferDark); - // HACK: The app doesn't start up with the "correct" theme, this "hack" "fixes" - // it. - if config::PROFILE != "Devel" { - if let Err(error) = gio::Settings::new("org.gnome.desktop.interface") - .set_string("gtk-theme", "Yaru-purple-dark") - { - tracing::error!("Error FORCING GTK theme: {error}"); - } - } - - let app = RelmApp::with_app(app); + let app = RelmApp::from_app(app); app.run::(()); } diff --git a/src/package_manager.rs b/src/package_manager.rs index 974f017..b7475e9 100644 --- a/src/package_manager.rs +++ b/src/package_manager.rs @@ -9,19 +9,27 @@ use crate::COMMANDS; pub(crate) struct PackageManagerModel { install_flatpak: bool, install_flatpak_beta: bool, + install_flatpak_flatseal: bool, + install_nix: bool, install_snap: bool, install_appimage: bool, + install_appimage_am: bool, } #[derive(Debug)] pub(crate) enum PackageManagerInput { - /// Represents the Flatpak switch state + /// Represents the Flatpak switch states Flatpak(bool), FlatpakBeta(bool), + FlatpakFlatSeal(bool), + /// Represents the Nix switch state + Nix(bool), /// Represents the Snap switch state Snap(bool), - /// Represents the AppImage switch state + #[allow(clippy::doc_markdown)] + /// Represents the AppImage switch states AppImage(bool), + AppImageAM(bool), } #[derive(Debug)] @@ -79,6 +87,8 @@ impl Component for PackageManagerModel { set_title: "Flatpak Beta Channel", set_subtitle: &gettext("Allows software to be installed from the Flatpak Beta Channel"), set_tooltip_text: Some(&gettext("Enable Flatpak Beta Channel.")), + set_sensitive: false, + #[name="flatpak_beta_switch"] add_suffix = >k::Switch { set_valign: gtk::Align::Center, set_active: false, @@ -86,6 +96,34 @@ impl Component for PackageManagerModel { sender.input(PackageManagerInput::FlatpakBeta(switch.is_active())); } } + }, + #[name="flatpak_flatseal"] + add_row = &adw::ActionRow { + set_title: "Flatseal", + set_subtitle: &gettext("Manage Flatpak permissions"), + set_tooltip_text: Some(&gettext("Enable Flatseal permission manager.")), + set_sensitive: false, + #[name="flatpak_flatseal_switch"] + add_suffix = >k::Switch { + set_valign: gtk::Align::Center, + set_active: false, + connect_active_notify[sender] => move |switch| { + sender.input(PackageManagerInput::FlatpakFlatSeal(switch.is_active())); + } + } + } + }, + adw::ActionRow { + set_title: "Nix", + set_subtitle: &gettext("Will also configure the nixpkgs-unstable channel."), + set_tooltip_text: Some(&gettext("Purely functional package manager.")), + + add_suffix = >k::Switch { + set_valign: gtk::Align::Center, + set_active: false, + connect_active_notify[sender] => move |switch| { + sender.input(Self::Input::Nix(switch.is_active())); + } } }, adw::ActionRow { @@ -101,17 +139,33 @@ impl Component for PackageManagerModel { } } }, - adw::ActionRow { + #[name="appimage"] + adw::ExpanderRow { set_title: "AppImage", set_subtitle: &gettext("Will install the necessary dependencies to run AppImages."), set_tooltip_text: Some(&gettext("Self-contained and compressed executable format for the Linux platform.")), - add_suffix = >k::Switch { + add_action = >k::Switch { set_valign: gtk::Align::Center, set_active: false, connect_active_notify[sender] => move |switch| { sender.input(Self::Input::AppImage(switch.is_active())); } + }, + #[name="appimage_am"] + add_row = &adw::ActionRow { + set_title: "AM", + set_subtitle: &gettext("A command line interface to install AppImages."), + set_tooltip_text: Some(&gettext("Enable the AM package manager.")), + set_sensitive: false, + #[name="appimage_am_switch"] + add_suffix = >k::Switch { + set_valign: gtk::Align::Center, + set_active: false, + connect_active_notify[sender] => move |switch| { + sender.input(PackageManagerInput::AppImageAM(switch.is_active())); + } + } } } } @@ -132,14 +186,17 @@ impl Component for PackageManagerModel { fn init( _init: Self::Init, - root: &Self::Root, + root: Self::Root, sender: ComponentSender, ) -> ComponentParts { let model = PackageManagerModel { install_flatpak: false, install_flatpak_beta: false, + install_flatpak_flatseal: false, + install_nix: false, install_snap: false, install_appimage: false, + install_appimage_am: false, }; let widgets = view_output!(); @@ -147,6 +204,7 @@ impl Component for PackageManagerModel { ComponentParts { model, widgets } } + #[allow(clippy::too_many_lines)] fn update_with_view( &mut self, widgets: &mut Self::Widgets, @@ -169,6 +227,11 @@ impl Component for PackageManagerModel { widgets.flatpak.set_expanded(self.install_flatpak); widgets.flatpak_beta.set_sensitive(self.install_flatpak); + widgets.flatpak_flatseal.set_sensitive(self.install_flatpak); + if !self.install_flatpak { + widgets.flatpak_beta_switch.set_active(false); + widgets.flatpak_flatseal_switch.set_active(false); + } }, Self::Input::FlatpakBeta(switched_on) => { tracing::info!( @@ -182,6 +245,30 @@ impl Component for PackageManagerModel { self.install_flatpak_beta = switched_on; }, + Self::Input::FlatpakFlatSeal(switched_on) => { + tracing::info!( + "{}", + if switched_on { + "Enabling Flatseal installation" + } else { + "Disabling Flatseal installation" + } + ); + + self.install_flatpak_flatseal = switched_on; + }, + Self::Input::Nix(switched_on) => { + tracing::info!( + "{}", + if switched_on { + "Enabling Nix installation" + } else { + "Disabling Nix installation" + } + ); + + self.install_nix = switched_on; + }, Self::Input::Snap(switched_on) => { tracing::info!( "{}", @@ -204,6 +291,23 @@ impl Component for PackageManagerModel { } ); self.install_appimage = switched_on; + + widgets.appimage.set_expanded(self.install_appimage); + widgets.appimage_am.set_sensitive(self.install_appimage); + if !self.install_appimage { + widgets.appimage_am_switch.set_active(false); + } + }, + Self::Input::AppImageAM(switched_on) => { + tracing::info!( + "{}", + if switched_on { + "Enabling AM installation" + } else { + "Disabling AM installation" + } + ); + self.install_appimage_am = switched_on; }, } @@ -211,18 +315,45 @@ impl Component for PackageManagerModel { if self.install_flatpak { commands.push("sudo apt-get install -y flatpak"); - commands.push("flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo"); + commands.push("flatpak remote-add --system --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo"); + commands.push( + "flatpak install --system flathub org.gtk.Gtk3theme.adw-gtk3 \ + org.gtk.Gtk3theme.adw-gtk3-dark -y", + ); + commands.push( + "sudo flatpak override --filesystem='xdg-config/gtk-3.0:ro' \ + --filesystem='xdg-config/gtk-4.0:ro' --filesystem='xdg-data/icons:ro' \ + --filesystem='xdg-data/themes:ro'", + ); if self.install_flatpak_beta { - commands.push("flatpak remote-add --if-not-exists flathub-beta https://flathub.org/beta-repo/flathub-beta.flatpakrepo"); + commands.push("flatpak remote-add --system --if-not-exists flathub-beta https://flathub.org/beta-repo/flathub-beta.flatpakrepo"); + } + if self.install_flatpak_flatseal { + commands.push("flatpak install --system flathub com.github.tchx84.Flatseal -y"); } } + if self.install_nix { + commands.push("sudo apt-get install -y nix-bin nix-setup-systemd"); + commands.push("sudo groupadd -f nix-users"); + commands.push("sudo usermod -a -G nix-users $USER"); + commands.push("{ sudo systemctl enable nix-daemon.service || :; }"); + commands.push("nix-channel --add https://nixos.org/channels/nixpkgs-unstable nixpkgs"); + commands.push("nix-channel --update"); + } + if self.install_snap { commands.push("sudo apt-get install -y snapd"); } if self.install_appimage { commands.push("sudo apt-get install -y libfuse2"); + if self.install_appimage_am { + commands.push( + "{ wget https://github.com/ivan-hc/AM/raw/main/INSTALL && sudo sh ./INSTALL \ + && rm ./INSTALL; }", + ); + } } COMMANDS.write_inner().insert("package_manager", commands); diff --git a/src/progress.rs b/src/progress.rs index 57e1382..b34ef55 100644 --- a/src/progress.rs +++ b/src/progress.rs @@ -8,6 +8,7 @@ use relm4::{ SimpleComponent, }; +use crate::config::PROFILE; use crate::COMMANDS; #[derive(Debug)] @@ -48,7 +49,7 @@ impl SimpleComponent for ProgressBarModel { fn init( init: Self::Init, - root: &Self::Root, + root: Self::Root, _sender: ComponentSender, ) -> ComponentParts { let model = ProgressBarModel { @@ -76,8 +77,8 @@ pub(crate) struct ProgressModel { #[derive(Debug)] pub(crate) enum ProgressInput { - /// Sent by [crate::CarouselModel] when the user has finished browsing - /// through all the other pages. + /// Sent by [`crate::CarouselPagesModel`] when the user has finished + /// browsing through all the other pages. StartInstallation, } @@ -114,7 +115,7 @@ impl SimpleComponent for ProgressModel { fn init( _init: Self::Init, - root: &Self::Root, + root: Self::Root, _sender: ComponentSender, ) -> ComponentParts { let model = ProgressModel { progress_bar: None }; @@ -130,9 +131,14 @@ impl SimpleComponent for ProgressModel { Self::Input::StartInstallation => { tracing::info!("Starting installation"); - COMMANDS - .write_inner() - .insert("pre_run", vec!["sudo apt-get update"]); + COMMANDS.write_inner().insert( + "pre_run", + vec![ + "sudo apt-get update", + "sudo sed -i 's/ignore_stack=false/ignore_stack=true/g' /usr/bin/pacstall \ + && TERM=linux pacstall -U pacstall master", + ], + ); let commands = COMMANDS.read_inner(); let commands = commands.values().flatten(); @@ -147,6 +153,12 @@ impl SimpleComponent for ProgressModel { tracing::debug!("{commands_with_results}"); + if PROFILE == "Devel" { + sender.output(Self::Output::InstallationComplete).unwrap(); + tracing::info!("Installation skipped"); + return; + } + // Spawn a process to execute the commands let mut processor = Command::new("sh") .args([ diff --git a/src/theme.rs b/src/theme.rs deleted file mode 100644 index dc7dd4d..0000000 --- a/src/theme.rs +++ /dev/null @@ -1,216 +0,0 @@ -use std::process::Command; - -use gettextrs::gettext; -use relm4::adw::prelude::*; -use relm4::adw::StyleManager; -use relm4::gtk::gio; -use relm4::{adw, gtk, ComponentParts, ComponentSender, SimpleComponent}; - -pub(crate) struct ThemeModel { - style_manager: StyleManager, -} - -#[derive(Debug)] -pub(crate) enum ThemeInput { - EnableDarkTheme, - EnableLightTheme, -} - -#[derive(Debug)] -pub(crate) enum ThemeOutput { - /// Move to the next page. - NextPage, - /// Move to the error page. - ErrorOccured, -} - -#[relm4::component(pub)] -impl SimpleComponent for ThemeModel { - type Init = (); - type Input = ThemeInput; - type Output = ThemeOutput; - type Widgets = ThemeWidgets; - - view! { - #[root] - gtk::Box { - set_orientation: gtk::Orientation::Vertical, - set_halign: gtk::Align::Fill, - set_valign: gtk::Align::Center, - set_hexpand: true, - - gtk::Box { - set_valign: gtk::Align::Center, - set_spacing: 10, - set_halign: gtk::Align::Center, - - - #[name = "dark_button"] - gtk::CheckButton { - set_tooltip_text: Some("Dark"), - set_halign: gtk::Align::Center, - set_active: true, - - set_css_classes: &["theme-selector", "dark", "card"], - - connect_toggled[sender] => move |btn| { - if btn.is_active() && btn.is_focus() { - sender.input(Self::Input::EnableDarkTheme); - } - } - }, - - gtk::CheckButton { - set_tooltip_text: Some("Default"), - set_halign: gtk::Align::Center, - - // Add `dark_button` to the group, turning both of them mutually exclusive. - set_group: Some(&dark_button), - - set_css_classes: &["theme-selector", "light", "card"], - - connect_toggled[sender] => move |btn| { - if btn.is_active() && btn.is_focus() { - sender.input(Self::Input::EnableLightTheme); - } - } - }, - - }, - - adw::StatusPage { - set_title: &gettext("Color Scheme"), - set_description: Some(&gettext("Choose a color scheme for your system.")), - set_halign: gtk::Align::Fill, - set_valign: gtk::Align::Fill, - set_hexpand: true, - - gtk::Button::with_label(&gettext("Next")) { - set_halign: gtk::Align::Center, - set_css_classes: &["pill", "suggested-action"], - - connect_clicked[sender] => move |_| { - sender.output(Self::Output::NextPage).expect("Failed to send the signal to move to the next page"); - } - } - } - } - } - - fn init( - _init: Self::Init, - root: &Self::Root, - sender: ComponentSender, - ) -> ComponentParts { - let model = ThemeModel { - style_manager: relm4::main_application() - .downcast_ref::() - .unwrap() - .style_manager(), - }; - - let widgets = view_output!(); - - ComponentParts { model, widgets } - } - - fn update(&mut self, message: Self::Input, sender: relm4::ComponentSender) { - let style_manager = &self.style_manager; - match message { - Self::Input::EnableLightTheme => { - tracing::info!("Enabling on Light theme"); - if let Err(error) = Command::new("xfconf-query") - .args([ - "--channel", - "xsettings", - "--property", - "/Net/ThemeName", - "--set", - "Yaru-purple", - ]) - .status() - { - tracing::error!("Error enabling light theme: {}", error); - sender.output(Self::Output::ErrorOccured).expect(""); - } - - if let Err(error) = Command::new("xfconf-query") - .args([ - "--channel", - "xfwm4", - "--property", - "/general/theme", - "--set", - "Yaru", - ]) - .status() - { - tracing::error!("Error enabling dark theme: {}", error); - sender - .output(Self::Output::ErrorOccured) - .expect("Failed to send the signal to move to the error page"); - } - - style_manager.set_color_scheme(adw::ColorScheme::ForceLight); - - if let Err(error) = gio::Settings::new("org.gnome.desktop.interface") - .set_string("color-scheme", "default") - { - tracing::error!("Unable to change gsettings: {}", error); - sender.output(Self::Output::ErrorOccured).expect( - "Failed to send the signal to move to the - error page", - ); - } - }, - Self::Input::EnableDarkTheme => { - tracing::info!("Enabling Dark theme"); - if let Err(error) = Command::new("xfconf-query") - .args([ - "--channel", - "xsettings", - "--property", - "/Net/ThemeName", - "--set", - "Yaru-purple-dark", - ]) - .status() - { - tracing::error!("Error enabling dark theme: {}", error); - sender - .output(Self::Output::ErrorOccured) - .expect("Failed to send the signal to move to the error page"); - } - - if let Err(error) = Command::new("xfconf-query") - .args([ - "--channel", - "xfwm4", - "--property", - "/general/theme", - "--set", - "Yaru-dark", - ]) - .status() - { - tracing::error!("Error enabling dark theme: {}", error); - sender - .output(Self::Output::ErrorOccured) - .expect("Failed to send the signal to move to the error page"); - } - - style_manager.set_color_scheme(adw::ColorScheme::ForceDark); - - if let Err(error) = gio::Settings::new("org.gnome.desktop.interface") - .set_string("color-scheme", "prefer-dark") - { - tracing::error!("Unable to change gsettings: {}", error); - sender.output(Self::Output::ErrorOccured).expect( - "Failed to send the signal to move to the - error page", - ); - } - }, - } - } -} diff --git a/src/welcome.rs b/src/welcome.rs index eda2cff..511bb13 100644 --- a/src/welcome.rs +++ b/src/welcome.rs @@ -7,7 +7,7 @@ use relm4::{adw, gtk, ComponentParts, ComponentSender, SimpleComponent}; pub(crate) struct WelcomeModel { title: &'static str, - titles: Cycle>, + titles: Cycle>, } #[derive(Debug)] @@ -58,7 +58,7 @@ impl SimpleComponent for WelcomeModel { // Initialize the UI. fn init( _counter: Self::Init, - root: &Self::Root, + root: Self::Root, sender: ComponentSender, ) -> ComponentParts { let model = WelcomeModel { @@ -98,6 +98,7 @@ impl SimpleComponent for WelcomeModel { "સુસ્વાગત છે", "ಸುಸ್ವಾಗತ", "സ്വാഗതം", + "ᚹᛁᛚᚳᚢᛗᛖ", ] .into_iter() .cycle(),