Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion crates/tauri-cli/config.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion crates/tauri-schema-generator/schemas/config.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
7 changes: 6 additions & 1 deletion crates/tauri-utils/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
///
Expand Down
2 changes: 0 additions & 2 deletions crates/tauri/src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down
2 changes: 0 additions & 2 deletions examples/api/src-tauri/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,6 @@ pub fn run_app<R: Runtime, F: FnOnce(&App<R>) + 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);
}
Expand Down
Loading