Skip to content

Commit

Permalink
fix cruft/leaks from earlier hasty commit
Browse files Browse the repository at this point in the history
  • Loading branch information
protocool committed Jun 23, 2010
1 parent c2ae6bf commit 5549ec7
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 19 deletions.
16 changes: 8 additions & 8 deletions AckMate.xcodeproj/project.pbxproj
Expand Up @@ -24,8 +24,8 @@
69C43B0B112A361C007AC1C1 /* JPAckProcess+Parsing.m.rl in Sources */ = {isa = PBXBuildFile; fileRef = 69C43B05112A361C007AC1C1 /* JPAckProcess+Parsing.m.rl */; };
69C43B0C112A361C007AC1C1 /* JPAckResultSource.m in Sources */ = {isa = PBXBuildFile; fileRef = 69C43B07112A361C007AC1C1 /* JPAckResultSource.m */; };
69C43B0D112A361C007AC1C1 /* JPAckWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 69C43B09112A361C007AC1C1 /* JPAckWindowController.m */; };
69D7008D118115CA008A6125 /* ackmateCollapse.pdf in Resources */ = {isa = PBXBuildFile; fileRef = 69D7008B118115CA008A6125 /* ackmateCollapse.pdf */; };
69D7008E118115CA008A6125 /* ackmateExpand.pdf in Resources */ = {isa = PBXBuildFile; fileRef = 69D7008C118115CA008A6125 /* ackmateExpand.pdf */; };
69D7008D118115CA008A6125 /* ackmateExpanded.pdf in Resources */ = {isa = PBXBuildFile; fileRef = 69D7008B118115CA008A6125 /* ackmateExpanded.pdf */; };
69D7008E118115CA008A6125 /* ackmateCollapsed.pdf in Resources */ = {isa = PBXBuildFile; fileRef = 69D7008C118115CA008A6125 /* ackmateCollapsed.pdf */; };
8D5B49B0048680CD000E48DA /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C167DFE841241C02AAC07 /* InfoPlist.strings */; };
8D5B49B4048680CD000E48DA /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7ADFEA557BF11CA2CBB /* Cocoa.framework */; };
/* End PBXBuildFile section */
Expand Down Expand Up @@ -93,8 +93,8 @@
69C43B07112A361C007AC1C1 /* JPAckResultSource.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JPAckResultSource.m; sourceTree = "<group>"; };
69C43B08112A361C007AC1C1 /* JPAckWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JPAckWindowController.h; sourceTree = "<group>"; };
69C43B09112A361C007AC1C1 /* JPAckWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JPAckWindowController.m; sourceTree = "<group>"; };
69D7008B118115CA008A6125 /* ackmateCollapse.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; path = ackmateCollapse.pdf; sourceTree = "<group>"; };
69D7008C118115CA008A6125 /* ackmateExpand.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; path = ackmateExpand.pdf; sourceTree = "<group>"; };
69D7008B118115CA008A6125 /* ackmateExpanded.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; path = ackmateExpanded.pdf; sourceTree = "<group>"; };
69D7008C118115CA008A6125 /* ackmateCollapsed.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; path = ackmateCollapsed.pdf; sourceTree = "<group>"; };
8D5B49B6048680CD000E48DA /* AckMate.tmplugin */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = AckMate.tmplugin; sourceTree = BUILT_PRODUCTS_DIR; };
8D5B49B7048680CD000E48DA /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
D2F7E65807B2D6F200F64583 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = /System/Library/Frameworks/CoreData.framework; sourceTree = "<absolute>"; };
Expand Down Expand Up @@ -192,8 +192,8 @@
69B8C4BC112A370200EB45AF /* bundle_extras */ = {
isa = PBXGroup;
children = (
69D7008B118115CA008A6125 /* ackmateCollapse.pdf */,
69D7008C118115CA008A6125 /* ackmateExpand.pdf */,
69D7008B118115CA008A6125 /* ackmateExpanded.pdf */,
69D7008C118115CA008A6125 /* ackmateCollapsed.pdf */,
69B8C4BD112A371A00EB45AF /* ackmate_ack.autogenerated */,
);
path = bundle_extras;
Expand Down Expand Up @@ -313,8 +313,8 @@
8D5B49B0048680CD000E48DA /* InfoPlist.strings in Resources */,
69B8C4BE112A371A00EB45AF /* ackmate_ack.autogenerated in Resources */,
69B8C4E6112A383600EB45AF /* JPAckWindow.xib in Resources */,
69D7008D118115CA008A6125 /* ackmateCollapse.pdf in Resources */,
69D7008E118115CA008A6125 /* ackmateExpand.pdf in Resources */,
69D7008D118115CA008A6125 /* ackmateExpanded.pdf in Resources */,
69D7008E118115CA008A6125 /* ackmateCollapsed.pdf in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down
File renamed without changes.
File renamed without changes.
9 changes: 0 additions & 9 deletions source/controllers/AckMatePlugin.m
Expand Up @@ -23,15 +23,6 @@ - (id)initWithPlugInController:(id <TMPlugInController>)aController
ackWindows = [[NSMutableDictionary alloc] initWithCapacity:0];
[self installMenuItems];
[self loadPluginPreferences];

// Load up our bundle images
NSBundle* pluginBundle = [NSBundle bundleForClass:[self class]];
NSString* collapseImagePath = [pluginBundle pathForResource:@"ackmateCollapse" ofType:@"pdf"];
NSImage* collapseImage = [[NSImage alloc] initWithContentsOfFile:collapseImagePath];
[collapseImage setName:@"ackmateCollapse"];
NSString* expandImagePath = [pluginBundle pathForResource:@"ackmateExpand" ofType:@"pdf"];
NSImage* expandImage = [[NSImage alloc] initWithContentsOfFile:expandImagePath];
[expandImage setName:@"ackmateExpand"];
}
return self;
}
Expand Down
2 changes: 1 addition & 1 deletion source/models/JPAckResult.m
Expand Up @@ -20,7 +20,7 @@ + (id)resultErrorWithString:(NSString*)errorString

+ (id)resultFileWithName:(NSString*)fileName_
{
NSString* fileName = ([fileName_ hasPrefix:@"/"]) ? [[fileName_ substringFromIndex:1] copy] : [fileName_ copy]; // blech
NSString* fileName = ([fileName_ hasPrefix:@"/"]) ? [fileName_ substringFromIndex:1] : fileName_; // blech
return [[[JPAckResult alloc] initWithType:JPResultTypeFilename lineNumber:nil content:fileName ranges:nil ] autorelease];
}

Expand Down
17 changes: 16 additions & 1 deletion source/views/JPAckResultCell.m
Expand Up @@ -14,6 +14,20 @@ - (NSRect)drawingRectForBounds:(NSRect)theRect honestly:(BOOL)honestly;

@implementation JPAckResultCell

static NSImage* sectionExpanded = nil;
static NSImage* sectionCollapsed = nil;

+ (void)initialize
{
// Load up our bundle images
NSBundle* pluginBundle = [NSBundle bundleForClass:self];

NSString* expandedImagePath = [pluginBundle pathForResource:@"ackmateExpanded" ofType:@"pdf"];
sectionExpanded = [[NSImage alloc] initWithContentsOfFile:expandedImagePath];
NSString* collapsedImagePath = [pluginBundle pathForResource:@"ackmateCollapsed" ofType:@"pdf"];
sectionCollapsed = [[NSImage alloc] initWithContentsOfFile:collapsedImagePath];
}

- (void)drawInteriorWithFrame:(NSRect)cellFrame inView:(NSView*)controlView
{
[self drawFillWithFrame:cellFrame inView:controlView];
Expand Down Expand Up @@ -55,7 +69,8 @@ - (void)drawFillWithFrame:(NSRect)cellFrame inView:(NSView*)controlView
NSPoint imageOrigin = lcrect.origin;
imageOrigin.x += RESULT_CONTENT_INTERIOR_PADDING;
imageOrigin.y += ceil((lcrect.size.height - DISCLOSURE_TRIANGLE_DIMENSION) / 2);
[[NSImage imageNamed:(collapsed) ? @"ackmateExpand" : @"ackmateCollapse"] drawAdjustedAtPoint:imageOrigin fromRect:NSZeroRect operation:NSCompositeSourceOver fraction:1.0];
NSImage* drawImage = (collapsed) ? sectionCollapsed : sectionExpanded;
[drawImage drawAdjustedAtPoint:imageOrigin fromRect:NSZeroRect operation:NSCompositeSourceOver fraction:1.0];
}
}

Expand Down

0 comments on commit 5549ec7

Please sign in to comment.