Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
55 changed files
with
1,695 additions
and
511 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
92 changes: 92 additions & 0 deletions
92
code/apps/Managed Software Center/Managed Software Center/CocoaWrapper.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
# -*- coding: utf-8 -*- | ||
# | ||
# CocoaWrapper.py | ||
# MunkiStatus | ||
# | ||
# Created by Greg Neagle on 6/26/17. | ||
# Copyright (c) 2017 The Munki Project. All rights reserved. | ||
# | ||
|
||
"""Selectively import Cocoa symbols to speed up app launch. | ||
Idea from Per Olofsson's AutoDMG""" | ||
|
||
# PyLint cannot properly find names inside Cocoa libraries, so issues bogus | ||
# No name 'Foo' in module 'Bar' warnings. Disable them. | ||
# pylint: disable=no-name-in-module | ||
# | ||
# disable unused-import warning, since we don't use any of these here. | ||
# pylint: disable=unused-import | ||
|
||
# put all Foundation imports used by the project here | ||
from Foundation import ( | ||
NSAppleEventManager, | ||
NSBundle, | ||
NSCachesDirectory, | ||
NSData, | ||
NSDate, | ||
NSDateFormatter, | ||
NSDateFormatterBehavior10_4, | ||
NSFileHandle, | ||
NSFileManager, | ||
NSInsetRect, | ||
NSLocalizedString, | ||
NSLog, | ||
NSMakePoint, | ||
NSMakeRect, | ||
NSMakeSize, | ||
NSMinX, | ||
NSMinY, | ||
NSMutableArray, | ||
NSObject, | ||
NSOffsetRect, | ||
NSPoint, | ||
NSPredicate, | ||
NSString, | ||
NSTimer, | ||
NSURL, | ||
NSURLFileScheme, | ||
NSURLRequest, | ||
NSURLRequestReloadIgnoringLocalCacheData, | ||
NSUTF8StringEncoding, | ||
NSUserDomainMask, | ||
NSUserName, | ||
NSZeroRect, | ||
kCFDateFormatterLongStyle, | ||
kCFDateFormatterShortStyle, | ||
) | ||
|
||
# put all AppKit imports used by the project here | ||
from AppKit import ( | ||
NSAlert, | ||
NSAlertAlternateReturn, | ||
NSAlertDefaultReturn, | ||
NSAlertFirstButtonReturn, | ||
NSAlertOtherReturn, | ||
NSAlertSecondButtonReturn, | ||
NSApp, | ||
NSApplication, | ||
NSBezierPath, | ||
NSBitmapImageRep, | ||
NSButton, | ||
NSButtonCell, | ||
NSColor, | ||
NSCompositeCopy, | ||
NSCriticalAlertStyle, | ||
NSDistributedNotificationCenter, | ||
NSDragOperationAll, | ||
NSFontAttributeName, | ||
NSFontManager, | ||
NSGraphicsContext, | ||
NSImage, | ||
NSNotFound, | ||
NSNotificationDeliverImmediately, | ||
NSNotificationPostToAllSessions, | ||
NSNotificationSuspensionBehaviorDeliverImmediately, | ||
NSOnState, | ||
NSPNGFileType, | ||
NSPasteboard, | ||
NSScreen, | ||
NSUserNotificationCenter, | ||
NSWindowController, | ||
NSWorkspace, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.