Skip to content

Commit 62cdb2b

Browse files
authored
refactor(tauri): remove ayatana-tray from the default features (#3976)
1 parent 7ae9e25 commit 62cdb2b

File tree

9 files changed

+29
-21
lines changed

9 files changed

+29
-21
lines changed

.changes/ayatana-feature-refactor.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"tauri": patch
3+
---
4+
5+
**Breaking change:** Removed the `ayatana-tray` from the default features. You must select one of `ayatana-tray` and `gtk-tray` to use system tray on Linux.

.changes/expose-global-shortcut.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"tauri": patch
3+
---
4+
5+
Re-export the `GlobalShortcutManager` when the `global-shortcut` feature is enabled.

.github/workflows/lint-fmt-core.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
clippy:
5151
- { args: '', key: 'empty' }
5252
- {
53-
args: '--features compression,wry,isolation,custom-protocol,api-all,cli,updater,system-tray,http-multipart',
53+
args: '--features compression,wry,isolation,custom-protocol,api-all,cli,updater,system-tray,ayatana-tray,http-multipart',
5454
key: 'all'
5555
}
5656
- {

.github/workflows/test-core.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,4 +89,4 @@ jobs:
8989
run: |
9090
cargo test
9191
cargo test --features api-all
92-
cargo test --features compression,wry,isolation,custom-protocol,api-all,cli,updater,system-tray,http-multipart
92+
cargo test --features compression,wry,isolation,custom-protocol,api-all,cli,updater,system-tray,ayatana-tray,http-multipart

.github/workflows/udeps.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
clippy:
3030
- {
3131
path: './core/tauri/Cargo.toml',
32-
args: '--features compression,wry,isolation,custom-protocol,api-all,cli,updater,system-tray,http-multipart'
32+
args: '--features compression,wry,isolation,custom-protocol,api-all,cli,updater,system-tray,ayatana-tray,http-multipart'
3333
}
3434
- { path: './core/tauri-build/Cargo.toml', args: '--all-features' }
3535
- { path: './core/tauri-codegen/Cargo.toml', args: '--all-features' }

core/tauri/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ tokio = { version = "1.16", features = [ "full" ] }
122122
cargo_toml = "0.11"
123123

124124
[features]
125-
default = [ "wry", "compression", "objc-exception", "ayatana-tray" ]
125+
default = [ "wry", "compression", "objc-exception" ]
126126
compression = [ "tauri-macros/compression", "tauri-utils/compression" ]
127127
wry = [ "tauri-runtime-wry" ]
128128
objc-exception = [ "tauri-runtime-wry/objc-exception" ]

core/tauri/src/lib.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@
3131
//! - **fs-extract-api**: Enabled the `tauri::api::file::Extract` API.
3232
//! - **cli**: Enables usage of `clap` for CLI argument parsing. Enabled by default if the `cli` config is defined on the `tauri.conf.json` file.
3333
//! - **system-tray**: Enables application system tray API. Enabled by default if the `systemTray` config is defined on the `tauri.conf.json` file.
34-
//! - **ayatana-tray** *(enabled by default)*: Use libayatana-appindicator for system tray on Linux.
34+
//! Note that you must select one of `ayatana-tray` and `gtk-tray` features on Linux.
35+
//! - **ayatana-tray**: Use libayatana-appindicator for system tray on Linux.
3536
//! - **gtk-tray**: Use libappindicator3-1 for system tray on Linux. To enable this, you need to disable the default features.
3637
//! - **macos-private-api**: Enables features only available in **macOS**'s private APIs, currently the `transparent` window functionality and the `fullScreenEnabled` preference setting to `true`. Enabled by default if the `tauri > macosPrivateApi` config flag is set to `true` on the `tauri.conf.json` file.
3738
//! - **window-data-url**: Enables usage of data URLs on the webview.
@@ -250,6 +251,10 @@ pub use {
250251
#[cfg_attr(doc_cfg, doc(cfg(feature = "clipboard")))]
251252
pub use self::runtime::ClipboardManager;
252253

254+
#[cfg(feature = "global-shortcut")]
255+
#[cfg_attr(doc_cfg, doc(cfg(feature = "global-shortcut")))]
256+
pub use self::runtime::GlobalShortcutManager;
257+
253258
/// Updater events.
254259
#[cfg(updater)]
255260
#[cfg_attr(doc_cfg, doc(cfg(feature = "updater")))]

examples/api/src-tauri/Cargo.lock

Lines changed: 8 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/api/src-tauri/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ tauri-build = { path = "../../../core/tauri-build", features = ["isolation"] }
1212
[dependencies]
1313
serde_json = "1.0"
1414
serde = { version = "1.0", features = [ "derive" ] }
15-
tauri = { path = "../../../core/tauri", default-features = false, features = ["api-all", "cli", "compression", "http-multipart", "icon-ico", "icon-png", "isolation", "macos-private-api", "objc-exception", "reqwest-client", "system-tray", "updater", "wry"] }
15+
tauri = { path = "../../../core/tauri", features = ["api-all", "cli", "http-multipart", "icon-ico", "icon-png", "isolation", "macos-private-api", "reqwest-client", "system-tray", "updater", "global-shortcut"] }
1616
tiny_http = "0.11"
1717

1818
[features]

0 commit comments

Comments
 (0)