Browse Source

fix(core): export PathResolver and SystemTrayHandle

Lucas Nogueira 4 years ago
parent
commit
e6d9b0bae8
3 changed files with 3 additions and 3 deletions
  1. 0 1
      core/tauri/src/app.rs
  2. 1 0
      core/tauri/src/app/tray.rs
  3. 2 2
      core/tauri/src/lib.rs

+ 0 - 1
core/tauri/src/app.rs

@@ -3,7 +3,6 @@
 // SPDX-License-Identifier: MIT
 
 #[cfg(feature = "system-tray")]
-#[cfg_attr(doc_cfg, doc(cfg(feature = "system-tray")))]
 pub(crate) mod tray;
 
 use crate::{

+ 1 - 0
core/tauri/src/app/tray.rs

@@ -109,6 +109,7 @@ impl<R: Runtime> Clone for SystemTrayMenuItemHandle<R> {
 }
 
 impl<R: Runtime> SystemTrayHandle<R> {
+  /// Gets a handle to the menu item that has the specified `id`.
   pub fn get_item(&self, id: MenuIdRef<'_>) -> SystemTrayMenuItemHandle<R> {
     for (raw, item_id) in self.ids.iter() {
       if item_id == id {

+ 2 - 2
core/tauri/src/lib.rs

@@ -83,7 +83,7 @@ pub use {
     config::{Config, WindowUrl},
     PackageInfo,
   },
-  self::app::{App, AppHandle, Builder, CloseRequestApi, Event, GlobalWindowEvent},
+  self::app::{App, AppHandle, Builder, CloseRequestApi, Event, GlobalWindowEvent, PathResolver},
   self::hooks::{
     Invoke, InvokeError, InvokeHandler, InvokeMessage, InvokeResolver, InvokeResponse, OnPageLoad,
     PageLoadPayload, SetupHook,
@@ -102,7 +102,7 @@ pub use {
 #[cfg(feature = "system-tray")]
 #[cfg_attr(doc_cfg, doc(cfg(feature = "system-tray")))]
 pub use {
-  self::app::tray::SystemTrayEvent,
+  self::app::tray::{SystemTrayEvent, SystemTrayHandle},
   self::runtime::{
     menu::{SystemTrayMenu, SystemTrayMenuItem, SystemTraySubmenu},
     SystemTray,