OSX: associate abr file, fix shell open file when process is running, fix shutdown
This commit is contained in:
@@ -25,7 +25,31 @@
|
||||
<true/>
|
||||
<key>LSItemContentTypes</key>
|
||||
<array>
|
||||
<string>public.panorama-image</string>
|
||||
<string>com.panopainter.image</string>
|
||||
</array>
|
||||
<key>LSTypeIsPackage</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeExtensions</key>
|
||||
<array>
|
||||
<string>abr</string>
|
||||
</array>
|
||||
<key>CFBundleTypeIconFile</key>
|
||||
<string></string>
|
||||
<key>CFBundleTypeIconFiles</key>
|
||||
<array/>
|
||||
<key>CFBundleTypeMIMETypes</key>
|
||||
<array/>
|
||||
<key>CFBundleTypeName</key>
|
||||
<string>PanoPainter Brushes</string>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Editor</string>
|
||||
<key>LSIsAppleDefaultForType</key>
|
||||
<false/>
|
||||
<key>LSItemContentTypes</key>
|
||||
<array>
|
||||
<string>com.panopainter.abr</string>
|
||||
</array>
|
||||
<key>LSTypeIsPackage</key>
|
||||
<integer>0</integer>
|
||||
@@ -71,7 +95,7 @@
|
||||
<key>UTTypeIconFiles</key>
|
||||
<array/>
|
||||
<key>UTTypeIdentifier</key>
|
||||
<string>public.panorama-image</string>
|
||||
<string>com.panopainter.image</string>
|
||||
<key>UTTypeTagSpecification</key>
|
||||
<dict>
|
||||
<key>com.apple.ostype</key>
|
||||
@@ -88,6 +112,35 @@
|
||||
</array>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>UTTypeConformsTo</key>
|
||||
<array>
|
||||
<string>public.data</string>
|
||||
</array>
|
||||
<key>UTTypeDescription</key>
|
||||
<string>PanoPainter Brushes</string>
|
||||
<key>UTTypeIconFile</key>
|
||||
<string>pp-icon-square</string>
|
||||
<key>UTTypeIconFiles</key>
|
||||
<array/>
|
||||
<key>UTTypeIdentifier</key>
|
||||
<string>com.panopainter.abr</string>
|
||||
<key>UTTypeTagSpecification</key>
|
||||
<dict>
|
||||
<key>com.apple.ostype</key>
|
||||
<array>
|
||||
<string>****</string>
|
||||
</array>
|
||||
<key>public.filename-extension</key>
|
||||
<array>
|
||||
<string>abr</string>
|
||||
</array>
|
||||
<key>public.mime-type</key>
|
||||
<array>
|
||||
<string>preset/abr</string>
|
||||
</array>
|
||||
</dict>
|
||||
</dict>
|
||||
</array>
|
||||
<key>UTImportedTypeDeclarations</key>
|
||||
<array>
|
||||
@@ -118,6 +171,33 @@
|
||||
</array>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>UTTypeConformsTo</key>
|
||||
<array>
|
||||
<string>public.data</string>
|
||||
</array>
|
||||
<key>UTTypeDescription</key>
|
||||
<string>PanoPainter Brushes</string>
|
||||
<key>UTTypeIconFile</key>
|
||||
<string>pp-icon-square</string>
|
||||
<key>UTTypeIdentifier</key>
|
||||
<string>com.panopainter.abr</string>
|
||||
<key>UTTypeTagSpecification</key>
|
||||
<dict>
|
||||
<key>com.apple.ostype</key>
|
||||
<array>
|
||||
<string>****</string>
|
||||
</array>
|
||||
<key>public.filename-extension</key>
|
||||
<array>
|
||||
<string>abr</string>
|
||||
</array>
|
||||
<key>public.mime-type</key>
|
||||
<array>
|
||||
<string>preset/abr</string>
|
||||
</array>
|
||||
</dict>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
||||
|
||||
@@ -169,8 +169,9 @@ std::mutex task_mutex;
|
||||
- (void)terminateGL
|
||||
{
|
||||
CGLLockContext([[self openGLContext] CGLContextObj]);
|
||||
CVDisplayLinkRelease(dl);
|
||||
App::I.terminate();
|
||||
CGLUnlockContext([[self openGLContext] CGLContextObj]);
|
||||
CVDisplayLinkRelease(dl);
|
||||
}
|
||||
|
||||
// This is the renderer output callback function
|
||||
@@ -445,7 +446,6 @@ static CVReturn MyDisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTime
|
||||
@implementation Controller
|
||||
- (void)windowWillClose:(NSNotification *)notification
|
||||
{
|
||||
App::I.terminate();
|
||||
[[NSApplication sharedApplication] terminate:nil];
|
||||
}
|
||||
-(BOOL)windowShouldClose:(NSWindow *)sender
|
||||
@@ -472,7 +472,8 @@ static CVReturn MyDisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTime
|
||||
- (BOOL)application:(NSApplication *)sender openFile:(NSString *)filename
|
||||
{
|
||||
LOG("open file %s", [filename UTF8String]);
|
||||
//App::I.open_document([filename UTF8String]);
|
||||
if (view && view->gl_ready)
|
||||
App::I.open_document([filename UTF8String]);
|
||||
file2open = filename;
|
||||
return YES;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user