mirror of
https://github.com/transmission/transmission
synced 2025-02-26 16:02:51 +00:00
spacebar in the Inspector file table will toggle QuickLook
This commit is contained in:
parent
6b1b1b4833
commit
2b76183eed
1 changed files with 17 additions and 0 deletions
|
@ -28,6 +28,7 @@
|
|||
#import "FilePriorityCell.h"
|
||||
#import "Torrent.h"
|
||||
#import "FileListNode.h"
|
||||
#import <Quartz/Quartz.h>
|
||||
|
||||
@implementation FileOutlineView
|
||||
|
||||
|
@ -84,6 +85,22 @@
|
|||
[super mouseDown: event];
|
||||
}
|
||||
|
||||
- (void) keyDown: (NSEvent *) event
|
||||
{
|
||||
const unichar firstChar = [[event charactersIgnoringModifiers] characterAtIndex: 0];
|
||||
|
||||
//don't allow quick look on add window
|
||||
if (firstChar == ' ' && [[[self window] windowController] conformsToProtocol: @protocol(QLPreviewPanelDataSource)])
|
||||
{
|
||||
if ([QLPreviewPanel sharedPreviewPanelExists] && [[QLPreviewPanel sharedPreviewPanel] isVisible])
|
||||
[[QLPreviewPanel sharedPreviewPanel] orderOut: nil];
|
||||
else
|
||||
[[QLPreviewPanel sharedPreviewPanel] makeKeyAndOrderFront: nil];
|
||||
}
|
||||
|
||||
[super keyDown: event];
|
||||
}
|
||||
|
||||
- (NSMenu *) menuForEvent: (NSEvent *) event
|
||||
{
|
||||
int row = [self rowAtPoint: [self convertPoint: [event locationInWindow] fromView: nil]];
|
||||
|
|
Loading…
Reference in a new issue