Merge branch 'master' of github.com:TermiT/Flycut

This commit is contained in:
Gennadii Potapov 2020-12-22 17:42:33 +08:00
commit fe6b606b99
6 changed files with 27 additions and 8 deletions

4
.github/FUNDING.yml vendored Normal file
View file

@ -0,0 +1,4 @@
# These are supported funding model platforms
github: TermiT
custom: https://paypal.me/flycut

View file

@ -22,7 +22,7 @@
@class SGHotKey;
@interface AppController : NSObject <NSMenuDelegate, NSApplicationDelegate, NSAlertDelegate, FlycutStoreDelegate, FlycutOperatorDelegate> {
@interface AppController : NSObject <NSMenuDelegate, NSApplicationDelegate, NSAlertDelegate, FlycutStoreDelegate, FlycutOperatorDelegate, BezelWindowDelegate> {
BezelWindow *bezel;
SGHotKey *mainHotKey;
IBOutlet SRRecorderControl *mainRecorder;
@ -97,6 +97,7 @@
-(void) processBezelKeyDown:(NSEvent *)theEvent;
-(void) processBezelMouseEvents:(NSEvent *)theEvent;
-(void) metaKeysReleased;
-(void) windowDidResignKey:(NSNotification *)notification;
// Menu related
-(void) updateMenu;

View file

@ -758,6 +758,12 @@
}
}
- (void)windowDidResignKey:(NSNotification *)notification {
if ( isBezelPinned ) {
[self hideApp];
}
}
-(void)fakeKey:(NSNumber*) keyCode withCommandFlag:(BOOL) setFlag
/*" +fakeKey synthesizes keyboard events. "*/
{
@ -1059,8 +1065,8 @@ didFailToRegisterForRemoteNotificationsWithError:(NSError *)error {
-(void)hideApp
{
[self hideBezel];
isBezelPinned = NO;
[self hideBezel];
[NSApp hide:self];
}

View file

@ -14,6 +14,13 @@
#import "RoundRecBezierPath.h"
#import "RoundRecTextField.h"
@protocol BezelWindowDelegate <NSWindowDelegate>
-(void)processBezelKeyDown:(NSEvent *)theEvent;
-(void)processBezelMouseEvents:(NSEvent *)theEvent;
-(void)metaKeysReleased;
@end
@interface BezelWindow : NSPanel {
// "n of n" text in bezel
@ -33,7 +40,7 @@
RoundRecTextField *textField;
RoundRecTextField *charField;
NSImageView *iconView;
id delegate;
id<BezelWindowDelegate> delegate;
Boolean color;
}
@ -57,7 +64,7 @@
- (void)setDate:(NSString *)newDate;
- (void)setSourceIcon:(NSImage *)newSourceIcon;
- (id)delegate;
- (void)setDelegate:(id)newDelegate;
- (id<BezelWindowDelegate>)delegate;
- (void)setDelegate:(id<BezelWindowDelegate>)newDelegate;
@end

View file

@ -365,12 +365,13 @@ static const float lineHeight = 16;
}
}
- (id)delegate {
- (id<BezelWindowDelegate>)delegate {
return delegate;
}
- (void)setDelegate:(id)newDelegate {
- (void)setDelegate:(id<BezelWindowDelegate>)newDelegate {
delegate = newDelegate;
super.delegate = newDelegate;
}
@end

View file

@ -22,7 +22,7 @@ If you like Flycut, you can donate [here](https://paypal.me/flycut)
Download from the App Store [here](http://itunes.apple.com/us/app/flycut-clipboard-manager/id442160987?mt=12)
**DRM-Free:**
Download latest DRM-Free version [here](https://github.com/MarkJerde/Flycut/releases/latest)
Download latest DRM-Free version [here](https://github.com/TermiT/Flycut/releases)
**iOS App Store:**
Download from the App Store [here](https://itunes.apple.com/us/app/flycut/id1273639655?mt=8)