Fix bug launching apps for services. mingw unicode fix.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@22051 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-Macdonald 2005-11-20 20:29:06 +00:00
parent 86cb486769
commit c15a675fbc
3 changed files with 19 additions and 4 deletions

View file

@ -1,3 +1,9 @@
2005-11-20 Richard Frith-Macdonald <rfm@gnu.org>
* Source/GSServicesManager.m: GSContactApplication()
Fix bug launching application ... if it's not available in the
services bundle, locate application by name (from the port).
2005-11-18 fabien <fabien@sonappart.net>
* Source/NSSliderCell.m: Improved documentation

View file

@ -1419,6 +1419,10 @@ static NSString *disabledName = @".GNUstepDisabled";
* it will be inferred from appName ... by convention, applications
* use their own name (minus any path or extension) for this.
* </p>
* <p>If appName is nil or cannot be launched, this attempts to locate any
* application in a standard location whose name matches port and launch
* that application.
* </p>
* <p>The value of expire provides a timeout in case the application cannot
* be contacted promptly. If it is omitted, a thirty second timeout is
* used.
@ -1456,9 +1460,14 @@ GSContactApplication(NSString *appName, NSString *port, NSDate *expire)
}
if (app == nil)
{
if ([[NSWorkspace sharedWorkspace] launchApplication: appName] == NO)
if (appName == nil
|| [[NSWorkspace sharedWorkspace] launchApplication: appName] == NO)
{
return nil; /* Unable to launch. */
if (port == nil
|| [[NSWorkspace sharedWorkspace] launchApplication: port] == NO)
{
return nil; /* Unable to launch. */
}
}
NS_DURING

View file

@ -1301,8 +1301,8 @@ inFileViewerRootedAtPath: (NSString*)rootFullpath
{
end++;
}
len = (end - ptr) * sizeof(unichar);
path = [mgr stringWithFileSystemRepresentation: (char*)ptr length: len];
len = (end - ptr);
path = [mgr stringWithFileSystemRepresentation: ptr length: len];
[names addObject: path];
}
if (base != buf)