From 093c25ee68d51849b95a1a3b9341e5ad6021cecf Mon Sep 17 00:00:00 2001 From: david Date: Mon, 10 May 2021 10:48:01 -0400 Subject: [PATCH] feat: expose tray feature flag (#256) * feat: expose tray feature flag * Add changefile * Update default flag * Update documentation --- .changes/feature-flags.md | 5 +++++ Cargo.toml | 3 ++- src/lib.rs | 12 ++++++++---- 3 files changed, 15 insertions(+), 5 deletions(-) create mode 100644 .changes/feature-flags.md diff --git a/.changes/feature-flags.md b/.changes/feature-flags.md new file mode 100644 index 000000000..6c35ca9ff --- /dev/null +++ b/.changes/feature-flags.md @@ -0,0 +1,5 @@ +--- +"wry": patch +--- + +Add `tray` feature flag from tao. diff --git a/Cargo.toml b/Cargo.toml index 95792771f..8f34501a3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,11 +22,12 @@ targets = [ ] [features] -default = [ "file-drop", "protocol", "win32", "menu" ] +default = [ "file-drop", "protocol", "win32", "tray" ] file-drop = [ ] protocol = [ ] dox = [ "tao/dox" ] menu = [ "tao/menu" ] +tray = [ "tao/tray" ] winrt = [ "windows-webview2", "windows" ] win32 = [ "webview2", "winapi", "webview2-sys" ] diff --git a/src/lib.rs b/src/lib.rs index 62f631c7f..7f25124e9 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -46,16 +46,20 @@ //! ## Feature flags //! //! Wry uses a set of feature flags to toggle several advanced features. `file-drop`, `protocol`, -//! `menu`, and `win32` are enabled by default. +//! `tray`, and `win32` are enabled by default. //! //! - `file-drop`: Enables [`with_file_drop_handler`] to control the behaviour when there are files //! interacting with the window. //! - `protocol`: Enables [`with_custom_protocol`] to define custom URL scheme for handling tasks like //! loading assets. -//! - `menu`: Enables system tray and more menu item variants on **Linux**. You can still create +//! - `tray`: Enables system tray and more menu item variants on **Linux**. You can still create //! those types if you disable it. They just don't create the actual objects. We set this flag -//! because some implementations require more installed packages. Disable this if you don't want to -//! install those additional packages. +//! because some implementations require more installed packages. Disable this if you don't want +//! to install `libappindicator` and `sourceview` package. +//! - `menu`: Enables menu item variants on **Linux**. You can still create those types if you +//! you disable it. They just don't create the actual objects. We set this flag because some +//! implementations require more installed packages. Disable this if you don't want to install +//! `sourceview` package. //! - `win32`: Enables purely Win32 APIs to build the WebView on **Windows**. This makes backward //! compatibility down to Windows 7 possible. //! - `winrt`: Enables up-to-date Windows Runtime support to build the WebView on **Windows**. WinRT