mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 22:40:38 +00:00
implement openFiles: delegate
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@35355 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
9dbc0b0dfc
commit
6dc25f660a
3 changed files with 34 additions and 6 deletions
|
@ -591,6 +591,32 @@ static NSString *disabledName = @".GNUstepDisabled";
|
|||
return result;
|
||||
}
|
||||
|
||||
- (void) application: (NSApplication*)theApp
|
||||
openFiles: (NSArray*)files
|
||||
{
|
||||
id del = [NSApp delegate];
|
||||
|
||||
if ([files count] == 1)
|
||||
{
|
||||
[self application: theApp openFile: [files objectAtIndex:0]];
|
||||
}
|
||||
else if ([del respondsToSelector: _cmd])
|
||||
{
|
||||
[del application: theApp openFiles: files];
|
||||
}
|
||||
else
|
||||
{
|
||||
NSString *filePath;
|
||||
NSEnumerator *en = [files objectEnumerator];
|
||||
|
||||
while ((filePath = (NSString *)[en nextObject]) != nil)
|
||||
{
|
||||
[self application: theApp openFile: filePath];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
- (BOOL) application: (NSApplication*)theApp
|
||||
openFileWithoutUI: (NSString*)file
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue