Search
lxdream.org :: lxdream :: r797:3bb52a384b64
lxdream 0.9.1
released Jun 29
Download Now
changeset797:3bb52a384b64
parent796:a2dc83592467
child798:eb5c0d1863cd
authornkeynes
dateFri Aug 01 03:58:25 2008 +0000 (11 years ago)
OS X: Add file association with .dst files and support opening them from the finder
Info.plist.in
pixmaps/lxdst.icns
src/cocoaui/cocoaui.c
1.1 --- a/Info.plist.in Wed Jul 30 22:50:44 2008 +0000
1.2 +++ b/Info.plist.in Fri Aug 01 03:58:25 2008 +0000
1.3 @@ -4,6 +4,25 @@
1.4 <dict>
1.5 <key>CFBundleDevelopmentRegion</key>
1.6 <string>English</string>
1.7 + <key>CFBundleDocumentTypes</key>
1.8 + <array>
1.9 + <dict>
1.10 + <key>CFBundleTypeExtensions</key>
1.11 + <array>
1.12 + <string>dst</string>
1.13 + </array>
1.14 + <key>CFBundleTypeIconFile</key>
1.15 + <string>lxdst.icns</string>
1.16 + <key>CFBundleTypeName</key>
1.17 + <string>Lxdream Save State</string>
1.18 + <key>CFBundleTypeRole</key>
1.19 + <string>Editor</string>
1.20 + <key>LSItemContentTypes</key>
1.21 + <array>
1.22 + <string>org.lxdream.savestate</string>
1.23 + </array>
1.24 + </dict>
1.25 + </array>
1.26 <key>CFBundleExecutable</key>
1.27 <string>lxdream</string>
1.28 <key>CFBundleGetInfoString</key>
1.29 @@ -28,5 +47,29 @@
1.30 <string>MainMenu</string>
1.31 <key>NSPrincipalClass</key>
1.32 <string>NSApplication</string>
1.33 + <key>UTExportedTypeDeclarations</key>
1.34 + <array>
1.35 + <dict>
1.36 + <key>UTTypeConformsTo</key>
1.37 + <array>
1.38 + <string>public.data</string>
1.39 + </array>
1.40 + <key>UTTypeDescription</key>
1.41 + <string>Lxdream Save State</string>
1.42 + <key>UTTypeIconFile</key>
1.43 + <string>lxdst.icns</string>
1.44 + <key>UTTypeIdentifier</key>
1.45 + <string>org.lxdream.savestate</string>
1.46 + <key>UTTypeReferenceURL</key>
1.47 + <string>http://www.lxdream.org/wiki/</string>
1.48 + <key>UTTypeTagSpecification</key>
1.49 + <dict>
1.50 + <key>public.filename-extension</key>
1.51 + <array>
1.52 + <string>dst</string>
1.53 + </array>
1.54 + </dict>
1.55 + </dict>
1.56 + </array>
1.57 </dict>
1.58 </plist>
2.1 Binary file pixmaps/lxdst.icns has changed
3.1 --- a/src/cocoaui/cocoaui.c Wed Jul 30 22:50:44 2008 +0000
3.2 +++ b/src/cocoaui/cocoaui.c Fri Aug 01 03:58:25 2008 +0000
3.3 @@ -181,6 +181,18 @@
3.4 display_set_focused( FALSE );
3.5 [((LxdreamMainWindow *)[NSApp mainWindow]) setIsGrabbed: NO];
3.6 }
3.7 +- (BOOL)application: (NSApplication *)app openFile: (NSString *)filename
3.8 +{
3.9 + const gchar *cname = [filename UTF8String];
3.10 + if( file_load_magic(cname) ) {
3.11 + // Queue up a run event
3.12 + cocoa_gui_run_later();
3.13 + return YES;
3.14 + } else {
3.15 + return NO;
3.16 + }
3.17 +
3.18 +}
3.19 - (void) about_action: (id)sender
3.20 {
3.21 NSArray *keys = [NSArray arrayWithObjects: @"Version", @"Copyright", nil];
.