Single click always invokes the internal editor now.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@12614 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Philippe C.D. Robert 2002-02-21 10:15:17 +00:00
parent 4ee31e2a7c
commit 6b2f8c69f7
3 changed files with 24 additions and 18 deletions

View file

@ -42,6 +42,7 @@
- (void)setProject:(PCProject *)aProject;
- (PCEditor *)internalEditorForFile:(NSString *)path;
- (PCEditor *)editorForFile:(NSString *)path;
- (NSArray *)allEditors;

View file

@ -79,6 +79,27 @@
project = aProject;
}
- (PCEditor *)internalEditorForFile:(NSString *)path
{
PCEditor *editor;
if( editor = [editorDict objectForKey:path] )
{
return editor;
}
else
{
editor = [[PCEditor alloc] initWithPath:path];
[editor setDelegate:self];
[editorDict setObject:editor forKey:path];
//RELEASE(editor);
return editor;
}
}
- (PCEditor *)editorForFile:(NSString *)path
{
NSUserDefaults *ud = [NSUserDefaults standardUserDefaults];
@ -89,23 +110,7 @@
}
else
{
PCEditor *editor;
if( editor = [editorDict objectForKey:path] )
{
return editor;
}
else
{
editor = [[PCEditor alloc] initWithPath:path];
[editor setDelegate:self];
[editorDict setObject:editor forKey:path];
//RELEASE(editor);
return editor;
}
[self internalEditorForFile:path];
}
}

View file

@ -646,7 +646,7 @@
[fileNameField setStringValue:fileName];
// Show the file in the internal editor!
e = [editorController editorForFile:p];
e = [editorController internalEditorForFile:p];
if( e == nil )
{