-
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.
feat: add double click modifier as shortcut (#277)
* feat: add double click modifier as shortcut * feat: add gemfile * chore: clean up code for double click * perf: resolve warning * fix: hidden pop button when user playing shortcut * fix: hidden pop button when user playing shortcut * fix: close main window * fix: close main window * fix: revert self.mainWindow close commit --------- Co-authored-by: tisfeng <[email protected]>
- Loading branch information
Showing
15 changed files
with
341 additions
and
27 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
18 changes: 18 additions & 0 deletions
18
Easydict/Feature/Shortcut/MASShortcutBinder+EZMASShortcutBinder.h
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,18 @@ | ||
// | ||
// MASShortcutBinder+EZMASShortcutBinder.h | ||
// Easydict | ||
// | ||
// Created by Sharker on 2023/12/30. | ||
// Copyright © 2023 izual. All rights reserved. | ||
// | ||
|
||
@import MASShortcut; | ||
|
||
NS_ASSUME_NONNULL_BEGIN | ||
|
||
@interface MASShortcutBinder (EZMASShortcutBinder) | ||
// hidden pop button when user playing shortcut | ||
- (void)ez_bindShortcutWithDefaultsKey: (NSString*) defaultsKeyName toAction: (dispatch_block_t) action; | ||
@end | ||
|
||
NS_ASSUME_NONNULL_END |
18 changes: 18 additions & 0 deletions
18
Easydict/Feature/Shortcut/MASShortcutBinder+EZMASShortcutBinder.m
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,18 @@ | ||
// | ||
// MASShortcutBinder+EZMASShortcutBinder.m | ||
// Easydict | ||
// | ||
// Created by Sharker on 2023/12/30. | ||
// Copyright © 2023 izual. All rights reserved. | ||
// | ||
|
||
#import "MASShortcutBinder+EZMASShortcutBinder.h" | ||
#import "EZWindowManager.h" | ||
|
||
@implementation MASShortcutBinder (EZMASShortcutBinder) | ||
- (void)ez_bindShortcutWithDefaultsKey:(NSString *)defaultsKeyName toAction:(dispatch_block_t)action { | ||
EZWindowManager *windowManager = [EZWindowManager shared]; | ||
[windowManager.popButtonWindow close]; | ||
[self bindShortcutWithDefaultsKey:defaultsKeyName toAction:action]; | ||
} | ||
@end |
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,3 @@ | ||
source 'https://rubygems.org' do | ||
gem 'cocoapods', '1.14.2' | ||
end |
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,107 @@ | ||
GEM | ||
remote: https://rubygems.org/ | ||
specs: | ||
CFPropertyList (3.0.6) | ||
rexml | ||
activesupport (7.1.2) | ||
base64 | ||
bigdecimal | ||
concurrent-ruby (~> 1.0, >= 1.0.2) | ||
connection_pool (>= 2.2.5) | ||
drb | ||
i18n (>= 1.6, < 2) | ||
minitest (>= 5.1) | ||
mutex_m | ||
tzinfo (~> 2.0) | ||
addressable (2.8.6) | ||
public_suffix (>= 2.0.2, < 6.0) | ||
algoliasearch (1.27.5) | ||
httpclient (~> 2.8, >= 2.8.3) | ||
json (>= 1.5.1) | ||
atomos (0.1.3) | ||
base64 (0.2.0) | ||
bigdecimal (3.1.5) | ||
claide (1.1.0) | ||
cocoapods (1.14.2) | ||
addressable (~> 2.8) | ||
claide (>= 1.0.2, < 2.0) | ||
cocoapods-core (= 1.14.2) | ||
cocoapods-deintegrate (>= 1.0.3, < 2.0) | ||
cocoapods-downloader (>= 2.0) | ||
cocoapods-plugins (>= 1.0.0, < 2.0) | ||
cocoapods-search (>= 1.0.0, < 2.0) | ||
cocoapods-trunk (>= 1.6.0, < 2.0) | ||
cocoapods-try (>= 1.1.0, < 2.0) | ||
colored2 (~> 3.1) | ||
escape (~> 0.0.4) | ||
fourflusher (>= 2.3.0, < 3.0) | ||
gh_inspector (~> 1.0) | ||
molinillo (~> 0.8.0) | ||
nap (~> 1.0) | ||
ruby-macho (>= 2.3.0, < 3.0) | ||
xcodeproj (>= 1.23.0, < 2.0) | ||
cocoapods-core (1.14.2) | ||
activesupport (>= 5.0, < 8) | ||
addressable (~> 2.8) | ||
algoliasearch (~> 1.0) | ||
concurrent-ruby (~> 1.1) | ||
fuzzy_match (~> 2.0.4) | ||
nap (~> 1.0) | ||
netrc (~> 0.11) | ||
public_suffix (~> 4.0) | ||
typhoeus (~> 1.0) | ||
cocoapods-deintegrate (1.0.5) | ||
cocoapods-downloader (2.1) | ||
cocoapods-plugins (1.0.0) | ||
nap | ||
cocoapods-search (1.0.1) | ||
cocoapods-trunk (1.6.0) | ||
nap (>= 0.8, < 2.0) | ||
netrc (~> 0.11) | ||
cocoapods-try (1.2.0) | ||
colored2 (3.1.2) | ||
concurrent-ruby (1.2.2) | ||
connection_pool (2.4.1) | ||
drb (2.2.0) | ||
ruby2_keywords | ||
escape (0.0.4) | ||
ethon (0.16.0) | ||
ffi (>= 1.15.0) | ||
ffi (1.16.3) | ||
fourflusher (2.3.1) | ||
fuzzy_match (2.0.4) | ||
gh_inspector (1.1.3) | ||
httpclient (2.8.3) | ||
i18n (1.14.1) | ||
concurrent-ruby (~> 1.0) | ||
json (2.7.1) | ||
minitest (5.20.0) | ||
molinillo (0.8.0) | ||
mutex_m (0.2.0) | ||
nanaimo (0.3.0) | ||
nap (1.1.0) | ||
netrc (0.11.0) | ||
public_suffix (4.0.7) | ||
rexml (3.2.6) | ||
ruby-macho (2.5.1) | ||
ruby2_keywords (0.0.5) | ||
typhoeus (1.4.1) | ||
ethon (>= 0.9.0) | ||
tzinfo (2.0.6) | ||
concurrent-ruby (~> 1.0) | ||
xcodeproj (1.23.0) | ||
CFPropertyList (>= 2.3.3, < 4.0) | ||
atomos (~> 0.1.3) | ||
claide (>= 1.0.2, < 2.0) | ||
colored2 (~> 3.1) | ||
nanaimo (~> 0.3.0) | ||
rexml (~> 3.2.4) | ||
|
||
PLATFORMS | ||
arm64-darwin-22 | ||
|
||
DEPENDENCIES | ||
cocoapods (= 1.14.2)! | ||
|
||
BUNDLED WITH | ||
2.2.3 |
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 |
---|---|---|
|
@@ -10,7 +10,7 @@ target 'Easydict' do | |
pod 'MJExtension', '~> 3.2.1' | ||
pod 'Masonry', '~> 1.1.0' | ||
pod 'ReactiveObjC', '~> 3.1.1' | ||
pod 'MASShortcut', '~> 2.4.0' | ||
pod 'MASShortcut', :git => '[email protected]:AkaShark/MASShortcut.git', :branch => 'double_click_modifier' | ||
pod 'MASPreferences', '~> 1.4.1' | ||
pod 'CocoaLumberjack/Swift', '~> 3.6.0' | ||
pod 'SSZipArchive', '~> 2.2.2' | ||
|
@@ -34,7 +34,7 @@ target 'EasydictTests' do | |
pod 'MJExtension', '~> 3.2.1' | ||
pod 'Masonry', '~> 1.1.0' | ||
pod 'ReactiveObjC', '~> 3.1.1' | ||
pod 'MASShortcut', '~> 2.4.0' | ||
pod 'MASShortcut', :git => '[email protected]:AkaShark/MASShortcut.git', :branch => 'double_click_modifier' | ||
pod 'MASPreferences', '~> 1.4.1' | ||
pod 'CocoaLumberjack/Swift', '~> 3.6.0' | ||
pod 'SSZipArchive', '~> 2.2.2' | ||
|
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 |
---|---|---|
|
@@ -117,7 +117,7 @@ DEPENDENCIES: | |
- KVOController (~> 1.2.0) | ||
- Masonry (~> 1.1.0) | ||
- MASPreferences (~> 1.4.1) | ||
- MASShortcut (~> 2.4.0) | ||
- "MASShortcut (from `[email protected]:AkaShark/MASShortcut.git`, branch `double_click_modifier`)" | ||
- MJExtension (~> 3.2.1) | ||
- ReactiveObjC (~> 3.1.1) | ||
- Sparkle (~> 2.5.1) | ||
|
@@ -139,7 +139,6 @@ SPEC REPOS: | |
- KVOController | ||
- Masonry | ||
- MASPreferences | ||
- MASShortcut | ||
- MJExtension | ||
- nanopb | ||
- PromisesObjC | ||
|
@@ -148,6 +147,16 @@ SPEC REPOS: | |
- SSZipArchive | ||
- SwiftFormat | ||
|
||
EXTERNAL SOURCES: | ||
MASShortcut: | ||
:branch: double_click_modifier | ||
:git: "[email protected]:AkaShark/MASShortcut.git" | ||
|
||
CHECKOUT OPTIONS: | ||
MASShortcut: | ||
:commit: 694922e088bc91eb70eff42ddaf7602c5b87f1f1 | ||
:git: "[email protected]:AkaShark/MASShortcut.git" | ||
|
||
SPEC CHECKSUMS: | ||
AFNetworking: cb604b1c2bded0871f5f61f5d53653739e841d6b | ||
AppCenter: 85c92db0759d2792a65eb61d6842d2e86611a49a | ||
|
@@ -171,6 +180,6 @@ SPEC CHECKSUMS: | |
SSZipArchive: 62d4947b08730e4cda640473b0066d209ff033c9 | ||
SwiftFormat: 2ca3d0b75754193f0f3ba532291f25ae08dd1e42 | ||
|
||
PODFILE CHECKSUM: a35287f08d36ebe90dd9f3362e15bf7aaeeaf0f5 | ||
PODFILE CHECKSUM: 597cd2d7aa9ead11dfe63d03ada0bdffc6ee7ad8 | ||
|
||
COCOAPODS: 1.14.2 |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.