1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-24 08:43:27 +00:00

the quick look window shouldn't zoom onto a missing window when quitting

This commit is contained in:
Mitchell Livingston 2009-09-11 03:15:04 +00:00
parent 149f8c90d8
commit 6faa821dac
2 changed files with 13 additions and 2 deletions

View file

@ -661,7 +661,18 @@ static void sleepCallback(void * controller, io_service_t y, natural_t messageTy
//remember window states and close all windows //remember window states and close all windows
[fDefaults setBool: [[fInfoController window] isVisible] forKey: @"InfoVisible"]; [fDefaults setBool: [[fInfoController window] isVisible] forKey: @"InfoVisible"];
[[NSApp windows] makeObjectsPerformSelector: @selector(close)];
const BOOL quickLookOpen = [NSApp isOnSnowLeopardOrBetter] && [QLPreviewPanel sharedPreviewPanelExists]
&& [[QLPreviewPanel sharedPreviewPanel] isVisible];
for (NSWindow * window in [NSApp windows])
{
if (!quickLookOpen || window != [QLPreviewPanel sharedPreviewPanel]) //hide quicklook window last to avoid animation
[window orderOut: nil];
}
[[QLPreviewPanel sharedPreviewPanel] updateController];
[[QLPreviewPanel sharedPreviewPanel] orderOut: nil];
[self showStatusBar: NO animate: NO]; [self showStatusBar: NO animate: NO];
[self showFilterBar: NO animate: NO]; [self showFilterBar: NO animate: NO];

View file

@ -501,7 +501,7 @@
if (firstChar == 'f' && [event modifierFlags] & NSAlternateKeyMask && [event modifierFlags] & NSCommandKeyMask) if (firstChar == 'f' && [event modifierFlags] & NSAlternateKeyMask && [event modifierFlags] & NSCommandKeyMask)
[fController focusFilterField]; [fController focusFilterField];
else if (firstChar == ' ') else if (firstChar == ' ')
[fController toggleQuickLook: self]; [fController toggleQuickLook: nil];
else else
[super keyDown: event]; [super keyDown: event];
} }