mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 08:30:59 +00:00
(main): Remove NSTask-based app launching code; always use NSWorkspace to lanuch applications.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@18596 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
9bd938e563
commit
d3140f2622
2 changed files with 10 additions and 20 deletions
|
@ -1,3 +1,9 @@
|
|||
2004-02-14 22:56 Matt Rice <ratmice@yahoo.com>
|
||||
Alexander Malmberg <alexander@malmberg.org>
|
||||
|
||||
* Tools/gopen.m (main): Remove NSTask-based app launching code; always
|
||||
use [NSWorkspace -launchApplication:] to launch applications.
|
||||
|
||||
2004-02-14 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/NSOutlineView.m: (-reloadItem:reloadChildren:) Simplified
|
||||
|
|
|
@ -168,31 +168,15 @@ main(int argc, char** argv, char **env_c)
|
|||
|| [ext isEqualToString: @"debug"]
|
||||
|| [ext isEqualToString: @"profile"])
|
||||
{
|
||||
NSString *appName =
|
||||
[[arg lastPathComponent] stringByDeletingPathExtension];
|
||||
NSString *executable =
|
||||
[arg stringByAppendingPathComponent: appName];
|
||||
|
||||
if ([fm fileExistsAtPath: arg])
|
||||
{
|
||||
if ([NSTask launchedTaskWithLaunchPath: executable
|
||||
arguments: nil] == nil)
|
||||
{
|
||||
NSLog(@"Unable to launch: %@",arg);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
[workspace launchApplication: arg];
|
||||
}
|
||||
[workspace launchApplication: arg];
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
if (![workspace openFile: arg
|
||||
withApplication: application])
|
||||
{
|
||||
// no recognized extension,
|
||||
// run application indicated by environment var.
|
||||
// no recognized extension,
|
||||
// run application indicated by environment var.
|
||||
NSLog(@"Opening %@ with %@",arg,editor);
|
||||
[workspace openFile: arg withApplication: editor];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue