From a57921595d78935b6305be61d7e12203c1bbadb6 Mon Sep 17 00:00:00 2001 From: Bibiko Date: Wed, 2 Sep 2009 21:39:51 +0000 Subject: =?UTF-8?q?=E2=80=A2=20added=20"Recent=20Open"=20menu=20item=20to?= =?UTF-8?q?=20Main=20Menu=20>=20File?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Interfaces/English.lproj/MainMenu.xib | 69 ++++++++++++++++++++++++++++++++++- Source/TableDocument.m | 8 +++- 2 files changed, 74 insertions(+), 3 deletions(-) diff --git a/Interfaces/English.lproj/MainMenu.xib b/Interfaces/English.lproj/MainMenu.xib index 33e98b33..82b7cea6 100644 --- a/Interfaces/English.lproj/MainMenu.xib +++ b/Interfaces/English.lproj/MainMenu.xib @@ -261,6 +261,31 @@ 1002 + + + Open Recent + + 2147483647 + + + submenuAction: + + Open Recent + + YES + + + Clear Menu + + 1048576 + 2147483647 + + + + + _NSRecentDocumentsMenu + + YES @@ -2627,6 +2652,14 @@ 966 + + + clearRecentDocuments: + + + + 982 + @@ -2854,6 +2887,7 @@ + @@ -3901,6 +3935,29 @@ + + 971 + + + YES + + + + + + 980 + + + YES + + + + + + 981 + + + @@ -4253,6 +4310,10 @@ 960.IBPluginDependency 963.IBPluginDependency 965.IBPluginDependency + 971.IBPluginDependency + 980.IBEditorWindowLastContentRect + 980.IBPluginDependency + 981.IBPluginDependency YES @@ -4523,7 +4584,7 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - {{350, 430}, {220, 273}} + {{350, 410}, {209, 293}} com.apple.InterfaceBuilder.CocoaPlugin {{180, 535}, {182, 253}} @@ -4652,6 +4713,10 @@ w6gg4oaSIGZhY2FkZV0 com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + {{559, 640}, {146, 23}} + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin @@ -4674,7 +4739,7 @@ w6gg4oaSIGZhY2FkZV0 - 966 + 982 diff --git a/Source/TableDocument.m b/Source/TableDocument.m index 946031a7..cafdf4b7 100644 --- a/Source/TableDocument.m +++ b/Source/TableDocument.m @@ -408,6 +408,7 @@ } [self setFileURL:[NSURL URLWithString:path]]; + [[NSDocumentController sharedDocumentController] noteNewRecentDocumentURL:[NSURL URLWithString:path]]; [spfDocData setObject:[NSNumber numberWithBool:NO] forKey:@"auto_connect"]; if([spf objectForKey:@"auto_connect"] && [[spf valueForKey:@"auto_connect"] boolValue]) { @@ -593,7 +594,7 @@ if(spfSession != nil) [self restoreSession]; // [self performSelector:@selector(restoreSession) withObject:nil afterDelay:0.3]; - + NSLog(@"r %@",[[NSDocumentController sharedDocumentController] recentDocumentURLs]); } /** @@ -2067,6 +2068,9 @@ NSAlert *errorAlert = [NSAlert alertWithError:error]; [errorAlert runModal]; } + + [[NSDocumentController sharedDocumentController] noteNewRecentDocumentURL:[NSURL URLWithString:fileName]]; + return; } @@ -2171,6 +2175,8 @@ [errorAlert runModal]; } + [[NSDocumentController sharedDocumentController] noteNewRecentDocumentURL:[self fileURL]]; + return; } -- cgit v1.2.3