mirror of
https://github.com/gnustep/apps-projectcenter.git
synced 2025-02-21 19:01:18 +00:00
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:
parent
4ee31e2a7c
commit
6b2f8c69f7
3 changed files with 24 additions and 18 deletions
|
@ -42,6 +42,7 @@
|
||||||
|
|
||||||
- (void)setProject:(PCProject *)aProject;
|
- (void)setProject:(PCProject *)aProject;
|
||||||
|
|
||||||
|
- (PCEditor *)internalEditorForFile:(NSString *)path;
|
||||||
- (PCEditor *)editorForFile:(NSString *)path;
|
- (PCEditor *)editorForFile:(NSString *)path;
|
||||||
- (NSArray *)allEditors;
|
- (NSArray *)allEditors;
|
||||||
|
|
||||||
|
|
|
@ -79,6 +79,27 @@
|
||||||
project = aProject;
|
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
|
- (PCEditor *)editorForFile:(NSString *)path
|
||||||
{
|
{
|
||||||
NSUserDefaults *ud = [NSUserDefaults standardUserDefaults];
|
NSUserDefaults *ud = [NSUserDefaults standardUserDefaults];
|
||||||
|
@ -89,23 +110,7 @@
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
PCEditor *editor;
|
[self internalEditorForFile:path];
|
||||||
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -646,7 +646,7 @@
|
||||||
[fileNameField setStringValue:fileName];
|
[fileNameField setStringValue:fileName];
|
||||||
|
|
||||||
// Show the file in the internal editor!
|
// Show the file in the internal editor!
|
||||||
e = [editorController editorForFile:p];
|
e = [editorController internalEditorForFile:p];
|
||||||
|
|
||||||
if( e == nil )
|
if( e == nil )
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue