mirror of
https://github.com/gnustep/apps-projectcenter.git
synced 2025-02-19 01:51:09 +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)openFile:(NSString *)path;
|
||||||
- (BOOL)addFile:(NSString *)path;
|
|
||||||
- (BOOL)newFile:(NSString *)path;
|
|
||||||
- (BOOL)saveFile;
|
- (BOOL)saveFile;
|
||||||
- (BOOL)saveFileAs:(NSString *)path;
|
- (BOOL)saveFileAs:(NSString *)path;
|
||||||
- (BOOL)revertFile;
|
- (BOOL)revertFile;
|
||||||
|
|
|
@ -366,20 +366,18 @@ NSString *ActiveProjectDidChangeNotification = @"ActiveProjectDidChange";
|
||||||
|
|
||||||
- (BOOL)openFile:(NSString *)path
|
- (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];
|
return NO;
|
||||||
}
|
|
||||||
|
|
||||||
- (BOOL)addFile:(NSString *)path
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
- (BOOL)newFile:(NSString *)path
|
|
||||||
{
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (BOOL)saveFile
|
- (BOOL)saveFile
|
||||||
|
|
Loading…
Reference in a new issue