mirror of
https://github.com/gnustep/apps-projectcenter.git
synced 2025-02-15 16:11:25 +00:00
daily work
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@7574 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
7240bee8e9
commit
1af6bc56f1
2 changed files with 11 additions and 14 deletions
|
@ -131,8 +131,7 @@
|
|||
// ===========================================================================
|
||||
|
||||
- (BOOL)openFile:(NSString *)path;
|
||||
- (BOOL)addFile:(NSString *)path;
|
||||
- (BOOL)newFile:(NSString *)path;
|
||||
|
||||
- (BOOL)saveFile;
|
||||
- (BOOL)saveFileAs:(NSString *)path;
|
||||
- (BOOL)revertFile;
|
||||
|
|
|
@ -366,20 +366,18 @@ NSString *ActiveProjectDidChangeNotification = @"ActiveProjectDidChange";
|
|||
|
||||
- (BOOL)openFile:(NSString *)path
|
||||
{
|
||||
id<ProjectEditor> editor = [[[delegate prefController] preferencesDict] objectForKey:Editor];
|
||||
BOOL isDir;
|
||||
NSFileManager *fm = [NSFileManager defaultManager];
|
||||
NSDictionary *ui =[NSDictionary dictionaryWithObjectsAndKeys:
|
||||
path,@"FilePathKey",
|
||||
nil];
|
||||
|
||||
if (!editor) {
|
||||
}
|
||||
if ([fm fileExistsAtPath:path isDirectory:&isDir] && !isDir) {
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:FileShouldOpenNotification object:self userInfo:ui];
|
||||
return YES;
|
||||
}
|
||||
|
||||
[editor openFile:path];
|
||||
}
|
||||
|
||||
- (BOOL)addFile:(NSString *)path
|
||||
{
|
||||
}
|
||||
|
||||
- (BOOL)newFile:(NSString *)path
|
||||
{
|
||||
return NO;
|
||||
}
|
||||
|
||||
- (BOOL)saveFile
|
||||
|
|
Loading…
Reference in a new issue