Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

some more cleanup, icon

  • Loading branch information...
commit 5ea805aa3681032652a72ce8ad811828b725ef0f 1 parent bd72644
Johannes Fahrenkrug authored
2  ImageViewGridLayer.h
View
@@ -16,6 +16,8 @@
VertexDocument *document;
int rows;
int cols;
+ CGColorRef green;
+ CGColorRef gray;
}
@property (assign) IKImageView *owner;
@property (assign) VertexDocument *document;
14 ImageViewGridLayer.m
View
@@ -39,6 +39,8 @@ - (id) init
if((self = [super init])){
//needs to redraw when bounds change
[self setNeedsDisplayOnBoundsChange:YES];
+ green = [[NSColor greenColor] CGColor];
+ gray = [[NSColor grayColor] CGColor];
}
return self;
@@ -113,11 +115,11 @@ - (void)drawInContext:(CGContextRef)context
}
}
- CGContextSetStrokeColorWithColor(context, [[NSColor greenColor] CGColor]);
+ CGContextSetStrokeColorWithColor(context, green);
CGContextStrokePath(context);
// the last "auto-connected" line will have a different color...
- CGContextSetStrokeColorWithColor(context, [[NSColor grayColor] CGColor]);
+ CGContextSetStrokeColorWithColor(context, gray);
CGContextMoveToPoint(context, lastX, lastY);
CGContextAddLineToPoint(context, firstX, firstY);
CGContextStrokePath(context);
@@ -161,5 +163,13 @@ -(CALayer *)hitTest:(NSPoint)aPoint {
}
}
+- (void)dealloc
+{
+ CGColorRelease(gray);
+ CGColorRelease(green);
+
+ [super dealloc];
+}
+
@end
11 VertexDocument.m
View
@@ -36,8 +36,8 @@ - (NSString *)windowNibName
- (void)windowControllerDidLoadNib:(NSWindowController *) aController
{
[super windowControllerDidLoadNib:aController];
-
- [imageView setImageWithURL:[[NSBundle mainBundle] URLForImageResource:@"drop_sprite.png"]];
+
+ [imageView setImageWithURL: [NSURL URLWithString:[NSString stringWithFormat:@"file://%@", [[NSBundle mainBundle] pathForImageResource:@"drop_sprite.png"]]]];
[imageView setCurrentToolMode: IKToolModeMove];
[imageView setDoubleClickOpensImageEditPanel:NO];
@@ -212,5 +212,12 @@ - (void)updateResultTextField
[resultTextView setString: result];
}
+- (void)dealloc
+{
+ [pointMatrix release];
+
+ [super dealloc];
+}
+
@end
2  VertexHelper-Info.plist
View
@@ -28,7 +28,7 @@
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIconFile</key>
- <string></string>
+ <string>icon.icns</string>
<key>CFBundleIdentifier</key>
<string>com.springenwerk.${PRODUCT_NAME:rfc1034identifier}</string>
<key>CFBundleInfoDictionaryVersion</key>
12 VertexHelper.xcodeproj/project.pbxproj
View
@@ -18,6 +18,7 @@
8F29AD46112F4FA800459CEB /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8F29AD45112F4FA800459CEB /* QuartzCore.framework */; };
8F29AD51112F509600459CEB /* ImageViewGridLayer.m in Sources */ = {isa = PBXBuildFile; fileRef = 8F29AD50112F509600459CEB /* ImageViewGridLayer.m */; };
8F7B77921136C35800DE53AE /* drop_sprite.png in Resources */ = {isa = PBXBuildFile; fileRef = 8F7B77911136C35800DE53AE /* drop_sprite.png */; };
+ 8F7B77F51136F58400DE53AE /* icon.icns in Resources */ = {isa = PBXBuildFile; fileRef = 8F7B77F41136F58400DE53AE /* icon.icns */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
@@ -40,6 +41,7 @@
8F29AD4F112F509600459CEB /* ImageViewGridLayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ImageViewGridLayer.h; sourceTree = "<group>"; };
8F29AD50112F509600459CEB /* ImageViewGridLayer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ImageViewGridLayer.m; sourceTree = "<group>"; };
8F7B77911136C35800DE53AE /* drop_sprite.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = drop_sprite.png; sourceTree = "<group>"; };
+ 8F7B77F41136F58400DE53AE /* icon.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = icon.icns; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@@ -119,6 +121,7 @@
2A37F4B8FDCFA73011CA2CEA /* Resources */ = {
isa = PBXGroup;
children = (
+ 8F7B77F41136F58400DE53AE /* icon.icns */,
8F7B77911136C35800DE53AE /* drop_sprite.png */,
2A37F4B9FDCFA73011CA2CEA /* Credits.rtf */,
8D15AC360486D014006FF6A4 /* VertexHelper-Info.plist */,
@@ -186,6 +189,7 @@
1DDD582C0DA1D0D100B32029 /* VertexDocument.xib in Resources */,
1DDD582D0DA1D0D100B32029 /* MainMenu.xib in Resources */,
8F7B77921136C35800DE53AE /* drop_sprite.png in Resources */,
+ 8F7B77F51136F58400DE53AE /* icon.icns in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -276,13 +280,13 @@
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
GCC_C_LANGUAGE_STANDARD = gnu99;
- GCC_ENABLE_OBJC_GC = required;
+ GCC_ENABLE_OBJC_GC = unsupported;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
ONLY_ACTIVE_ARCH = YES;
PREBINDING = NO;
- SDKROOT = macosx10.6;
+ SDKROOT = macosx10.5;
};
name = Debug;
};
@@ -291,11 +295,11 @@
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
GCC_C_LANGUAGE_STANDARD = gnu99;
- GCC_ENABLE_OBJC_GC = required;
+ GCC_ENABLE_OBJC_GC = unsupported;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
PREBINDING = NO;
- SDKROOT = macosx10.6;
+ SDKROOT = macosx10.5;
};
name = Release;
};
BIN  icon.icns
View
Binary file not shown
Please sign in to comment.
Something went wrong with that request. Please try again.