Skip to content

Commit

Permalink
show-manager -> open-manager more
Browse files Browse the repository at this point in the history
  • Loading branch information
Charlie-XIAO committed Feb 13, 2025
1 parent a3435a8 commit 146a3f9
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion crates/deskulpt-core/src/settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ pub struct Shortcuts {
/// For toggling canvas click-through.
#[serde(default)]
pub toggle_canvas: Option<String>,
/// For showing the manager window.
/// For opening the manager window.
#[serde(default)]
pub open_manager: Option<String>,
}
Expand Down
4 changes: 2 additions & 2 deletions crates/deskulpt-core/src/shortcuts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ impl_shortcuts! {
}
},
open_manager => |app_handle, _, _| {
if let Err(e) = app_handle.show_manager() {
eprintln!("Failed to show the manager window: {e}");
if let Err(e) = app_handle.open_manager() {
eprintln!("Failed to open the manager window: {e}");
}
},
}
Expand Down
4 changes: 2 additions & 2 deletions crates/deskulpt-core/src/tray.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ fn on_menu_event<R: Runtime>(app_handle: &AppHandle<R>, event: MenuEvent) {
}
},
"tray-manage" => {
if let Err(e) = app_handle.show_manager() {
eprintln!("Error showing manager window: {}", e);
if let Err(e) = app_handle.open_manager() {
eprintln!("Error opening manager window: {}", e);
}
},
"tray-exit" => {
Expand Down
4 changes: 2 additions & 2 deletions crates/deskulpt-core/src/window/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ pub trait WindowExt<R: Runtime>: Manager<R> {
Ok(())
}

/// Show the manager window.
fn show_manager(&self) -> Result<()> {
/// Open the manager window.
fn open_manager(&self) -> Result<()> {
let manager = self
.get_webview_window("manager")
.ok_or(anyhow!("Manager window not found"))?;
Expand Down

0 comments on commit 146a3f9

Please sign in to comment.