Skip to content

Commit

Permalink
Merge branch 'master' of github.com:TermiT/Flycut
Browse files Browse the repository at this point in the history
  • Loading branch information
TermiT committed Dec 22, 2020
2 parents 2d9b7d2 + 8d88100 commit fe6b606
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 8 deletions.
4 changes: 4 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# These are supported funding model platforms

github: TermiT
custom: https://paypal.me/flycut
3 changes: 2 additions & 1 deletion AppController.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -97,6 +97,7 @@
-(void) processBezelKeyDown:(NSEvent *)theEvent;
-(void) processBezelMouseEvents:(NSEvent *)theEvent;
-(void) metaKeysReleased;
-(void) windowDidResignKey:(NSNotification *)notification;

// Menu related
-(void) updateMenu;
Expand Down
8 changes: 7 additions & 1 deletion AppController.m
Original file line number Diff line number Diff line change
Expand Up @@ -758,6 +758,12 @@ - (void)metaKeysReleased
}
}

- (void)windowDidResignKey:(NSNotification *)notification {
if ( isBezelPinned ) {
[self hideApp];
}
}

-(void)fakeKey:(NSNumber*) keyCode withCommandFlag:(BOOL) setFlag
/*" +fakeKey synthesizes keyboard events. "*/
{
Expand Down Expand Up @@ -1059,8 +1065,8 @@ - (void) hideBezel

-(void)hideApp
{
[self hideBezel];
isBezelPinned = NO;
[self hideBezel];
[NSApp hide:self];
}

Expand Down
13 changes: 10 additions & 3 deletions UI/BezelWindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -33,7 +40,7 @@
RoundRecTextField *textField;
RoundRecTextField *charField;
NSImageView *iconView;
id delegate;
id<BezelWindowDelegate> delegate;
Boolean color;
}

Expand All @@ -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
5 changes: 3 additions & 2 deletions UI/BezelWindow.m
Original file line number Diff line number Diff line change
Expand Up @@ -365,12 +365,13 @@ - (void)flagsChanged:(NSEvent *)theEvent {
}
}

- (id)delegate {
- (id<BezelWindowDelegate>)delegate {
return delegate;
}

- (void)setDelegate:(id)newDelegate {
- (void)setDelegate:(id<BezelWindowDelegate>)newDelegate {
delegate = newDelegate;
super.delegate = newDelegate;
}

@end
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit fe6b606

Please sign in to comment.