RR: Add final page and resolve most warnings
This commit is contained in:
parent
38cd069982
commit
84fbf4f747
144
Cargo.lock
generated
144
Cargo.lock
generated
@ -36,12 +36,6 @@ version = "1.1.0"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
|
checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "bitflags"
|
|
||||||
version = "1.3.2"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "bitflags"
|
name = "bitflags"
|
||||||
version = "2.4.2"
|
version = "2.4.2"
|
||||||
@ -60,7 +54,7 @@ version = "0.18.5"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "8ca26ef0159422fb77631dc9d17b102f253b876fe1586b03b803e63a309b4ee2"
|
checksum = "8ca26ef0159422fb77631dc9d17b102f253b876fe1586b03b803e63a309b4ee2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags 2.4.2",
|
"bitflags",
|
||||||
"cairo-sys-rs",
|
"cairo-sys-rs",
|
||||||
"glib",
|
"glib",
|
||||||
"libc",
|
"libc",
|
||||||
@ -341,7 +335,7 @@ version = "0.18.5"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "233daaf6e83ae6a12a52055f568f9d7cf4671dabb78ff9560ab6da230ce00ee5"
|
checksum = "233daaf6e83ae6a12a52055f568f9d7cf4671dabb78ff9560ab6da230ce00ee5"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags 2.4.2",
|
"bitflags",
|
||||||
"futures-channel",
|
"futures-channel",
|
||||||
"futures-core",
|
"futures-core",
|
||||||
"futures-executor",
|
"futures-executor",
|
||||||
@ -513,12 +507,6 @@ version = "0.4.1"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8"
|
checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "hermit-abi"
|
|
||||||
version = "0.3.5"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "d0c62115964e08cb8039170eb33c1d0e2388a256930279edca206fff675f82c3"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "indexmap"
|
name = "indexmap"
|
||||||
version = "2.2.2"
|
version = "2.2.2"
|
||||||
@ -529,17 +517,6 @@ dependencies = [
|
|||||||
"hashbrown",
|
"hashbrown",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "io-lifetimes"
|
|
||||||
version = "1.0.11"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2"
|
|
||||||
dependencies = [
|
|
||||||
"hermit-abi",
|
|
||||||
"libc",
|
|
||||||
"windows-sys 0.48.0",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lazy_static"
|
name = "lazy_static"
|
||||||
version = "1.4.0"
|
version = "1.4.0"
|
||||||
@ -663,7 +640,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||||||
checksum = "57119c3b893986491ec9aa85056780d3a0f3cf4da7cc09dd3650dbd6c6738fb9"
|
checksum = "57119c3b893986491ec9aa85056780d3a0f3cf4da7cc09dd3650dbd6c6738fb9"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"libc",
|
"libc",
|
||||||
"windows-sys 0.52.0",
|
"windows-sys",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -708,7 +685,6 @@ dependencies = [
|
|||||||
"libadwaita",
|
"libadwaita",
|
||||||
"os_pipe",
|
"os_pipe",
|
||||||
"regex",
|
"regex",
|
||||||
"zoha-vte4",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -1041,37 +1017,13 @@ version = "0.4.0"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
|
checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "windows-sys"
|
|
||||||
version = "0.48.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9"
|
|
||||||
dependencies = [
|
|
||||||
"windows-targets 0.48.5",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "windows-sys"
|
name = "windows-sys"
|
||||||
version = "0.52.0"
|
version = "0.52.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d"
|
checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"windows-targets 0.52.0",
|
"windows-targets",
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "windows-targets"
|
|
||||||
version = "0.48.5"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c"
|
|
||||||
dependencies = [
|
|
||||||
"windows_aarch64_gnullvm 0.48.5",
|
|
||||||
"windows_aarch64_msvc 0.48.5",
|
|
||||||
"windows_i686_gnu 0.48.5",
|
|
||||||
"windows_i686_msvc 0.48.5",
|
|
||||||
"windows_x86_64_gnu 0.48.5",
|
|
||||||
"windows_x86_64_gnullvm 0.48.5",
|
|
||||||
"windows_x86_64_msvc 0.48.5",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -1080,93 +1032,51 @@ version = "0.52.0"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd"
|
checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"windows_aarch64_gnullvm 0.52.0",
|
"windows_aarch64_gnullvm",
|
||||||
"windows_aarch64_msvc 0.52.0",
|
"windows_aarch64_msvc",
|
||||||
"windows_i686_gnu 0.52.0",
|
"windows_i686_gnu",
|
||||||
"windows_i686_msvc 0.52.0",
|
"windows_i686_msvc",
|
||||||
"windows_x86_64_gnu 0.52.0",
|
"windows_x86_64_gnu",
|
||||||
"windows_x86_64_gnullvm 0.52.0",
|
"windows_x86_64_gnullvm",
|
||||||
"windows_x86_64_msvc 0.52.0",
|
"windows_x86_64_msvc",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "windows_aarch64_gnullvm"
|
|
||||||
version = "0.48.5"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "windows_aarch64_gnullvm"
|
name = "windows_aarch64_gnullvm"
|
||||||
version = "0.52.0"
|
version = "0.52.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea"
|
checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "windows_aarch64_msvc"
|
|
||||||
version = "0.48.5"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "windows_aarch64_msvc"
|
name = "windows_aarch64_msvc"
|
||||||
version = "0.52.0"
|
version = "0.52.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef"
|
checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "windows_i686_gnu"
|
|
||||||
version = "0.48.5"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "windows_i686_gnu"
|
name = "windows_i686_gnu"
|
||||||
version = "0.52.0"
|
version = "0.52.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313"
|
checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "windows_i686_msvc"
|
|
||||||
version = "0.48.5"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "windows_i686_msvc"
|
name = "windows_i686_msvc"
|
||||||
version = "0.52.0"
|
version = "0.52.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a"
|
checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "windows_x86_64_gnu"
|
|
||||||
version = "0.48.5"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "windows_x86_64_gnu"
|
name = "windows_x86_64_gnu"
|
||||||
version = "0.52.0"
|
version = "0.52.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd"
|
checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "windows_x86_64_gnullvm"
|
|
||||||
version = "0.48.5"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "windows_x86_64_gnullvm"
|
name = "windows_x86_64_gnullvm"
|
||||||
version = "0.52.0"
|
version = "0.52.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e"
|
checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "windows_x86_64_msvc"
|
|
||||||
version = "0.48.5"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "windows_x86_64_msvc"
|
name = "windows_x86_64_msvc"
|
||||||
version = "0.52.0"
|
version = "0.52.0"
|
||||||
@ -1181,35 +1091,3 @@ checksum = "a7cad8365489051ae9f054164e459304af2e7e9bb407c958076c8bf4aef52da5"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"memchr",
|
"memchr",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "zoha-vte4"
|
|
||||||
version = "0.0.2"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "e09b58dbfab3b62c5544cafadc504db3b7d12f21ac6e55048489dbf90c979caf"
|
|
||||||
dependencies = [
|
|
||||||
"bitflags 1.3.2",
|
|
||||||
"gdk4",
|
|
||||||
"gio",
|
|
||||||
"glib",
|
|
||||||
"gtk4",
|
|
||||||
"io-lifetimes",
|
|
||||||
"libc",
|
|
||||||
"pango",
|
|
||||||
"zoha-vte4-sys",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "zoha-vte4-sys"
|
|
||||||
version = "0.0.2"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "749df284a2c2e68c2c359762b277854d533a4d50c7a216a3adf45cd5e5ee2993"
|
|
||||||
dependencies = [
|
|
||||||
"gdk4-sys",
|
|
||||||
"gio-sys",
|
|
||||||
"glib",
|
|
||||||
"gtk4-sys",
|
|
||||||
"libc",
|
|
||||||
"pango-sys",
|
|
||||||
"system-deps",
|
|
||||||
]
|
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
name = "pika-first-setup-gtk4"
|
name = "pika-first-setup-gtk4"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
profile = "stable"
|
|
||||||
|
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
@ -12,6 +11,5 @@ gtk = { version = "0.7.3", package = "gtk4", features = ["v4_12"] }
|
|||||||
async-channel = "2.1.1"
|
async-channel = "2.1.1"
|
||||||
regex = "1.10.3"
|
regex = "1.10.3"
|
||||||
gettext-rs = { version = "0.7", features = ["gettext-system"] }
|
gettext-rs = { version = "0.7", features = ["gettext-system"] }
|
||||||
vte = { version = "0.0.2", package = "zoha-vte4", features = ["v0_72"] }
|
|
||||||
duct = "0.13.7"
|
duct = "0.13.7"
|
||||||
os_pipe = "1.1.5"
|
os_pipe = "1.1.5"
|
||||||
|
@ -167,3 +167,12 @@ msgstr "Open Driver manager"
|
|||||||
|
|
||||||
msgid "first_setup_driver_skip_button_label"
|
msgid "first_setup_driver_skip_button_label"
|
||||||
msgstr "Skip Driver installation"
|
msgstr "Skip Driver installation"
|
||||||
|
|
||||||
|
msgid "first_setup_final_box_text_title"
|
||||||
|
msgstr "Initial Setup Complete!"
|
||||||
|
|
||||||
|
msgid "first_setup_final_box_text_description"
|
||||||
|
msgstr "PikaOS initial post install setup has been completed.\nReboot one last time to enter your new user session."
|
||||||
|
|
||||||
|
msgid "first_setup_reboot_button_label"
|
||||||
|
msgstr "Reboot"
|
@ -1,13 +1,7 @@
|
|||||||
// GTK crates
|
// GTK crates
|
||||||
use adw::ffi::{AdwToolbarStyle, ADW_TOOLBAR_FLAT};
|
|
||||||
use adw::prelude::*;
|
use adw::prelude::*;
|
||||||
use adw::*;
|
use adw::*;
|
||||||
use gdk::Display;
|
|
||||||
use glib::*;
|
use glib::*;
|
||||||
/// Use all gtk4 libraries (gtk4 -> gtk because cargo)
|
|
||||||
/// Use all libadwaita libraries (libadwaita -> adw because cargo)
|
|
||||||
use gtk::prelude::*;
|
|
||||||
use gtk::*;
|
|
||||||
|
|
||||||
// application crates
|
// application crates
|
||||||
/// first setup crates
|
/// first setup crates
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
pub const APP_ID: &str = "com.github.pikaos-linux.pikafirstsetup";
|
pub const APP_ID: &str = "com.github.pikaos-linux.pikafirstsetup";
|
||||||
pub const GETTEXT_PACKAGE: &str = env!("CARGO_PKG_NAME");
|
pub const GETTEXT_PACKAGE: &str = env!("CARGO_PKG_NAME");
|
||||||
pub const LOCALEDIR: &str = "/usr/share/locale";
|
pub const LOCALEDIR: &str = "/usr/share/locale";
|
||||||
pub const PKGDATADIR: &str = " /usr/share";
|
//pub const PKGDATADIR: &str = " /usr/share";
|
||||||
//pub const RESOURCES_FILE: &str = concat!(@PKGDATADIR@, "/resources.gresource");
|
//pub const RESOURCES_FILE: &str = concat!(@PKGDATADIR@, "/resources.gresource");
|
||||||
pub const VERSION: &str = env!("CARGO_PKG_VERSION");
|
//pub const VERSION: &str = env!("CARGO_PKG_VERSION");
|
||||||
|
@ -1,9 +0,0 @@
|
|||||||
use std::io::prelude::*;
|
|
||||||
use std::net::TcpStream;
|
|
||||||
pub fn check_internet_connection() -> std::io::Result<()> {
|
|
||||||
let mut stream = TcpStream::connect("google.com:443")?;
|
|
||||||
|
|
||||||
stream.write(&[1])?;
|
|
||||||
stream.read(&mut [0; 128])?;
|
|
||||||
Ok(())
|
|
||||||
}
|
|
@ -1,17 +1,12 @@
|
|||||||
use std::cell::RefCell;
|
use std::cell::RefCell;
|
||||||
use std::rc::Rc;
|
use std::rc::Rc;
|
||||||
// GTK crates
|
// GTK crates
|
||||||
use adw::ffi::ADW_TOOLBAR_FLAT;
|
|
||||||
use adw::prelude::*;
|
use adw::prelude::*;
|
||||||
use adw::*;
|
use adw::*;
|
||||||
use gdk::Display;
|
|
||||||
use glib::*;
|
use glib::*;
|
||||||
/// Use all gtk4 libraries (gtk4 -> gtk because cargo)
|
/// Use all gtk4 libraries (gtk4 -> gtk because cargo)
|
||||||
/// Use all libadwaita libraries (libadwaita -> adw because cargo)
|
/// Use all libadwaita libraries (libadwaita -> adw because cargo)
|
||||||
use gtk::prelude::*;
|
|
||||||
use gtk::*;
|
use gtk::*;
|
||||||
use vte::prelude::*;
|
|
||||||
use vte::*;
|
|
||||||
|
|
||||||
use gettextrs::gettext;
|
use gettextrs::gettext;
|
||||||
|
|
||||||
@ -19,13 +14,9 @@ use std::{thread, time};
|
|||||||
|
|
||||||
use std::{
|
use std::{
|
||||||
error::Error,
|
error::Error,
|
||||||
io::Error as ErrorIO,
|
|
||||||
io::{ErrorKind, Read, Write},
|
|
||||||
process::{Command, Stdio},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
use duct::cmd;
|
use duct::cmd;
|
||||||
use os_pipe::*;
|
|
||||||
use std::io::prelude::*;
|
use std::io::prelude::*;
|
||||||
use std::io::BufReader;
|
use std::io::BufReader;
|
||||||
|
|
||||||
|
@ -1,34 +1,21 @@
|
|||||||
use std::cell::RefCell;
|
use std::cell::RefCell;
|
||||||
use std::rc::Rc;
|
use std::rc::Rc;
|
||||||
// GTK crates
|
// GTK crates
|
||||||
use adw::ffi::ADW_TOOLBAR_FLAT;
|
|
||||||
use adw::prelude::*;
|
use adw::prelude::*;
|
||||||
use adw::*;
|
use adw::*;
|
||||||
use gdk::Display;
|
|
||||||
use glib::*;
|
use glib::*;
|
||||||
/// Use all gtk4 libraries (gtk4 -> gtk because cargo)
|
/// Use all gtk4 libraries (gtk4 -> gtk because cargo)
|
||||||
/// Use all libadwaita libraries (libadwaita -> adw because cargo)
|
/// Use all libadwaita libraries (libadwaita -> adw because cargo)
|
||||||
use gtk::prelude::*;
|
|
||||||
use gtk::*;
|
use gtk::*;
|
||||||
use vte::prelude::*;
|
|
||||||
use vte::*;
|
|
||||||
|
|
||||||
use gettextrs::gettext;
|
use gettextrs::gettext;
|
||||||
|
|
||||||
use std::{thread, time};
|
use std::{thread, time};
|
||||||
|
|
||||||
use std::{
|
use std::{
|
||||||
error::Error,
|
process::{Command},
|
||||||
io::Error as ErrorIO,
|
|
||||||
io::{ErrorKind, Read, Write},
|
|
||||||
process::{Command, Stdio},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
use duct::cmd;
|
|
||||||
use os_pipe::*;
|
|
||||||
use std::io::prelude::*;
|
|
||||||
use std::io::BufReader;
|
|
||||||
|
|
||||||
pub fn driver_carousel(
|
pub fn driver_carousel(
|
||||||
first_setup_carousel: &adw::Carousel,
|
first_setup_carousel: &adw::Carousel,
|
||||||
internet_connected: &Rc<RefCell<bool>>,
|
internet_connected: &Rc<RefCell<bool>>,
|
||||||
|
51
src/first_setup/final_carousel.rs
Normal file
51
src/first_setup/final_carousel.rs
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
// GTK crates
|
||||||
|
use adw::prelude::*;
|
||||||
|
use adw::*;
|
||||||
|
/// Use all gtk4 libraries (gtk4 -> gtk because cargo)
|
||||||
|
/// Use all libadwaita libraries (libadwaita -> adw because cargo)
|
||||||
|
use gtk::*;
|
||||||
|
|
||||||
|
use gettextrs::gettext;
|
||||||
|
|
||||||
|
use duct::cmd;
|
||||||
|
|
||||||
|
const REBOOT_PROG: &str = r###"
|
||||||
|
#! /bin/bash
|
||||||
|
userdel -r -f pikaos
|
||||||
|
reboot
|
||||||
|
"###;
|
||||||
|
|
||||||
|
pub fn final_carousel(first_setup_carousel: &adw::Carousel) {
|
||||||
|
let first_setup_final_box = gtk::Box::builder()
|
||||||
|
// that puts items vertically
|
||||||
|
.orientation(Orientation::Vertical)
|
||||||
|
.vexpand(true)
|
||||||
|
.valign(Align::Center)
|
||||||
|
.hexpand(true)
|
||||||
|
.vexpand(true)
|
||||||
|
.build();
|
||||||
|
|
||||||
|
let first_setup_final_box_text = adw::StatusPage::builder()
|
||||||
|
.icon_name("emblem-favorite")
|
||||||
|
.title(gettext("first_setup_final_box_text_title"))
|
||||||
|
.description(gettext("first_setup_final_box_text_description"))
|
||||||
|
.build();
|
||||||
|
first_setup_final_box_text.add_css_class("compact");
|
||||||
|
|
||||||
|
let first_setup_start_button = gtk::Button::builder()
|
||||||
|
.label(gettext("first_setup_reboot_button_label"))
|
||||||
|
.halign(Align::Center)
|
||||||
|
.build();
|
||||||
|
|
||||||
|
first_setup_start_button.add_css_class("suggested-action");
|
||||||
|
first_setup_start_button.add_css_class("pill");
|
||||||
|
|
||||||
|
first_setup_final_box.append(&first_setup_final_box_text);
|
||||||
|
first_setup_final_box.append(&first_setup_start_button);
|
||||||
|
|
||||||
|
first_setup_carousel.append(&first_setup_final_box);
|
||||||
|
|
||||||
|
first_setup_start_button.connect_clicked( move |_| {
|
||||||
|
let _ = cmd!("sudo", "bash", "-c", REBOOT_PROG).read();
|
||||||
|
});
|
||||||
|
}
|
@ -1,18 +1,13 @@
|
|||||||
// GTK crates
|
// GTK crates
|
||||||
use adw::ffi::ADW_TOOLBAR_FLAT;
|
|
||||||
use adw::prelude::*;
|
use adw::prelude::*;
|
||||||
use adw::*;
|
use adw::*;
|
||||||
use gdk::Display;
|
|
||||||
use glib::*;
|
use glib::*;
|
||||||
/// Use all gtk4 libraries (gtk4 -> gtk because cargo)
|
/// Use all gtk4 libraries (gtk4 -> gtk because cargo)
|
||||||
/// Use all libadwaita libraries (libadwaita -> adw because cargo)
|
/// Use all libadwaita libraries (libadwaita -> adw because cargo)
|
||||||
use gtk::prelude::*;
|
|
||||||
use gtk::*;
|
|
||||||
|
|
||||||
use gettextrs::gettext;
|
use gettextrs::gettext;
|
||||||
|
|
||||||
//
|
//
|
||||||
use crate::connection_check::check_internet_connection;
|
|
||||||
use std::cell::RefCell;
|
use std::cell::RefCell;
|
||||||
use std::rc::Rc;
|
use std::rc::Rc;
|
||||||
|
|
||||||
@ -24,6 +19,7 @@ use crate::first_setup::user_carousel::user_carousel;
|
|||||||
use crate::first_setup::driver_carousel::driver_carousel;
|
use crate::first_setup::driver_carousel::driver_carousel;
|
||||||
use crate::first_setup::codec_carousel::codec_carousel;
|
use crate::first_setup::codec_carousel::codec_carousel;
|
||||||
use crate::first_setup::gameutils_carousel::gameutils_carousel;
|
use crate::first_setup::gameutils_carousel::gameutils_carousel;
|
||||||
|
use crate::first_setup::final_carousel::final_carousel;
|
||||||
|
|
||||||
pub fn first_setup(window: &adw::ApplicationWindow) {
|
pub fn first_setup(window: &adw::ApplicationWindow) {
|
||||||
let first_setup_carousel = adw::Carousel::builder()
|
let first_setup_carousel = adw::Carousel::builder()
|
||||||
@ -71,6 +67,7 @@ pub fn first_setup(window: &adw::ApplicationWindow) {
|
|||||||
driver_carousel(&first_setup_carousel, &internet_connected);
|
driver_carousel(&first_setup_carousel, &internet_connected);
|
||||||
codec_carousel(&first_setup_carousel, &internet_connected, &window);
|
codec_carousel(&first_setup_carousel, &internet_connected, &window);
|
||||||
gameutils_carousel(&first_setup_carousel, &internet_connected, &window);
|
gameutils_carousel(&first_setup_carousel, &internet_connected, &window);
|
||||||
|
final_carousel(&first_setup_carousel);
|
||||||
|
|
||||||
// Add file to window
|
// Add file to window
|
||||||
window.set_content(Some(&first_setup_window_toolbarview))
|
window.set_content(Some(&first_setup_window_toolbarview))
|
||||||
|
@ -1,17 +1,12 @@
|
|||||||
use std::cell::RefCell;
|
use std::cell::RefCell;
|
||||||
use std::rc::Rc;
|
use std::rc::Rc;
|
||||||
// GTK crates
|
// GTK crates
|
||||||
use adw::ffi::ADW_TOOLBAR_FLAT;
|
|
||||||
use adw::prelude::*;
|
use adw::prelude::*;
|
||||||
use adw::*;
|
use adw::*;
|
||||||
use gdk::Display;
|
|
||||||
use glib::*;
|
use glib::*;
|
||||||
/// Use all gtk4 libraries (gtk4 -> gtk because cargo)
|
/// Use all gtk4 libraries (gtk4 -> gtk because cargo)
|
||||||
/// Use all libadwaita libraries (libadwaita -> adw because cargo)
|
/// Use all libadwaita libraries (libadwaita -> adw because cargo)
|
||||||
use gtk::prelude::*;
|
|
||||||
use gtk::*;
|
use gtk::*;
|
||||||
use vte::prelude::*;
|
|
||||||
use vte::*;
|
|
||||||
|
|
||||||
use gettextrs::gettext;
|
use gettextrs::gettext;
|
||||||
|
|
||||||
@ -19,13 +14,9 @@ use std::{thread, time};
|
|||||||
|
|
||||||
use std::{
|
use std::{
|
||||||
error::Error,
|
error::Error,
|
||||||
io::Error as ErrorIO,
|
|
||||||
io::{ErrorKind, Read, Write},
|
|
||||||
process::{Command, Stdio},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
use duct::cmd;
|
use duct::cmd;
|
||||||
use os_pipe::*;
|
|
||||||
use std::io::prelude::*;
|
use std::io::prelude::*;
|
||||||
use std::io::BufReader;
|
use std::io::BufReader;
|
||||||
|
|
||||||
|
@ -1,11 +1,9 @@
|
|||||||
// GTK crates
|
// GTK crates
|
||||||
use adw::prelude::*;
|
use adw::prelude::*;
|
||||||
use adw::*;
|
use adw::*;
|
||||||
use gdk::Display;
|
|
||||||
use glib::*;
|
use glib::*;
|
||||||
/// Use all gtk4 libraries (gtk4 -> gtk because cargo)
|
/// Use all gtk4 libraries (gtk4 -> gtk because cargo)
|
||||||
/// Use all libadwaita libraries (libadwaita -> adw because cargo)
|
/// Use all libadwaita libraries (libadwaita -> adw because cargo)
|
||||||
use gtk::prelude::*;
|
|
||||||
use gtk::*;
|
use gtk::*;
|
||||||
|
|
||||||
use gettextrs::gettext;
|
use gettextrs::gettext;
|
||||||
|
@ -1,18 +1,14 @@
|
|||||||
// GTK crates
|
// GTK crates
|
||||||
use adw::prelude::*;
|
use adw::prelude::*;
|
||||||
use adw::*;
|
use adw::*;
|
||||||
use gdk::Display;
|
|
||||||
use glib::*;
|
use glib::*;
|
||||||
/// Use all gtk4 libraries (gtk4 -> gtk because cargo)
|
/// Use all gtk4 libraries (gtk4 -> gtk because cargo)
|
||||||
/// Use all libadwaita libraries (libadwaita -> adw because cargo)
|
/// Use all libadwaita libraries (libadwaita -> adw because cargo)
|
||||||
use gtk::prelude::*;
|
|
||||||
use gtk::*;
|
use gtk::*;
|
||||||
|
|
||||||
use gettextrs::gettext;
|
use gettextrs::gettext;
|
||||||
|
|
||||||
//use crate::check_internet_connection;
|
//use crate::check_internet_connection;
|
||||||
use gtk::gio::ffi::GAsyncReadyCallback;
|
|
||||||
use std::borrow::Borrow as the_rc_borrow;
|
|
||||||
use std::cell::RefCell;
|
use std::cell::RefCell;
|
||||||
use std::env;
|
use std::env;
|
||||||
use std::process::Command;
|
use std::process::Command;
|
||||||
|
@ -6,3 +6,4 @@ pub mod user_carousel;
|
|||||||
pub mod driver_carousel;
|
pub mod driver_carousel;
|
||||||
pub mod codec_carousel;
|
pub mod codec_carousel;
|
||||||
pub mod gameutils_carousel;
|
pub mod gameutils_carousel;
|
||||||
|
pub mod final_carousel;
|
||||||
|
@ -1,17 +1,12 @@
|
|||||||
use std::cell::RefCell;
|
use std::cell::RefCell;
|
||||||
use std::rc::Rc;
|
use std::rc::Rc;
|
||||||
// GTK crates
|
// GTK crates
|
||||||
use adw::ffi::ADW_TOOLBAR_FLAT;
|
|
||||||
use adw::prelude::*;
|
use adw::prelude::*;
|
||||||
use adw::*;
|
use adw::*;
|
||||||
use gdk::Display;
|
|
||||||
use glib::*;
|
use glib::*;
|
||||||
/// Use all gtk4 libraries (gtk4 -> gtk because cargo)
|
/// Use all gtk4 libraries (gtk4 -> gtk because cargo)
|
||||||
/// Use all libadwaita libraries (libadwaita -> adw because cargo)
|
/// Use all libadwaita libraries (libadwaita -> adw because cargo)
|
||||||
use gtk::prelude::*;
|
|
||||||
use gtk::*;
|
use gtk::*;
|
||||||
use vte::prelude::*;
|
|
||||||
use vte::*;
|
|
||||||
|
|
||||||
use gettextrs::gettext;
|
use gettextrs::gettext;
|
||||||
|
|
||||||
@ -19,13 +14,9 @@ use std::{thread, time};
|
|||||||
|
|
||||||
use std::{
|
use std::{
|
||||||
error::Error,
|
error::Error,
|
||||||
io::Error as ErrorIO,
|
|
||||||
io::{ErrorKind, Read, Write},
|
|
||||||
process::{Command, Stdio},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
use duct::cmd;
|
use duct::cmd;
|
||||||
use os_pipe::*;
|
|
||||||
use std::io::prelude::*;
|
use std::io::prelude::*;
|
||||||
use std::io::BufReader;
|
use std::io::BufReader;
|
||||||
|
|
||||||
|
@ -1,25 +1,18 @@
|
|||||||
// GTK crates
|
// GTK crates
|
||||||
use adw::prelude::*;
|
use adw::prelude::*;
|
||||||
use adw::*;
|
use adw::*;
|
||||||
use gdk::Display;
|
|
||||||
use glib::*;
|
use glib::*;
|
||||||
/// Use all gtk4 libraries (gtk4 -> gtk because cargo)
|
/// Use all gtk4 libraries (gtk4 -> gtk because cargo)
|
||||||
/// Use all libadwaita libraries (libadwaita -> adw because cargo)
|
/// Use all libadwaita libraries (libadwaita -> adw because cargo)
|
||||||
use gtk::prelude::*;
|
|
||||||
use gtk::*;
|
use gtk::*;
|
||||||
|
|
||||||
use gettextrs::gettext;
|
use gettextrs::gettext;
|
||||||
|
|
||||||
//use crate::check_internet_connection;
|
//
|
||||||
use gtk::gio::ffi::GAsyncReadyCallback;
|
|
||||||
use gtk::pango::TextTransform::Capitalize;
|
|
||||||
use gtk::Align::Center;
|
|
||||||
use regex::Regex;
|
use regex::Regex;
|
||||||
use std::borrow::Borrow as the_rc_borrow;
|
|
||||||
use std::cell::RefCell;
|
use std::cell::RefCell;
|
||||||
use std::process::Command;
|
|
||||||
use std::rc::Rc;
|
use std::rc::Rc;
|
||||||
use std::{env, thread, time};
|
use std::{thread, time};
|
||||||
use duct::cmd;
|
use duct::cmd;
|
||||||
|
|
||||||
const USER_CREATE_PROG: &str = r###"
|
const USER_CREATE_PROG: &str = r###"
|
||||||
@ -288,7 +281,7 @@ pub fn user_carousel(first_setup_carousel: &adw::Carousel) {
|
|||||||
}));
|
}));
|
||||||
|
|
||||||
user_next_button.connect_clicked(clone!(@weak first_setup_carousel, @weak user_info_username, @weak user_info_password, @weak user_info_full_name => move |_| {
|
user_next_button.connect_clicked(clone!(@weak first_setup_carousel, @weak user_info_username, @weak user_info_password, @weak user_info_full_name => move |_| {
|
||||||
cmd!("sudo", "bash", "-c", USER_CREATE_PROG, &user_info_username.text(), &user_info_password.text(), &user_info_full_name.text()).read();
|
let _ = cmd!("sudo", "bash", "-c", USER_CREATE_PROG, &user_info_username.text(), &user_info_password.text(), &user_info_full_name.text()).read();
|
||||||
first_setup_carousel.scroll_to(&first_setup_carousel.nth_page(3), true);
|
first_setup_carousel.scroll_to(&first_setup_carousel.nth_page(3), true);
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
@ -4,10 +4,8 @@ mod config;
|
|||||||
use adw::prelude::*;
|
use adw::prelude::*;
|
||||||
use adw::*;
|
use adw::*;
|
||||||
use gdk::Display;
|
use gdk::Display;
|
||||||
use glib::*;
|
|
||||||
/// Use all gtk4 libraries (gtk4 -> gtk because cargo)
|
/// Use all gtk4 libraries (gtk4 -> gtk because cargo)
|
||||||
/// Use all libadwaita libraries (libadwaita -> adw because cargo)
|
/// Use all libadwaita libraries (libadwaita -> adw because cargo)
|
||||||
use gtk::prelude::*;
|
|
||||||
use gtk::*;
|
use gtk::*;
|
||||||
|
|
||||||
use gettextrs::{gettext, LocaleCategory};
|
use gettextrs::{gettext, LocaleCategory};
|
||||||
@ -18,8 +16,6 @@ mod build_ui;
|
|||||||
use crate::build_ui::build_ui;
|
use crate::build_ui::build_ui;
|
||||||
mod save_window_size;
|
mod save_window_size;
|
||||||
use crate::save_window_size::save_window_size;
|
use crate::save_window_size::save_window_size;
|
||||||
mod connection_check;
|
|
||||||
use crate::connection_check::check_internet_connection;
|
|
||||||
/// first setup crates
|
/// first setup crates
|
||||||
mod first_setup;
|
mod first_setup;
|
||||||
|
|
||||||
|
@ -1,18 +1,12 @@
|
|||||||
// GTK crates
|
// GTK crates
|
||||||
use adw::prelude::*;
|
use adw::prelude::*;
|
||||||
use adw::*;
|
use adw::*;
|
||||||
use gdk::Display;
|
|
||||||
use glib::*;
|
|
||||||
/// Use all gtk4 libraries (gtk4 -> gtk because cargo)
|
|
||||||
/// Use all libadwaita libraries (libadwaita -> adw because cargo)
|
|
||||||
use gtk::prelude::*;
|
|
||||||
use gtk::*;
|
|
||||||
|
|
||||||
// Save current window size to glib
|
// Save current window size to glib
|
||||||
pub fn save_window_size(window: &adw::ApplicationWindow, glib_settings: &gio::Settings) {
|
pub fn save_window_size(window: &adw::ApplicationWindow, glib_settings: &gio::Settings) {
|
||||||
let size = window.default_size();
|
let size = window.default_size();
|
||||||
|
|
||||||
glib_settings.set_int("window-width", size.0);
|
let _ = glib_settings.set_int("window-width", size.0);
|
||||||
glib_settings.set_int("window-height", size.1);
|
let _ = glib_settings.set_int("window-height", size.1);
|
||||||
glib_settings.set_boolean("is-maximized", window.is_maximized());
|
let _ = glib_settings.set_boolean("is-maximized", window.is_maximized());
|
||||||
}
|
}
|
||||||
|
@ -1 +1 @@
|
|||||||
{"rustc_fingerprint":16368633458058699409,"outputs":{"4614504638168534921":{"success":true,"status":"","code":0,"stdout":"rustc 1.75.0 (82e1608df 2023-12-21)\nbinary: rustc\ncommit-hash: 82e1608dfa6e0b5569232559e3d385fea5a93112\ncommit-date: 2023-12-21\nhost: x86_64-unknown-linux-gnu\nrelease: 1.75.0\nLLVM version: 17.0.6\n","stderr":""},"14371922958718593042":{"success":true,"status":"","code":0,"stdout":"___\nlib___.rlib\nlib___.so\nlib___.so\nlib___.a\nlib___.so\n/home/ward/.rustup/toolchains/stable-x86_64-unknown-linux-gnu\noff\npacked\nunpacked\n___\ndebug_assertions\noverflow_checks\npanic=\"unwind\"\nproc_macro\nrelocation_model=\"pic\"\ntarget_abi=\"\"\ntarget_arch=\"x86_64\"\ntarget_endian=\"little\"\ntarget_env=\"gnu\"\ntarget_family=\"unix\"\ntarget_feature=\"fxsr\"\ntarget_feature=\"sse\"\ntarget_feature=\"sse2\"\ntarget_has_atomic\ntarget_has_atomic=\"16\"\ntarget_has_atomic=\"32\"\ntarget_has_atomic=\"64\"\ntarget_has_atomic=\"8\"\ntarget_has_atomic=\"ptr\"\ntarget_has_atomic_equal_alignment=\"16\"\ntarget_has_atomic_equal_alignment=\"32\"\ntarget_has_atomic_equal_alignment=\"64\"\ntarget_has_atomic_equal_alignment=\"8\"\ntarget_has_atomic_equal_alignment=\"ptr\"\ntarget_has_atomic_load_store\ntarget_has_atomic_load_store=\"16\"\ntarget_has_atomic_load_store=\"32\"\ntarget_has_atomic_load_store=\"64\"\ntarget_has_atomic_load_store=\"8\"\ntarget_has_atomic_load_store=\"ptr\"\ntarget_os=\"linux\"\ntarget_pointer_width=\"64\"\ntarget_thread_local\ntarget_vendor=\"unknown\"\nunix\n","stderr":""}},"successes":{}}
|
{"rustc_fingerprint":11104695642277176061,"outputs":{"4614504638168534921":{"success":true,"status":"","code":0,"stdout":"rustc 1.75.0 (82e1608df 2023-12-21)\nbinary: rustc\ncommit-hash: 82e1608dfa6e0b5569232559e3d385fea5a93112\ncommit-date: 2023-12-21\nhost: x86_64-unknown-linux-gnu\nrelease: 1.75.0\nLLVM version: 17.0.6\n","stderr":""},"15729799797837862367":{"success":true,"status":"","code":0,"stdout":"___\nlib___.rlib\nlib___.so\nlib___.so\nlib___.a\nlib___.so\n/home/ward/.rustup/toolchains/stable-x86_64-unknown-linux-gnu\noff\npacked\nunpacked\n___\ndebug_assertions\npanic=\"unwind\"\nproc_macro\ntarget_arch=\"x86_64\"\ntarget_endian=\"little\"\ntarget_env=\"gnu\"\ntarget_family=\"unix\"\ntarget_feature=\"fxsr\"\ntarget_feature=\"sse\"\ntarget_feature=\"sse2\"\ntarget_has_atomic=\"16\"\ntarget_has_atomic=\"32\"\ntarget_has_atomic=\"64\"\ntarget_has_atomic=\"8\"\ntarget_has_atomic=\"ptr\"\ntarget_os=\"linux\"\ntarget_pointer_width=\"64\"\ntarget_vendor=\"unknown\"\nunix\n","stderr":""}},"successes":{}}
|
Loading…
Reference in New Issue
Block a user