-
Notifications
You must be signed in to change notification settings - Fork 390
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'dev' into stream_service_validation
- Loading branch information
Showing
5 changed files
with
34 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// | ||
// Shortcut+Menu.swift | ||
// Easydict | ||
// | ||
// Created by Sharker on 2024/2/7. | ||
// Copyright © 2024 izual. All rights reserved. | ||
// | ||
|
||
import SwiftUI | ||
|
||
extension Shortcut { | ||
@available(macOS 13, *) | ||
func updateMenu(_ type: ShortcutType) { // update shortcut menu | ||
let shortcutTitle = String(localized: LocalizedStringResource(stringLiteral: type.localizedStringKey())) | ||
let menuTitle = String(localized: LocalizedStringResource(stringLiteral: "shortcut")) | ||
let shortcutMenu = NSApp.mainMenu?.items.first(where: { $0.title == menuTitle }) | ||
let clearInput = shortcutMenu?.submenu?.items.first(where: { $0.title == shortcutTitle }) | ||
clearInput?.keyEquivalent = "" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,4 @@ struct EasyDictMainMenu: Commands { | |
// shortcut | ||
MainMenuShortcutCommand() | ||
} | ||
|
||
func showAPIWebSite() {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters