remove unneeded calls to sharedPreviewPanel

This commit is contained in:
Mitchell Livingston 2009-09-04 23:58:27 +00:00
parent 92d2b7cc3a
commit 020353a08c
2 changed files with 3 additions and 2 deletions

View File

@ -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];

View File

@ -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];