diff --git a/ChangeLog b/ChangeLog index 433e9c309..3aa29d17a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,10 @@ * Model/GMAppKit.m (-initWithModelUnarchiver:): Don't add ourselves to the superview if we are the contentView of an NSBox. + * Tools/example.m ([ExampleServices -openURL:userData:error:]): + Get browser from defualts. Use mozilla if non. (Modified patch from + Stefan Urbanek). + 2002-08-24 Adam Fedor * Source/NSGraphicsContext.m: More documentation. diff --git a/Tools/example.m b/Tools/example.m index d2eb10b7c..cc10f5c83 100644 --- a/Tools/example.m +++ b/Tools/example.m @@ -33,6 +33,7 @@ #include #include #include +#include #include #include @@ -62,6 +63,8 @@ NSArray *args; NSString *path; NSTask *task; + NSString *browser; + NSUserDefaults *defs = [NSUserDefaults standardUserDefaults]; types = [pb types]; if (![types containsObject: NSStringPboardType]) @@ -77,11 +80,16 @@ return; } + browser = [defs objectForKey:@"NSWebBrowser"]; + if(!browser || [browser isEqualToString:@""]) + { + browser = @"mozilla -remote \"openURL(%@,new-window)\""; + } + path = @"/bin/sh"; args = [NSArray arrayWithObjects: @"-c", - [NSString stringWithFormat: - @"netscape -noraise -remote \"openURL(%@,new-window)\"", url], + [NSString stringWithFormat: browser, url], nil]; task = [NSTask launchedTaskWithLaunchPath: path