From d109ab268f7c7d140bf76d30b4526ef836e070fe Mon Sep 17 00:00:00 2001
From: Simon Howard
Date: Sat, 9 Jan 2010 18:38:48 +0000
Subject: Hook in AppController as delegate for application, add file
associations to property list file.
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 1792
---
pkg/osx/AppController.m | 1 +
pkg/osx/Info.plist.in | 30 +++++++++++++++++++++
.../Contents/Resources/launcher.nib/classes.nib | 6 +++++
.../Contents/Resources/launcher.nib/info.nib | 4 +--
.../Resources/launcher.nib/keyedobjects.nib | Bin 17192 -> 17360 bytes
5 files changed, 39 insertions(+), 2 deletions(-)
(limited to 'pkg')
diff --git a/pkg/osx/AppController.m b/pkg/osx/AppController.m
index 81dc56a9..bf72af63 100644
--- a/pkg/osx/AppController.m
+++ b/pkg/osx/AppController.m
@@ -76,6 +76,7 @@
- (BOOL)application:(NSApplication *)application openFile:(NSString *)fileName
{
+ printf("File selected to open: '%s'\n", [fileName UTF8String]);
return NO;
}
diff --git a/pkg/osx/Info.plist.in b/pkg/osx/Info.plist.in
index a7a33b84..8b19777f 100644
--- a/pkg/osx/Info.plist.in
+++ b/pkg/osx/Info.plist.in
@@ -26,5 +26,35 @@
NSApplication
NSMainNibFile
launcher
+
+
+
+ CFBundleDocumentTypes
+
+
+ CFBundleTypeName
+ Doom WAD file
+ CFBundleTypeIconFile
+ app.icns
+ CFBundleTypeRole
+ Viewer
+ CFBundleTypeExtensions
+
+ wad
+
+
+
+ CFBundleTypeName
+ Dehacked patch
+ CFBundleTypeIconFile
+ app.icns
+ CFBundleTypeRole
+ Viewer
+ CFBundleTypeExtensions
+
+ deh
+
+
+
diff --git a/pkg/osx/app-skeleton/Contents/Resources/launcher.nib/classes.nib b/pkg/osx/app-skeleton/Contents/Resources/launcher.nib/classes.nib
index 9092e44b..3ff47e71 100644
--- a/pkg/osx/app-skeleton/Contents/Resources/launcher.nib/classes.nib
+++ b/pkg/osx/app-skeleton/Contents/Resources/launcher.nib/classes.nib
@@ -1,5 +1,11 @@
{
IBClasses = (
+ {
+ CLASS = AppController;
+ LANGUAGE = ObjC;
+ OUTLETS = {launcherManager = id; };
+ SUPERCLASS = NSObject;
+ },
{CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; },
{
ACTIONS = {closeConfigWindow = id; openConfigWindow = id; };
diff --git a/pkg/osx/app-skeleton/Contents/Resources/launcher.nib/info.nib b/pkg/osx/app-skeleton/Contents/Resources/launcher.nib/info.nib
index 63067b23..aecf812a 100644
--- a/pkg/osx/app-skeleton/Contents/Resources/launcher.nib/info.nib
+++ b/pkg/osx/app-skeleton/Contents/Resources/launcher.nib/info.nib
@@ -3,7 +3,7 @@
IBDocumentLocation
- 172 70 612 260 0 0 1440 878
+ 170 140 612 260 0 0 1440 878
IBEditorPositions
29
@@ -13,9 +13,9 @@
446.1
IBOpenObjects
+ 21
29
227
- 21
IBSystem Version
8S2167
diff --git a/pkg/osx/app-skeleton/Contents/Resources/launcher.nib/keyedobjects.nib b/pkg/osx/app-skeleton/Contents/Resources/launcher.nib/keyedobjects.nib
index 85980d2d..345ce976 100644
Binary files a/pkg/osx/app-skeleton/Contents/Resources/launcher.nib/keyedobjects.nib and b/pkg/osx/app-skeleton/Contents/Resources/launcher.nib/keyedobjects.nib differ
--
cgit v1.2.3