mirror of
https://github.com/gnustep/apps-projectcenter.git
synced 2025-03-19 00:51:51 +00:00
recent document menu support
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@35385 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
f3ac6d9d8a
commit
8152e6b4ee
4 changed files with 16 additions and 1 deletions
|
@ -1,3 +1,9 @@
|
|||
2012-08-09 Riccardo Mottola <rm@gnu.org>
|
||||
|
||||
* English.lproj/ProjectCenter.gorm
|
||||
* Framework/PCProjectManager.m
|
||||
Recent Document menu support.
|
||||
|
||||
2012-07-30 Wolfgang Lux <wolfgang.lux@gmail.com>
|
||||
|
||||
* Framework/PCProjectBuilder.m (-line:startsWithString:,
|
||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -553,6 +553,7 @@ NSString *PCActiveProjectDidChangeNotification = @"PCActiveProjectDidChange";
|
|||
NSString *projectFileType = nil;
|
||||
PCProject *project = nil;
|
||||
NSDictionary *wap = nil;
|
||||
NSString *projectPathToSave;
|
||||
|
||||
// Check project path for invalid characters
|
||||
if ([aPath rangeOfString: @" "].location != NSNotFound ||
|
||||
|
@ -591,7 +592,7 @@ NSString *PCActiveProjectDidChangeNotification = @"PCActiveProjectDidChange";
|
|||
BOOL isDir = NO;
|
||||
BOOL exists = NO;
|
||||
NSArray *tempList;
|
||||
|
||||
|
||||
exists = [[NSFileManager defaultManager] fileExistsAtPath:aPath
|
||||
isDirectory:&isDir];
|
||||
if (!exists)
|
||||
|
@ -599,6 +600,7 @@ NSString *PCActiveProjectDidChangeNotification = @"PCActiveProjectDidChange";
|
|||
return nil;
|
||||
}
|
||||
|
||||
projectPathToSave = projectPath;
|
||||
if (isDir)
|
||||
{
|
||||
if ([projectFileType isEqualToString:@"pcproj"] == NO)
|
||||
|
@ -611,6 +613,10 @@ NSString *PCActiveProjectDidChangeNotification = @"PCActiveProjectDidChange";
|
|||
aPath = [tempList objectAtIndex:0];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
projectPathToSave = aPath;
|
||||
}
|
||||
aPath = [aPath stringByAppendingPathComponent:@"PC.project"];
|
||||
projectFile = [NSMutableDictionary dictionaryWithContentsOfFile:aPath];
|
||||
}
|
||||
|
@ -697,7 +703,10 @@ NSString *PCActiveProjectDidChangeNotification = @"PCActiveProjectDidChange";
|
|||
[[project projectWindow] makeKeyAndOrderFront:self];
|
||||
[self setActiveProject: project];
|
||||
}
|
||||
PCLogStatus(self, @"Saved opened Document as %@", projectPathToSave);
|
||||
[[NSDocumentController sharedDocumentController] noteNewRecentDocumentURL: [NSURL fileURLWithPath:projectPathToSave]];
|
||||
}
|
||||
|
||||
|
||||
return project;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue