diff options
Diffstat (limited to 'cocoa')
-rw-r--r-- | cocoa/NetSurfAppDelegate.m | 7 | ||||
-rw-r--r-- | cocoa/res/NetSurf-Info.plist | 17 |
2 files changed, 23 insertions, 1 deletions
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 @@ <key>CFBundleDevelopmentRegion</key> <string>English</string> <key>CFBundleDocumentTypes</key> - <array/> + <array> + <dict> + <key>CFBundleTypeExtensions</key> + <array/> + <key>CFBundleTypeMIMETypes</key> + <array/> + <key>CFBundleTypeName</key> + <string>HTML</string> + <key>CFBundleTypeRole</key> + <string>Viewer</string> + <key>LSItemContentTypes</key> + <array> + <string>public.html</string> + </array> + </dict> + </array> <key>CFBundleExecutable</key> <string>${EXECUTABLE_NAME}</string> <key>CFBundleIconFile</key> |