// // NSRunningApplication+NGA.m // SCMMenuExtra // // Created by Michael Bishop on 5/25/11. // Copyright 2011 Numerical Garden LLC. All rights reserved. // #import "NSRunningApplication+NGAAdditions.h" @implementation NSRunningApplication (NGAAdditions) +(NSRunningApplication*)foregroundApplication { NSDictionary * attributes = [[NSWorkspace sharedWorkspace] activeApplication]; NSNumber * foregroundPID = [attributes objectForKey:@"NSApplicationProcessIdentifier"]; return [NSRunningApplication runningApplicationWithProcessIdentifier:[foregroundPID intValue]]; } -(NSBundle*)bundle { return [NSBundle bundleWithURL:self.bundleURL]; } -(BOOL)isAgent { return [[[self.bundle infoDictionary] objectForKey:@"LSUIElement"] boolValue] == YES; } @end
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 20722 | jdputsch | initial branch, prep for -Zapp= support | ||
//guest/michael_bishop/MacMenu/src/NGAUtilities/Source/NSRunningApplication+NGAAdditions.m | |||||
#1 | 8331 | Matt Attaway |
Adding initial version of MacMenu for Perforce MacMenu is a helpful Perforce client that sits in your toolbar. It allows you to run standard Perforce operations on the document that is open the currently active editor/viewer. |