diff options
author | Sven Weidauer <sven.weidauer@gmail.com> | 2011-05-19 16:04:54 +0000 |
---|---|---|
committer | Sven Weidauer <sven.weidauer@gmail.com> | 2011-05-19 16:04:54 +0000 |
commit | ed7e65c74b12758476495068b35490eb2bd14b10 (patch) | |
tree | 848a855f32c1b08014cb573a05306f148c84d258 /cocoa | |
parent | 65dc81668cb70145d32f762f95cdb73fc708d11f (diff) | |
download | netsurf-ed7e65c74b12758476495068b35490eb2bd14b10.tar.gz netsurf-ed7e65c74b12758476495068b35490eb2bd14b10.tar.bz2 |
Netsurf now appears in the 'Open with' menu for HTML files.
svn path=/trunk/netsurf/; revision=12435
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> |