diff --git a/frontends/gnustep/AppDelegate.m b/frontends/gnustep/AppDelegate.m index 347081bef..a72fd6b87 100644 --- a/frontends/gnustep/AppDelegate.m +++ b/frontends/gnustep/AppDelegate.m @@ -132,7 +132,7 @@ static NSMenuItem *menuItemForItem(id item) { object: nil]; [self bookmarksUpdated: nil]; [self historyUpdated: nil]; - [self didTapNewWindow: nil]; + //[self didTapNewWindow: nil]; } -(void)didTapNewWindow: (id)sender { @@ -298,6 +298,50 @@ static NSMenuItem *menuItemForItem(id item) { } } +- (BOOL) application: (NSApplication *)application + openFile: (NSString *)fileName +{ + NSArray *args; + NSString *path; + NSTask *task; + + [self openDeveloperFileAtPath: fileName]; + return YES; + +} + +- (void) openURL: (NSPasteboard*)pb + userData: (NSString*)ud + error: (NSString**)err +{ + NSString *url; + NSArray *types; + NSArray *args; + NSString *path; + NSTask *task; + NSString *pboardString; + + *err = nil; + types = [pb types]; + + if (![types containsObject:NSStringPboardType] || !(pboardString = [pb stringForType:NSStringPboardType])) + { + *err = NSLocalizedString(@"Error: Pasteboard doesn't contain a string.", + @"Pasteboard couldn't give string."); + return; + } + + url = [pb stringForType: NSStringPboardType]; + if (url == nil) + { + *err = @"No string value supplied on pasteboard"; + return; + } + + [self openDeveloperFileAtPath: url]; + return; +} + @end int main(int argc, char **argv) {