diff --git a/crates/tauri-cli/config.schema.json b/crates/tauri-cli/config.schema.json index b0c57ae85032..83e3f88a3d0e 100644 --- a/crates/tauri-cli/config.schema.json +++ b/crates/tauri-cli/config.schema.json @@ -1864,7 +1864,7 @@ "type": "boolean" }, "menuOnLeftClick": { - "description": "A Boolean value that determines whether the menu should appear when the tray icon receives a left click.\n\n ## Platform-specific:\n\n - **Linux**: Unsupported.", + "description": "**No longer works since v2.2, use [`Self::show_menu_on_left_click`] instead**\n\n A Boolean value that determines whether the menu should appear when the tray icon receives a left click.\n\n ## Platform-specific:\n\n - **Linux**: Unsupported.", "default": true, "deprecated": true, "type": "boolean" diff --git a/crates/tauri-schema-generator/schemas/config.schema.json b/crates/tauri-schema-generator/schemas/config.schema.json index b0c57ae85032..83e3f88a3d0e 100644 --- a/crates/tauri-schema-generator/schemas/config.schema.json +++ b/crates/tauri-schema-generator/schemas/config.schema.json @@ -1864,7 +1864,7 @@ "type": "boolean" }, "menuOnLeftClick": { - "description": "A Boolean value that determines whether the menu should appear when the tray icon receives a left click.\n\n ## Platform-specific:\n\n - **Linux**: Unsupported.", + "description": "**No longer works since v2.2, use [`Self::show_menu_on_left_click`] instead**\n\n A Boolean value that determines whether the menu should appear when the tray icon receives a left click.\n\n ## Platform-specific:\n\n - **Linux**: Unsupported.", "default": true, "deprecated": true, "type": "boolean" diff --git a/crates/tauri-utils/src/config.rs b/crates/tauri-utils/src/config.rs index 29843a2ae53c..d464af84e874 100644 --- a/crates/tauri-utils/src/config.rs +++ b/crates/tauri-utils/src/config.rs @@ -3153,13 +3153,18 @@ pub struct TrayIconConfig { /// A Boolean value that determines whether the image represents a [template](https://developer.apple.com/documentation/appkit/nsimage/1520017-template?language=objc) image on macOS. #[serde(default, alias = "icon-as-template")] pub icon_as_template: bool, + /// **No longer works since v2.2, use [`Self::show_menu_on_left_click`] instead** + /// /// A Boolean value that determines whether the menu should appear when the tray icon receives a left click. /// /// ## Platform-specific: /// /// - **Linux**: Unsupported. #[serde(default = "default_true", alias = "menu-on-left-click")] - #[deprecated(since = "2.2.0", note = "Use `show_menu_on_left_click` instead.")] + #[deprecated( + since = "2.2.0", + note = "No longer works, use `show_menu_on_left_click` instead." + )] pub menu_on_left_click: bool, /// A Boolean value that determines whether the menu should appear when the tray icon receives a left click. /// diff --git a/crates/tauri/src/app.rs b/crates/tauri/src/app.rs index a0c8a125f259..27f2131dba59 100644 --- a/crates/tauri/src/app.rs +++ b/crates/tauri/src/app.rs @@ -2418,11 +2418,9 @@ tauri::Builder::default() { let config = app.config(); if let Some(tray_config) = &config.app.tray_icon { - #[allow(deprecated)] let mut tray = TrayIconBuilder::with_id(tray_config.id.clone().unwrap_or_else(|| "main".into())) .icon_as_template(tray_config.icon_as_template) - .menu_on_left_click(tray_config.menu_on_left_click) .show_menu_on_left_click(tray_config.show_menu_on_left_click); if let Some(icon) = &app.manager.tray.icon { tray = tray.icon(icon.clone()); diff --git a/examples/api/src-tauri/src/lib.rs b/examples/api/src-tauri/src/lib.rs index 2b15b36596e8..b569f25cb550 100644 --- a/examples/api/src-tauri/src/lib.rs +++ b/examples/api/src-tauri/src/lib.rs @@ -118,8 +118,6 @@ pub fn run_app) + Send + 'static>( }), }); log::info!("got response: {response:?}"); - // when #[cfg(desktop)], Rust will detect pattern as irrefutable - #[allow(irrefutable_let_patterns)] if let Ok(res) = response { assert_eq!(res.value, value); }