Search
lxdream.org :: lxdream/src/cocoaui/cocoaui.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/cocoaui/cocoaui.c
changeset 797:3bb52a384b64
prev785:00235838aaec
next837:4eae2ddccf9c
author nkeynes
date Fri Aug 01 03:58:25 2008 +0000 (12 years ago)
permissions -rw-r--r--
last change OS X: Add file association with .dst files and support opening them from the finder
file annotate diff log raw
1.1 --- a/src/cocoaui/cocoaui.c Tue Jul 29 08:50:49 2008 +0000
1.2 +++ b/src/cocoaui/cocoaui.c Fri Aug 01 03:58:25 2008 +0000
1.3 @@ -181,6 +181,18 @@
1.4 display_set_focused( FALSE );
1.5 [((LxdreamMainWindow *)[NSApp mainWindow]) setIsGrabbed: NO];
1.6 }
1.7 +- (BOOL)application: (NSApplication *)app openFile: (NSString *)filename
1.8 +{
1.9 + const gchar *cname = [filename UTF8String];
1.10 + if( file_load_magic(cname) ) {
1.11 + // Queue up a run event
1.12 + cocoa_gui_run_later();
1.13 + return YES;
1.14 + } else {
1.15 + return NO;
1.16 + }
1.17 +
1.18 +}
1.19 - (void) about_action: (id)sender
1.20 {
1.21 NSArray *keys = [NSArray arrayWithObjects: @"Version", @"Copyright", nil];
.