mirror of
https://github.com/TermiT/Flycut.git
synced 2025-10-08 12:56:18 +08:00
mouse scroll to choose clippings and double click to paste
This commit is contained in:
parent
5e259802d9
commit
d583141f90
3 changed files with 25 additions and 2 deletions
|
@ -98,6 +98,7 @@
|
||||||
-(void) showBezel;
|
-(void) showBezel;
|
||||||
-(void) hideBezel;
|
-(void) hideBezel;
|
||||||
-(void) processBezelKeyDown:(NSEvent *)theEvent;
|
-(void) processBezelKeyDown:(NSEvent *)theEvent;
|
||||||
|
-(void) processBezelMouseEvents:(NSEvent *)theEvent;
|
||||||
-(void) metaKeysReleased;
|
-(void) metaKeysReleased;
|
||||||
|
|
||||||
// Menu related
|
// Menu related
|
||||||
|
|
|
@ -1011,6 +1011,18 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
-(void) processBezelMouseEvents:(NSEvent *)theEvent {
|
||||||
|
if (theEvent.type == NSScrollWheel) {
|
||||||
|
if (theEvent.deltaY > 0.0f) {
|
||||||
|
[self stackUp];
|
||||||
|
} else if (theEvent.deltaY < 0.0f) {
|
||||||
|
[self stackDown];
|
||||||
|
}
|
||||||
|
} else if (theEvent.type == NSLeftMouseUp && theEvent.clickCount == 2) {
|
||||||
|
[self pasteFromStack];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
- (void)applicationDidFinishLaunching:(NSNotification *)notification
|
- (void)applicationDidFinishLaunching:(NSNotification *)notification
|
||||||
{
|
{
|
||||||
//Create our hot key
|
//Create our hot key
|
||||||
|
@ -1048,7 +1060,8 @@
|
||||||
[bezel setCollectionBehavior:NSWindowCollectionBehaviorCanJoinAllSpaces];
|
[bezel setCollectionBehavior:NSWindowCollectionBehaviorCanJoinAllSpaces];
|
||||||
// if ([[NSUserDefaults standardUserDefaults] boolForKey:@"popUpAnimation"])
|
// if ([[NSUserDefaults standardUserDefaults] boolForKey:@"popUpAnimation"])
|
||||||
// [bezel makeKeyAndOrderFrontWithPopEffect];
|
// [bezel makeKeyAndOrderFrontWithPopEffect];
|
||||||
else [bezel makeKeyAndOrderFront:self];
|
// else
|
||||||
|
[bezel makeKeyAndOrderFront:self];
|
||||||
isBezelDisplayed = YES;
|
isBezelDisplayed = YES;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -332,6 +332,15 @@ static const float lineHeight = 16;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (void)mouseUp:(NSEvent *)theEvent
|
||||||
|
{
|
||||||
|
if ( [self delegate] )
|
||||||
|
{
|
||||||
|
[delegate performSelector:@selector(processBezelMouseEvents:) withObject:theEvent];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
- (void)keyDown:(NSEvent *)theEvent {
|
- (void)keyDown:(NSEvent *)theEvent {
|
||||||
if ( [self delegate] )
|
if ( [self delegate] )
|
||||||
|
|
Loading…
Add table
Reference in a new issue