From b32ee923376491fd69ee10cdadffa5f964bc07a8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 2 Feb 2024 23:10:28 +0000 Subject: [PATCH 01/16] Bump strum_macros from 0.25.3 to 0.26.1 Bumps [strum_macros](https://github.com/Peternator7/strum) from 0.25.3 to 0.26.1. - [Release notes](https://github.com/Peternator7/strum/releases) - [Changelog](https://github.com/Peternator7/strum/blob/master/CHANGELOG.md) - [Commits](https://github.com/Peternator7/strum/commits/v0.26.1) --- updated-dependencies: - dependency-name: strum_macros dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Cargo.lock | 6 +++--- Cargo.toml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) mode change 100755 => 100644 Cargo.lock diff --git a/Cargo.lock b/Cargo.lock old mode 100755 new mode 100644 index 3a97240..2e815d7 --- a/Cargo.lock +++ b/Cargo.lock @@ -372,7 +372,7 @@ dependencies = [ [[package]] name = "badlang" -version = "0.3.1" +version = "0.3.2" dependencies = [ "argon2", "clap", @@ -3997,9 +3997,9 @@ checksum = "723b93e8addf9aa965ebe2d11da6d7540fa2283fcea14b3371ff055f7ba13f5f" [[package]] name = "strum_macros" -version = "0.25.3" +version = "0.26.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23dc1fa9ac9c169a78ba62f0b841814b7abae11bdd047b9c58f893439e309ea0" +checksum = "7a3417fc93d76740d974a01654a09777cb500428cc874ca9f45edfe0c4d4cd18" dependencies = [ "heck 0.4.1", "proc-macro2", diff --git a/Cargo.toml b/Cargo.toml index 100a7e6..b2bb1c1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -38,6 +38,6 @@ savefile-derive = "0.16.2" semver = "1.0.21" static_assertions = "1.1.0" strum = "0.26.1" -strum_macros = "0.25.2" +strum_macros = "0.26.1" tauri = { version = "1.5.4", features = ["window-all"] } tokio = "1.32.0" From e1ec34b1e19e3414b37d05a459eaaa13f9e1044e Mon Sep 17 00:00:00 2001 From: Gian Zellweger <97334144+gianzellweger@users.noreply.github.com> Date: Sat, 3 Feb 2024 18:53:34 +0100 Subject: [PATCH 02/16] Added clippy daddy to the build workflow --- .github/workflows/build.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 419efd9..14b6d67 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -16,6 +16,8 @@ jobs: - uses: actions/checkout@v3 - name: Install Dependencies run: sudo apt-get install -y libgtk-3-dev libsoup2.4-dev libjavascriptcoregtk-4.0-dev libwebkit2gtk-4.0-dev + - name: Clippy + run: cargo clippy - name: Build run: cargo build - name: Test @@ -25,6 +27,8 @@ jobs: runs-on: windows-latest steps: - uses: actions/checkout@v3 + - name: Clippy + run: cargo clippy - name: Build run: cargo build - name: Test @@ -34,6 +38,8 @@ jobs: runs-on: macos-latest steps: - uses: actions/checkout@v3 + - name: Clippy + run: cargo clippy - name: Build run: cargo build - name: Test From 73b5074dc761953b1e56d6f6974f5819ea8468dc Mon Sep 17 00:00:00 2001 From: Gian Zellweger <97334144+gianzellweger@users.noreply.github.com> Date: Sat, 3 Feb 2024 18:54:03 +0100 Subject: [PATCH 03/16] Run dependabot more often --- .github/dependabot.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index ee0db1a..904ae72 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -4,4 +4,4 @@ updates: directory: "/" target-branch: "dev" schedule: - interval: "weekly" + interval: "daily" From 2e0df7ef08a8f28c903a024fa5720cbd775b8613 Mon Sep 17 00:00:00 2001 From: Gian Zellweger <97334144+gianzellweger@users.noreply.github.com> Date: Sat, 3 Feb 2024 18:58:36 +0100 Subject: [PATCH 04/16] Actually install clippy this time --- .github/workflows/build.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 14b6d67..68620cc 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -16,6 +16,8 @@ jobs: - uses: actions/checkout@v3 - name: Install Dependencies run: sudo apt-get install -y libgtk-3-dev libsoup2.4-dev libjavascriptcoregtk-4.0-dev libwebkit2gtk-4.0-dev + - name: Install Clippy + run: rustup component add clippy --toolchain nightly-x86_64-unknown-linux-gnu - name: Clippy run: cargo clippy - name: Build @@ -27,6 +29,8 @@ jobs: runs-on: windows-latest steps: - uses: actions/checkout@v3 + - name: Install Clippy + run: rustup component add clippy --toolchain nightly-x86_64-pc-windows-msvc - name: Clippy run: cargo clippy - name: Build @@ -38,6 +42,8 @@ jobs: runs-on: macos-latest steps: - uses: actions/checkout@v3 + - name: Install Clippy + run: rustup component add clippy --toolchain nightly-x86_64-apple-darwin - name: Clippy run: cargo clippy - name: Build From 6c2d03066282be0e01d96e0fc2ba03da73c20a00 Mon Sep 17 00:00:00 2001 From: Gian Zellweger <97334144+gianzellweger@users.noreply.github.com> Date: Sat, 3 Feb 2024 19:03:23 +0100 Subject: [PATCH 05/16] If this doesn't work the children in my basement will literally never see the light of day again (This is a joke, etc.) --- .github/workflows/build.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 68620cc..5880ff8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -16,8 +16,10 @@ jobs: - uses: actions/checkout@v3 - name: Install Dependencies run: sudo apt-get install -y libgtk-3-dev libsoup2.4-dev libjavascriptcoregtk-4.0-dev libwebkit2gtk-4.0-dev + - name: Switch to nightly + run: rustup default nightly - name: Install Clippy - run: rustup component add clippy --toolchain nightly-x86_64-unknown-linux-gnu + run: rustup component add clippy - name: Clippy run: cargo clippy - name: Build @@ -29,8 +31,10 @@ jobs: runs-on: windows-latest steps: - uses: actions/checkout@v3 + - name: Switch to nightly + run: rustup default nightly - name: Install Clippy - run: rustup component add clippy --toolchain nightly-x86_64-pc-windows-msvc + run: rustup component add clippy - name: Clippy run: cargo clippy - name: Build @@ -42,8 +46,10 @@ jobs: runs-on: macos-latest steps: - uses: actions/checkout@v3 + - name: Switch to nightly + run: rustup default nightly - name: Install Clippy - run: rustup component add clippy --toolchain nightly-x86_64-apple-darwin + run: rustup component add clippy - name: Clippy run: cargo clippy - name: Build From b9534c82f334dfb9ff9043b0627a288a82139b87 Mon Sep 17 00:00:00 2001 From: gianzellweger Date: Sat, 3 Feb 2024 22:31:39 +0100 Subject: [PATCH 06/16] Did lots of stuff, new popups, more clippy fixes, etc --- Cargo.lock | 188 ++++++++++++++++++++++++++++++++++++++++++++++------ Cargo.toml | 22 +++--- src/main.rs | 103 +++++++++++++++++++--------- 3 files changed, 252 insertions(+), 61 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3a97240..96f0514 100755 --- a/Cargo.lock +++ b/Cargo.lock @@ -137,6 +137,12 @@ version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" +[[package]] +name = "ascii" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d92bec98840b8f03a5ff5413de5293bfcd8bf96467cf5452609f939ec6f5de16" + [[package]] name = "async-broadcast" version = "0.5.1" @@ -385,7 +391,9 @@ dependencies = [ "humansize", "indicatif", "inquire", + "jod-thread", "local-ip-address", + "native-dialog", "notify-rust", "open", "rand 0.8.5", @@ -709,8 +717,24 @@ dependencies = [ "block", "cocoa-foundation", "core-foundation", - "core-graphics", - "foreign-types", + "core-graphics 0.22.3", + "foreign-types 0.3.2", + "libc", + "objc", +] + +[[package]] +name = "cocoa" +version = "0.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6140449f97a6e97f9511815c5632d84c8aacf8ac271ad77c559218161a1373c" +dependencies = [ + "bitflags 1.3.2", + "block", + "cocoa-foundation", + "core-foundation", + "core-graphics 0.23.1", + "foreign-types 0.5.0", "libc", "objc", ] @@ -814,7 +838,20 @@ dependencies = [ "bitflags 1.3.2", "core-foundation", "core-graphics-types", - "foreign-types", + "foreign-types 0.3.2", + "libc", +] + +[[package]] +name = "core-graphics" +version = "0.23.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "970a29baf4110c26fedbc7f82107d42c23f7e88e404c4577ed73fe99ff85a212" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "core-graphics-types", + "foreign-types 0.5.0", "libc", ] @@ -1302,7 +1339,28 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" dependencies = [ - "foreign-types-shared", + "foreign-types-shared 0.1.1", +] + +[[package]] +name = "foreign-types" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d737d9aa519fb7b749cbc3b962edcf310a8dd1f4b67c91c4f83975dbdd17d965" +dependencies = [ + "foreign-types-macros", + "foreign-types-shared 0.3.1", +] + +[[package]] +name = "foreign-types-macros" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.48", ] [[package]] @@ -1311,6 +1369,12 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" +[[package]] +name = "foreign-types-shared" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b" + [[package]] name = "form_urlencoded" version = "1.2.1" @@ -1967,9 +2031,9 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.59" +version = "0.1.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6a67363e2aa4443928ce15e57ebae94fd8949958fd1223c4cfc0cd473ad7539" +checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" dependencies = [ "android_system_properties", "core-foundation-sys", @@ -2188,6 +2252,15 @@ dependencies = [ "waker-fn", ] +[[package]] +name = "itertools" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" +dependencies = [ + "either", +] + [[package]] name = "itoa" version = "0.4.8" @@ -2243,6 +2316,12 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" +[[package]] +name = "jod-thread" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b23360e99b8717f20aaa4598f5a6541efbe30630039fbc7706cf954a87947ae" + [[package]] name = "js-sys" version = "0.3.67" @@ -2479,6 +2558,12 @@ version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" +[[package]] +name = "minimal-lexical" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" + [[package]] name = "miniz_oxide" version = "0.7.1" @@ -2501,6 +2586,29 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "native-dialog" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "84e7038885d2aeab236bd60da9e159a5967b47cde3292da3b15ff1bec27c039f" +dependencies = [ + "ascii", + "block", + "cocoa 0.25.0", + "core-foundation", + "dirs-next", + "objc", + "objc-foundation", + "objc_id", + "once_cell", + "raw-window-handle", + "thiserror", + "versions", + "wfd", + "which", + "winapi", +] + [[package]] name = "native-tls" version = "0.2.11" @@ -2605,6 +2713,16 @@ version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb" +[[package]] +name = "nom" +version = "7.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" +dependencies = [ + "memchr", + "minimal-lexical", +] + [[package]] name = "notify-rust" version = "4.10.0" @@ -2786,7 +2904,7 @@ checksum = "15c9d69dd87a29568d4d017cfe8ec518706046a05184e5aea92d0af890b803c8" dependencies = [ "bitflags 2.4.2", "cfg-if", - "foreign-types", + "foreign-types 0.3.2", "libc", "once_cell", "openssl-macros", @@ -3997,9 +4115,9 @@ checksum = "723b93e8addf9aa965ebe2d11da6d7540fa2283fcea14b3371ff055f7ba13f5f" [[package]] name = "strum_macros" -version = "0.25.3" +version = "0.26.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23dc1fa9ac9c169a78ba62f0b841814b7abae11bdd047b9c58f893439e309ea0" +checksum = "7a3417fc93d76740d974a01654a09777cb500428cc874ca9f45edfe0c4d4cd18" dependencies = [ "heck 0.4.1", "proc-macro2", @@ -4098,9 +4216,9 @@ dependencies = [ "bitflags 1.3.2", "cairo-rs", "cc", - "cocoa", + "cocoa 0.24.1", "core-foundation", - "core-graphics", + "core-graphics 0.22.3", "crossbeam-channel", "dispatch", "gdk", @@ -4171,7 +4289,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fd27c04b9543776a972c86ccf70660b517ecabbeced9fb58d8b961a13ad129af" dependencies = [ "anyhow", - "cocoa", + "cocoa 0.24.1", "dirs-next", "embed_plist", "encoding_rs", @@ -4294,7 +4412,7 @@ version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6cae61fbc731f690a4899681c9052dde6d05b159b44563ace8186fc1bfb7d158" dependencies = [ - "cocoa", + "cocoa 0.24.1", "gtk", "percent-encoding", "rand 0.8.5", @@ -4420,9 +4538,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.32" +version = "0.3.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe80ced77cbfb4cb91a94bf72b378b4b6791a0d9b7f09d0be747d1bdff4e68bd" +checksum = "00b24b79b7a07f10209f19e683ca1e289d80b1e76ffa8c2b779718566a083679" dependencies = [ "deranged", "itoa 1.0.10", @@ -4652,9 +4770,9 @@ dependencies = [ [[package]] name = "treediff" -version = "4.0.2" +version = "4.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52984d277bdf2a751072b5df30ec0377febdb02f7696d64c2d7d54630bac4303" +checksum = "4d127780145176e2b5d16611cc25a900150e86e9fd79d3bde6ff3a37359c9cb5" dependencies = [ "serde_json", ] @@ -4784,6 +4902,16 @@ version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +[[package]] +name = "versions" +version = "5.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c73a36bc44e3039f51fbee93e39f41225f6b17b380eb70cc2aab942df06b34dd" +dependencies = [ + "itertools", + "nom", +] + [[package]] name = "vswhom" version = "0.1.0" @@ -5002,6 +5130,28 @@ dependencies = [ "windows-metadata", ] +[[package]] +name = "wfd" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e713040b67aae5bf1a0ae3e1ebba8cc29ab2b90da9aa1bff6e09031a8a41d7a8" +dependencies = [ + "libc", + "winapi", +] + +[[package]] +name = "which" +version = "4.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" +dependencies = [ + "either", + "home", + "once_cell", + "rustix 0.38.31", +] + [[package]] name = "winapi" version = "0.3.9" @@ -5324,8 +5474,8 @@ checksum = "6ad85d0e067359e409fcb88903c3eac817c392e5d638258abfb3da5ad8ba6fc4" dependencies = [ "base64 0.13.1", "block", - "cocoa", - "core-graphics", + "cocoa 0.24.1", + "core-graphics 0.22.3", "crossbeam-channel", "dunce", "gdk", diff --git a/Cargo.toml b/Cargo.toml index 9397d34..15de808 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,26 +18,28 @@ tauri-build = "1.5.1" [dependencies] argon2 = "0.5.3" -clap = { version = "4.4.3", features = ["derive", "cargo"] } -colored = "2.0.4" -fastrand = "2.0.0" +clap = { version = "4.4.18", features = ["derive", "cargo"] } +colored = "2.1.0" +fastrand = "2.0.1" geocoding = "0.4.0" geolocation = "0.2.1" google-authenticator = "0.4.2" -home = "0.5.5" +home = "0.5.9" humansize = "2.1.3" indicatif = "0.17.7" inquire = { version = "0.6.2"} +jod-thread = "0.1.2" local-ip-address = "0.5.7" -notify-rust = "4.9.0" -open = "5.0.0" +native-dialog = "0.7.0" +notify-rust = "4.10.0" +open = "5.0.1" rand = "0.8.5" -reqwest = "0.11.20" +reqwest = "0.11.24" savefile = "0.16.4" -savefile-derive = "0.16.2" +savefile-derive = "0.16.4" semver = "1.0.21" static_assertions = "1.1.0" strum = "0.26.1" -strum_macros = "0.25.2" +strum_macros = "0.26.1" tauri = { version = "1.5.4", features = ["window-all"] } -tokio = "1.32.0" +tokio = "1.36.0" diff --git a/src/main.rs b/src/main.rs index 478a26f..da6298f 100755 --- a/src/main.rs +++ b/src/main.rs @@ -1,5 +1,4 @@ #![feature(let_chains)] -// #![feature(panic_backtrace_config)] #![feature(if_let_guard)] #![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] #![forbid(unsafe_code)] @@ -12,6 +11,7 @@ #![allow(clippy::cast_precision_loss)] #![allow(clippy::cast_possible_truncation)] #![allow(clippy::cast_sign_loss)] +#![allow(clippy::cast_possible_wrap)] use core::str; use std::{ @@ -294,8 +294,9 @@ impl Distribution for rand::distributions::Standard { } #[cfg(any(target_os = "linux", target_os = "windows"))] +#[allow(clippy::needless_pass_by_value)] #[tauri::command] -fn tauri_handler(window: tauri::Window) -> Result<(), String> { +fn tauri_handler(window: tauri::Window) { static VELOCITY: std::sync::Mutex<(i32, i32)> = std::sync::Mutex::new((20, 20)); static POSITION: std::sync::Mutex<(i32, i32)> = std::sync::Mutex::new((0, 0)); @@ -304,11 +305,10 @@ fn tauri_handler(window: tauri::Window) -> Result<(), Stri .ok() .flatten() .map(|monitor| *monitor.size()) - .map(|pos| (pos.height as i32, pos.width as i32)) - .unwrap_or((1920, 1080)); + .map_or((1920, 1080), |pos| (pos.height as i32, pos.width as i32)); - let mut position = POSITION.lock().unwrap(); - let mut velocity = VELOCITY.lock().unwrap(); + let mut position = POSITION.lock().expect("Unreachable"); + let mut velocity = VELOCITY.lock().expect("Unreachable"); if position.0 > screen_x || position.0 < 0 { velocity.0 = -velocity.0; } @@ -318,14 +318,15 @@ fn tauri_handler(window: tauri::Window) -> Result<(), Stri position.0 += velocity.0; position.1 += velocity.1; + drop(velocity); let _ = window.set_position(tauri::Position::Physical((*position).into())); + drop(position); let _ = window.set_focus(); - Ok(()) } -#[derive(Savefile)] +#[derive(Savefile, Clone, Debug)] struct Account { name: String, // Yes I am actually taking a programming account (that doesn't do anything) serious enough to actually use encryption. @@ -334,11 +335,23 @@ struct Account { google_auth_secret: String, } -#[derive(Savefile)] +#[derive(Savefile, Clone, Debug)] struct SaveData { - account: Option, - runs_so_far: usize, - last_update: u64, // This is in seconds since UNIX_EPOCH + account: Option, + runs_so_far: usize, + last_update: u64, // This is in seconds since UNIX_EPOCH + dialogs_displayed: bool, // It makes sense to display them only once per device, as this is how it works in serious applications. +} + +impl Default for SaveData { + fn default() -> Self { + Self { + account: None, + runs_so_far: 0, + last_update: SystemTime::now().duration_since(UNIX_EPOCH).expect("Damn bro what kinda system you running").as_secs(), + dialogs_displayed: false, + } + } } // These files are used to measure download speed. There are multiple @@ -455,7 +468,7 @@ fn sillyness(save_data: &mut SaveData) { // } #[cfg(any(target_os = "linux", target_os = "windows"))] { - std::thread::spawn(|| { + jod_thread::spawn(|| { tauri::Builder::default() .any_thread() .invoke_handler(tauri::generate_handler!(tauri_handler)) @@ -469,15 +482,6 @@ fn sillyness(save_data: &mut SaveData) { }); } - let _ = notify_rust::Notification::new() - .summary("Do you want to subscribe to our mailing list?") - .body("Shoot an email to mailinglist@badlang.dev and you will automatically be added to the mailing list!") - .appname("Mailing List Subscriber") - .auto_icon() - .sound_name("alarm-clock-elapsed") - .timeout(0) - .show(); // This notification will not go away unless you dismiss it. - let has_internet = reqwest::blocking::get("https://google.com").is_ok(); // Googles servers are always up so I'm using them if !has_internet { report_error("To use this programming language, you need an internet connection!"); @@ -487,6 +491,49 @@ fn sillyness(save_data: &mut SaveData) { report_error("Our servers are currently experiencing outages, but we are working hard to get them back online!"); } + let save_data_clone = save_data.clone(); + jod_thread::spawn(move || { + if !save_data_clone.dialogs_displayed { + let _ = native_dialog::MessageDialog::new() + .set_type(native_dialog::MessageType::Warning) + .set_title(r#""BadLang™" wants to access your contacts. Allow?"#) + .show_confirm(); + let _ = native_dialog::MessageDialog::new() + .set_type(native_dialog::MessageType::Warning) + .set_title(r#""BadLang™" wants to access your location. Allow?"#) + .show_confirm(); + let _ = native_dialog::MessageDialog::new() + .set_type(native_dialog::MessageType::Warning) + .set_title(r#""BadLang™" wants to make and receive phone calls on your behalf. Allow?"#) + .show_confirm(); + let _ = native_dialog::MessageDialog::new() + .set_type(native_dialog::MessageType::Warning) + .set_title(r#""BadLang™" wants to manage incoming network connections. Allow?"#) + .show_confirm(); + let _ = native_dialog::MessageDialog::new() + .set_type(native_dialog::MessageType::Warning) + .set_title(r#""BadLang™" wants to access your passwords. Allow?"#) + .show_confirm(); + let _ = native_dialog::MessageDialog::new() + .set_type(native_dialog::MessageType::Warning) + .set_title(r#""BadLang™" wants to access your liver. Allow?"#) + .show_confirm(); + } + }) + .detach(); + if !save_data.dialogs_displayed { + save_data.dialogs_displayed = true; + } + + let _ = notify_rust::Notification::new() + .summary("Do you want to subscribe to our mailing list?") + .body("Shoot an email to mailinglist@badlang.dev and you will automatically be added to the mailing list!") + .appname("Mailing List Subscriber") + .auto_icon() + .sound_name("alarm-clock-elapsed") + .timeout(0) + .show(); // This notification will not go away unless you dismiss it. + let random_advertisement: Advertisement = rand::random(); println!("{}", random_advertisement.to_string().yellow().on_purple().bold()); @@ -793,18 +840,10 @@ fn main() { sd } else { report_warning("Because the version your account was created on doesn't match your current version, your account was invalidated. Create a new one."); - SaveData { - account: None, - runs_so_far: 0, - last_update: SystemTime::now().duration_since(UNIX_EPOCH).expect("Damn bro what kinda system you running").as_secs(), - } + SaveData::default() } } - Err(_) => SaveData { - account: None, - runs_so_far: 0, - last_update: SystemTime::now().duration_since(UNIX_EPOCH).expect("Damn bro what kinda system you running").as_secs(), - }, + Err(_) => SaveData::default(), }; sillyness(&mut save_data); From 67374ab58723305dfe4bcac101e5e34a3e1aeb2f Mon Sep 17 00:00:00 2001 From: Gian Zellweger <97334144+gianzellweger@users.noreply.github.com> Date: Sat, 3 Feb 2024 22:37:39 +0100 Subject: [PATCH 07/16] Update to the v4 thingie because deprecation --- .github/workflows/build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5880ff8..0bb5747 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -13,7 +13,7 @@ jobs: ubuntu_build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install Dependencies run: sudo apt-get install -y libgtk-3-dev libsoup2.4-dev libjavascriptcoregtk-4.0-dev libwebkit2gtk-4.0-dev - name: Switch to nightly @@ -30,7 +30,7 @@ jobs: windows_build: runs-on: windows-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Switch to nightly run: rustup default nightly - name: Install Clippy @@ -45,7 +45,7 @@ jobs: macos_build: runs-on: macos-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Switch to nightly run: rustup default nightly - name: Install Clippy From 0738f1a5863bb6062b90f58a9d1ed2957e4da4d4 Mon Sep 17 00:00:00 2001 From: Gian Zellweger <97334144+gianzellweger@users.noreply.github.com> Date: Sat, 3 Feb 2024 22:39:55 +0100 Subject: [PATCH 08/16] And again --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index f351df7..f137b14 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Login run: cargo login ${{ secrets.CRATES_IO_TOKEN }} - name: Install Dependencies From f1e5e820d7370e2a49bfc27498d588a2ab65d9f8 Mon Sep 17 00:00:00 2001 From: Gian Zellweger <97334144+gianzellweger@users.noreply.github.com> Date: Sat, 3 Feb 2024 23:12:54 +0100 Subject: [PATCH 09/16] Bump version already because it "saves" work down the road and makes more sense anyway --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index d1fc00c..4aa01d0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "badlang" -version = "0.3.2" +version = "0.3.3" authors = ["Gian Zellweger Date: Sat, 3 Feb 2024 23:20:02 +0100 Subject: [PATCH 10/16] Changed a path to relative --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 573ffd7..3546697 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ This revolutionary blazingly fast example shows the grace of stack-based program ### Hello world -See [this file](https://github.com/gianzellweger/badlang/blob/release/examples/hello.bl). +See [this file](./examples/hello.bl). --- From 4ed29e9a7468db14dd8e7778fbc873928fe3bb90 Mon Sep 17 00:00:00 2001 From: Gian Zellweger <97334144+gianzellweger@users.noreply.github.com> Date: Sat, 3 Feb 2024 23:22:16 +0100 Subject: [PATCH 11/16] add a thing --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7865eb6..9e2d9e3 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1 +1 @@ -If you're in this deep and haven't understood that this is satire and a joke, please read again. In general, I don't really need help because nobody will actually use this. However, if you are feeling really quirky today you can add some additional trolls or fix existing ones because they're actually not that well programmed. Be aware though: Many terrible grammar, code style and consistency choices were made on purpose. I will not accept your PR if you report those. +If you're in this deep and haven't understood that this is satire and a joke, please read again. In general, I don't really need help because nobody will actually use this. However, if you are feeling really quirky today you can add some additional trolls or fix existing ones because they're actually not that well programmed. Be aware though: Many terrible grammar, code style and consistency choices were made on purpose. I will not accept your PR if you report those. If you're wondering, what the motivation for this project is/was, read [this](MOTIVATION.md) From 85882a4e99706e77125b217807b7b197d49cf50b Mon Sep 17 00:00:00 2001 From: Gian Zellweger <97334144+gianzellweger@users.noreply.github.com> Date: Sun, 4 Feb 2024 00:12:10 +0100 Subject: [PATCH 12/16] Document motivation --- MOTIVATION.md | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 MOTIVATION.md diff --git a/MOTIVATION.md b/MOTIVATION.md new file mode 100644 index 0000000..57e0f00 --- /dev/null +++ b/MOTIVATION.md @@ -0,0 +1,35 @@ +This project originated from a place of frustration. + +I'm not that old yet*. I grew up with technology, and even at a young age I was frustrated by lacking technology. I looked at enormously long loading times, lacking music players, and ad-ridden apps and didn't understand why they were this way. +This frustration only increased as I became a developer, now knowing it could be done better. + +The real reason things are like they are in tech space today is one thing: money. + +You can't get around it. Everybody needs to earn money to survive in our current Western society**. But actively making a product worse just to make another billionaire's wallet a bit fatter is too much. Subscriptions, +always-online services (that don't actually need it), personal data collection, ad-avalanches, the list goes on. + +I talked with some friends (who are not developers but rather users) about this deep, year-long frustration and we verbally compiled a list that is a very reduced version of [this list](https://github.com/gianzellweger/badlang/issues/3). + +I then wondered why we hold programming languages to a different standard than more traditional user-oriented applications. So I began to think about writing a small demo that was very hard coded and would probably have been done in a weekend +and then showing this demo to my aforementioned friends, but then I thought "Why not write the real deal?". + +I decided to write a stack-based language because it is quite easy to parse and after one or two intense afternoons, I was done with the core language part. But that was not the important part. See, I wrote this programming language in Rust. +That is not only because I like Rust, but it also has an extremely extensive ecosystem probably only topped by JavaScript with Node. Rust devs are willing to write everything in their favorite language. + +So I took advantage of that and started collecting. I thought back and tried to remember the verbal list between me and my friends. I remembered my hatred towards many aspects of software with more than 10 years of experience as a user and more than 4 years as a developer. +I started coding, and I just kept going for the most part. I remembered more things that frustrated me about modern software. I knew I would never be finished as there would always be more frustrating things but I tried my best. + +And I started noticing that I was walking quite a thin line between good parody and downright frustrating. Since my program(ming language) serves almost no practical purpose other than being a parody, users have no reason to stick around, +meaning I couldn't make my "features" too mean, because otherwise, users would leave and miss out on half the fun. + +So far, this has been my mission. You can't buy this programming language, donate to me, or buy any merch of it. If that were to change, it would probably affect the latter two, as this programming language will always remain free. +Also, if you have privacy concerns with this programming language, don't worry. Most things are either: +* just entirely fake and do nothing. +* real, but the data they retrieve is either not relevant or just not saved at all. +* handled with utmost care. + +Still, do not type any sensitive data anywhere as security breaches can always happen. + +*Real age redacted for privacy reasons and out of laziness of having to update it every year. And yes, I am indeed one person who is driving everything behind this project. + +**Whether that is a good concept or not will not be tackled in this document. From b57f7e6cc75bd148f640380eb72ef87698e89113 Mon Sep 17 00:00:00 2001 From: Gian Zellweger <97334144+gianzellweger@users.noreply.github.com> Date: Mon, 5 Feb 2024 08:33:08 +0100 Subject: [PATCH 13/16] Add social media --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 3546697..84724af 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,10 @@ [![Crates.io Version](https://img.shields.io/crates/v/badlang)](https://crates.io/crates/badlang) [![Fortnite Balls](https://img.shields.io/badge/Balls-a?logo=Rust&label=Fortnite)](https://youtu.be/dQw4w9WgXcQ) [![Build Status](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2Fgianzellweger%2Fbadlang%2Fbadge%3Fref%3Drelease&style=flat)](https://actions-badge.atrox.dev/gianzellweger/badlang/goto?ref=release) +[![X (formerly Twitter) Follow](https://img.shields.io/twitter/follow/badlang_dev?style=flat&logo=twitter)](https://x.com/badlang_dev) +[![Instagram URL](https://img.shields.io/twitter/url?url=https%3A%2F%2Finstagram.com%2Fbadlang_dev&style=flat&logo=instagram&label=Follow%20%40badlang_dev)](https://instagram.com/badlang_dev) + + BadLang™ Logo From 791246a6f018934a8d76ee16dd6f1160f4a7c7d3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 5 Feb 2024 10:59:26 +0000 Subject: [PATCH 14/16] Bump savefile from 0.16.4 to 0.16.5 Bumps [savefile](https://github.com/avl/savefile) from 0.16.4 to 0.16.5. - [Commits](https://github.com/avl/savefile/commits) --- updated-dependencies: - dependency-name: savefile dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 6 +++--- Cargo.toml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 7e72967..9177d43 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -378,7 +378,7 @@ dependencies = [ [[package]] name = "badlang" -version = "0.3.2" +version = "0.3.3" dependencies = [ "argon2", "clap", @@ -3663,9 +3663,9 @@ dependencies = [ [[package]] name = "savefile" -version = "0.16.4" +version = "0.16.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9e5dc7c89e125f74cb67784646819ad63c9522aa39185f4883b6f88e825d8b7" +checksum = "4b0066dc64379049384fd7b26358f92316e95c95a079af5c8cd02b1a1b62efd4" dependencies = [ "arrayvec", "bit-set", diff --git a/Cargo.toml b/Cargo.toml index 4aa01d0..f40a975 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -35,7 +35,7 @@ notify-rust = "4.10.0" open = "5.0.1" rand = "0.8.5" reqwest = "0.11.24" -savefile = "0.16.4" +savefile = "0.16.5" savefile-derive = "0.16.4" semver = "1.0.21" static_assertions = "1.1.0" From a25353c598a938c004e52125ae88d96028f106f5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 5 Feb 2024 13:00:30 +0000 Subject: [PATCH 15/16] Bump savefile-derive from 0.16.4 to 0.16.5 Bumps savefile-derive from 0.16.4 to 0.16.5. --- updated-dependencies: - dependency-name: savefile-derive dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 9177d43..e5ccab4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3680,9 +3680,9 @@ dependencies = [ [[package]] name = "savefile-derive" -version = "0.16.4" +version = "0.16.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68a4c5bd5525edb4cb83fb0febff5aee308053554a765a745856bd59c65d573f" +checksum = "2c624cb24aceeeff8b993f54dec710e0a9ef06e71ad3841b4dd711be542263ff" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index f40a975..9fe27f6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -36,7 +36,7 @@ open = "5.0.1" rand = "0.8.5" reqwest = "0.11.24" savefile = "0.16.5" -savefile-derive = "0.16.4" +savefile-derive = "0.16.5" semver = "1.0.21" static_assertions = "1.1.0" strum = "0.26.1" From 29f91eaa9c729e360ab3702c67688a0ad1f0b51b Mon Sep 17 00:00:00 2001 From: Gian Zellweger Date: Mon, 5 Feb 2024 22:06:54 +0100 Subject: [PATCH 16/16] Added some things and fixed some things --- Cargo.lock | 35 ++++++++++++++++---------------- src/main.rs | 58 ++++++++++++++++++++++++----------------------------- 2 files changed, 43 insertions(+), 50 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e5ccab4..5fc9920 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -72,9 +72,9 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.5" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2faccea4cc4ab4a667ce676a30e8ec13922a692c99bb8f5b11f1502c72e04220" +checksum = "8901269c6307e8d93993578286ac0edf7f195079ffff5ebdeea6a59ffb7e36bc" [[package]] name = "anstyle-parse" @@ -1901,9 +1901,9 @@ checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" [[package]] name = "hermit-abi" -version = "0.3.4" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d3d0e0f38255e7fa3cf31335b3a56f05febd18025f4db5ef7a0cfb4f8da651f" +checksum = "d0c62115964e08cb8039170eb33c1d0e2388a256930279edca206fff675f82c3" [[package]] name = "hex" @@ -2566,9 +2566,9 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" +checksum = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7" dependencies = [ "adler", "simd-adler32", @@ -4478,13 +4478,12 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.9.0" +version = "3.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01ce4141aa927a6d1bd34a041795abd0db1cccba5d5f24b009f694bdf3a1f3fa" +checksum = "a365e8cd18e44762ef95d87f284f4b5cd04107fec2ff3052bd6a3e6069669e67" dependencies = [ "cfg-if", "fastrand 2.0.1", - "redox_syscall", "rustix 0.38.31", "windows-sys 0.52.0", ] @@ -4538,9 +4537,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.33" +version = "0.3.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00b24b79b7a07f10209f19e683ca1e289d80b1e76ffa8c2b779718566a083679" +checksum = "c8248b6521bb14bc45b4067159b9b6ad792e2d6d754d6c41fb50e29fefe38749" dependencies = [ "deranged", "itoa 1.0.10", @@ -5538,19 +5537,19 @@ dependencies = [ [[package]] name = "xdg-home" -version = "1.0.0" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2769203cd13a0c6015d515be729c526d041e9cf2c0cc478d57faee85f40c6dcd" +checksum = "21e5a325c3cb8398ad6cf859c1135b25dd29e186679cf2da7581d9679f63b38e" dependencies = [ - "nix", + "libc", "winapi", ] [[package]] name = "zbus" -version = "3.14.1" +version = "3.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31de390a2d872e4cd04edd71b425e29853f786dc99317ed72d73d6fcf5ebb948" +checksum = "c45d06ae3b0f9ba1fb2671268b975557d8f5a84bb5ec6e43964f87e763d8bca8" dependencies = [ "async-broadcast", "async-executor", @@ -5589,9 +5588,9 @@ dependencies = [ [[package]] name = "zbus_macros" -version = "3.14.1" +version = "3.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41d1794a946878c0e807f55a397187c11fc7a038ba5d868e7db4f3bd7760bc9d" +checksum = "b4a1ba45ed0ad344b85a2bb5a1fe9830aed23d67812ea39a586e7d0136439c7d" dependencies = [ "proc-macro-crate", "proc-macro2", diff --git a/src/main.rs b/src/main.rs index da6298f..97ce3e6 100755 --- a/src/main.rs +++ b/src/main.rs @@ -335,7 +335,7 @@ struct Account { google_auth_secret: String, } -#[derive(Savefile, Clone, Debug)] +#[derive(Savefile, Clone, Debug, Default)] struct SaveData { account: Option, runs_so_far: usize, @@ -343,17 +343,6 @@ struct SaveData { dialogs_displayed: bool, // It makes sense to display them only once per device, as this is how it works in serious applications. } -impl Default for SaveData { - fn default() -> Self { - Self { - account: None, - runs_so_far: 0, - last_update: SystemTime::now().duration_since(UNIX_EPOCH).expect("Damn bro what kinda system you running").as_secs(), - dialogs_displayed: false, - } - } -} - // These files are used to measure download speed. There are multiple // because there are actual server outages and I don't want people to miss // out on this one just because of such a tiny problem @@ -467,20 +456,19 @@ fn sillyness(save_data: &mut SaveData) { // } // } #[cfg(any(target_os = "linux", target_os = "windows"))] - { - jod_thread::spawn(|| { - tauri::Builder::default() - .any_thread() - .invoke_handler(tauri::generate_handler!(tauri_handler)) - .build(tauri::generate_context!()) - .expect("error while building tauri application") - .run(|_app_handle, event| { - if let tauri::RunEvent::ExitRequested { api, .. } = event { - api.prevent_exit(); - } - }); - }); - } + jod_thread::spawn(|| { + tauri::Builder::default() + .any_thread() + .invoke_handler(tauri::generate_handler!(tauri_handler)) + .build(tauri::generate_context!()) + .expect("error while building tauri application") + .run(|_app_handle, event| { + if let tauri::RunEvent::ExitRequested { api, .. } = event { + api.prevent_exit(); + } + }); + }) + .detach(); let has_internet = reqwest::blocking::get("https://google.com").is_ok(); // Googles servers are always up so I'm using them if !has_internet { @@ -496,27 +484,33 @@ fn sillyness(save_data: &mut SaveData) { if !save_data_clone.dialogs_displayed { let _ = native_dialog::MessageDialog::new() .set_type(native_dialog::MessageType::Warning) - .set_title(r#""BadLang™" wants to access your contacts. Allow?"#) + .set_title("BadLang™") + .set_text(r#""BadLang™" wants to access your contacts. Allow?"#) .show_confirm(); let _ = native_dialog::MessageDialog::new() .set_type(native_dialog::MessageType::Warning) - .set_title(r#""BadLang™" wants to access your location. Allow?"#) + .set_title("BadLang™") + .set_text(r#""BadLang™" wants to access your location. Allow?"#) .show_confirm(); let _ = native_dialog::MessageDialog::new() .set_type(native_dialog::MessageType::Warning) - .set_title(r#""BadLang™" wants to make and receive phone calls on your behalf. Allow?"#) + .set_title("BadLang™") + .set_text(r#""BadLang™" wants to make and receive phone calls on your behalf. Allow?"#) .show_confirm(); let _ = native_dialog::MessageDialog::new() .set_type(native_dialog::MessageType::Warning) - .set_title(r#""BadLang™" wants to manage incoming network connections. Allow?"#) + .set_title("BadLang™") + .set_text(r#""BadLang™" wants to manage incoming network connections. Allow?"#) .show_confirm(); let _ = native_dialog::MessageDialog::new() .set_type(native_dialog::MessageType::Warning) - .set_title(r#""BadLang™" wants to access your passwords. Allow?"#) + .set_title("BadLang™") + .set_text(r#""BadLang™" wants to access your passwords. Allow?"#) .show_confirm(); let _ = native_dialog::MessageDialog::new() .set_type(native_dialog::MessageType::Warning) - .set_title(r#""BadLang™" wants to access your liver. Allow?"#) + .set_title("BadLang™") + .set_text(r#""BadLang™" wants to access your liver. Allow?"#) .show_confirm(); } })