Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix cruft/leaks from earlier hasty commit

  • Loading branch information...
commit 5549ec7431bce1da0cd97b35c092cbe4bed9418d 1 parent c2ae6bf
@protocool protocool authored
View
16 AckMate.xcodeproj/project.pbxproj
@@ -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 */
@@ -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>"; };
@@ -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;
@@ -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;
};
View
0  bundle_extras/ackmateExpand.pdf → bundle_extras/ackmateCollapsed.pdf
File renamed without changes
View
0  bundle_extras/ackmateCollapse.pdf → bundle_extras/ackmateExpanded.pdf
File renamed without changes
View
9 source/controllers/AckMatePlugin.m
@@ -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;
}
View
2  source/models/JPAckResult.m
@@ -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];
}
View
17 source/views/JPAckResultCell.m
@@ -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];
@@ -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];
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.