From ace7ea48bcf01658319a734cb0b53c4d1389c190 Mon Sep 17 00:00:00 2001 From: GitButler Date: Mon, 22 Jul 2024 15:46:42 +0200 Subject: [PATCH 1/2] GitButler Integration Commit This is an integration commit for the virtual branches that GitButler is tracking. Due to GitButler managing multiple virtual branches, you cannot switch back and forth between git branches and virtual branches easily. If you switch to another branch, GitButler will need to be reinitialized. If you commit on this branch, GitButler will throw it away. Here are the branches that are currently applied: For more information about what we're doing here, check out our docs: https://docs.gitbutler.com/features/virtual-branches/integration-branch From 09f6a2c40f0229dd5002efffd0ce41bd2c8d018f Mon Sep 17 00:00:00 2001 From: pandadev <70103896+0PandaDEV@users.noreply.github.com> Date: Fri, 26 Jul 2024 11:36:38 +0200 Subject: [PATCH 2/2] removed default shortcuts --- src-tauri/Cargo.lock | 11 +++++++++++ src-tauri/Cargo.toml | 1 + src-tauri/src/main.rs | 13 +++++++++++-- 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index 5feb27f..5403412 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -3558,6 +3558,7 @@ dependencies = [ "tauri-plugin-clipboard-manager", "tauri-plugin-dialog", "tauri-plugin-os", + "tauri-plugin-prevent-default", "tauri-plugin-sql", "tauri-plugin-updater", "tokio", @@ -5156,6 +5157,16 @@ dependencies = [ "thiserror", ] +[[package]] +name = "tauri-plugin-prevent-default" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38be0ac8fcc5fa03422409fc506015b01dc29cc8a3a72572c68d41e6f10f4491" +dependencies = [ + "bitflags 2.6.0", + "tauri", +] + [[package]] name = "tauri-plugin-sql" version = "2.0.0-beta.8" diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index 789e13b..f3177fc 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -17,6 +17,7 @@ tauri-plugin-autostart = "2.0.0-beta.8" tauri-plugin-os = "2.0.0-beta.7" tauri-plugin-updater = "2.0.0-beta.10" tauri-plugin-dialog = "2.0.0-beta.11" +tauri-plugin-prevent-default = "0.1" sqlx = { version = "0.7.4", features = ["runtime-tokio-native-tls", "sqlite"] } serde = { version = "1.0", features = ["derive"] } tokio = { version = "1.0", features = ["full"] } diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index 3c55b8d..b5b4d8d 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -12,6 +12,7 @@ mod updater; use tauri::Manager; use tauri::PhysicalPosition; use tauri_plugin_autostart::MacosLauncher; +use tauri_plugin_prevent_default::Flags; pub fn center_window_on_current_monitor(window: &tauri::WebviewWindow) { if let Some(monitor) = window.available_monitors().unwrap().iter().find(|m| { @@ -53,6 +54,11 @@ fn main() { MacosLauncher::LaunchAgent, Some(vec![]), )) + .plugin( + tauri_plugin_prevent_default::Builder::new() + .with_flags(Flags::all().difference(Flags::CONTEXT_MENU)) + .build(), + ) .setup(|app| { let app_handle = app.handle().clone(); @@ -73,7 +79,10 @@ fn main() { window.close_devtools(); } - let app_data_dir = app.path().app_data_dir().expect("Failed to get app data directory"); + let app_data_dir = app + .path() + .app_data_dir() + .expect("Failed to get app data directory"); clipboard::set_app_data_dir(app_data_dir); tauri::async_runtime::spawn(async move { @@ -98,4 +107,4 @@ fn main() { ]) .run(tauri::generate_context!()) .expect("error while running tauri application"); -} \ No newline at end of file +}