From 01d54afcc3d294fe1a9a6022943b3af56bb189e0 Mon Sep 17 00:00:00 2001 From: Kelvin Sherlock Date: Thu, 10 Mar 2011 23:21:34 -0500 Subject: [PATCH] add file to recent documents @ close time. --- Image Opener/WindowController.m | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Image Opener/WindowController.m b/Image Opener/WindowController.m index ed1a3f3..dcafa7e 100644 --- a/Image Opener/WindowController.m +++ b/Image Opener/WindowController.m @@ -347,6 +347,12 @@ static unsigned ExtToTag(NSString *ext) - (void)windowWillClose:(NSNotification *)notification { + if (_filePath) + { + NSURL *url = [NSURL fileURLWithPath: _filePath isDirectory: NO]; + [[NSDocumentController sharedDocumentController] noteNewRecentDocumentURL: url]; + } + [self release]; }