adium/adium

Modernize AIImageButton.

2012-09-12, Thijs Alkemade
68f49c9d6bfb
Parents 512cb1d5bcd7
Children 1b3f8d0c1663
Modernize AIImageButton.
--- a/Frameworks/AIUtilities Framework/Source/AIImageButton.h Wed Sep 12 13:47:11 2012 +0200
+++ b/Frameworks/AIUtilities Framework/Source/AIImageButton.h Wed Sep 12 14:19:34 2012 +0200
@@ -31,5 +31,6 @@
}
@property (assign) CGFloat cornerRadius;
+@property (strong, nonatomic) AIFloater *imageFloater;
@end
--- a/Frameworks/AIUtilities Framework/Source/AIImageButton.m Wed Sep 12 13:47:11 2012 +0200
+++ b/Frameworks/AIUtilities Framework/Source/AIImageButton.m Wed Sep 12 14:19:34 2012 +0200
@@ -23,22 +23,13 @@
@implementation AIImageButton
-@synthesize cornerRadius;
-
-- (id)initWithFrame:(NSRect)frame
-{
- if ((self = [super initWithFrame:frame])) {
- imageFloater = nil;
- }
-
- return self;
-}
+@synthesize cornerRadius, imageFloater;
- (id)copyWithZone:(NSZone *)zone
{
AIImageButton *newButton = [super copyWithZone:zone];
- newButton->imageFloater = imageFloater;
- [newButton setCornerRadius:[self cornerRadius]];
+ newButton.imageFloater = imageFloater;
+ newButton.cornerRadius = self.cornerRadius;
return newButton;
}