mirror of
https://github.com/transmission/transmission.git
synced 2025-12-24 20:35:36 +00:00
remove unneeded calls to sharedPreviewPanel
This commit is contained in:
@@ -3251,6 +3251,7 @@ static void sleepCallback(void * controller, io_service_t y, natural_t messageTy
|
||||
[item setImage: [NSImage imageNamed: NSImageNameQuickLookTemplate]];
|
||||
[item setTarget: self];
|
||||
[item setAction: @selector(toggleQuickLook:)];
|
||||
[item setAutovalidates: NO];
|
||||
|
||||
return item;
|
||||
}
|
||||
@@ -3964,7 +3965,7 @@ static void sleepCallback(void * controller, io_service_t y, natural_t messageTy
|
||||
|
||||
- (void) toggleQuickLook: (id) sender
|
||||
{
|
||||
if ([QLPreviewPanel sharedPreviewPanelExists] && [[QLPreviewPanel sharedPreviewPanel] isVisible])
|
||||
if ([[QLPreviewPanel sharedPreviewPanel] isVisible])
|
||||
[[QLPreviewPanel sharedPreviewPanel] orderOut: nil];
|
||||
else
|
||||
[[QLPreviewPanel sharedPreviewPanel] makeKeyAndOrderFront: nil];
|
||||
|
||||
@@ -92,7 +92,7 @@
|
||||
//don't allow quick look on add window
|
||||
if (firstChar == ' ' && [[[self window] windowController] conformsToProtocol: @protocol(QLPreviewPanelDataSource)])
|
||||
{
|
||||
if ([QLPreviewPanel sharedPreviewPanelExists] && [[QLPreviewPanel sharedPreviewPanel] isVisible])
|
||||
if ([[QLPreviewPanel sharedPreviewPanel] isVisible])
|
||||
[[QLPreviewPanel sharedPreviewPanel] orderOut: nil];
|
||||
else
|
||||
[[QLPreviewPanel sharedPreviewPanel] makeKeyAndOrderFront: nil];
|
||||
|
||||
Reference in New Issue
Block a user