From ed7e65c74b12758476495068b35490eb2bd14b10 Mon Sep 17 00:00:00 2001 From: Sven Weidauer Date: Thu, 19 May 2011 16:04:54 +0000 Subject: Netsurf now appears in the 'Open with' menu for HTML files. svn path=/trunk/netsurf/; revision=12435 --- cocoa/NetSurfAppDelegate.m | 7 +++++++ cocoa/res/NetSurf-Info.plist | 17 ++++++++++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/cocoa/NetSurfAppDelegate.m b/cocoa/NetSurfAppDelegate.m index 2d15d05a3..80f29618e 100644 --- a/cocoa/NetSurfAppDelegate.m +++ b/cocoa/NetSurfAppDelegate.m @@ -122,5 +122,12 @@ forEventClass:kInternetEventClass andEventID:kAEGetURL]; } +- (BOOL)application:(NSApplication *)theApplication openFile:(NSString *)filename +{ + NSURL *url = [NSURL fileURLWithPath: filename]; + browser_window_create( [[url absoluteString] UTF8String], NULL, NULL, true, false ); + return YES; +} + @end diff --git a/cocoa/res/NetSurf-Info.plist b/cocoa/res/NetSurf-Info.plist index 159e8e2ca..60bf6820e 100644 --- a/cocoa/res/NetSurf-Info.plist +++ b/cocoa/res/NetSurf-Info.plist @@ -5,7 +5,22 @@ CFBundleDevelopmentRegion English CFBundleDocumentTypes - + + + CFBundleTypeExtensions + + CFBundleTypeMIMETypes + + CFBundleTypeName + HTML + CFBundleTypeRole + Viewer + LSItemContentTypes + + public.html + + + CFBundleExecutable ${EXECUTABLE_NAME} CFBundleIconFile -- cgit v1.2.3