aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/ImageAndTextCell.m3
-rw-r--r--Source/SPFavoriteTextFieldCell.m6
-rw-r--r--Source/SPTextAndLinkCell.m5
3 files changed, 10 insertions, 4 deletions
diff --git a/Source/ImageAndTextCell.m b/Source/ImageAndTextCell.m
index d67b45be..51834825 100644
--- a/Source/ImageAndTextCell.m
+++ b/Source/ImageAndTextCell.m
@@ -18,7 +18,8 @@
- copyWithZone:(NSZone *)zone
{
ImageAndTextCell *cell = (ImageAndTextCell *)[super copyWithZone:zone];
- cell->image = [image retain];
+ cell->image = nil;
+ if (image) cell->image = [image copyWithZone:zone];
return cell;
}
diff --git a/Source/SPFavoriteTextFieldCell.m b/Source/SPFavoriteTextFieldCell.m
index 446e8161..1ef39348 100644
--- a/Source/SPFavoriteTextFieldCell.m
+++ b/Source/SPFavoriteTextFieldCell.m
@@ -46,6 +46,8 @@
if ((self = [super init])) {
mainStringColor = [NSColor blackColor];
subStringColor = [NSColor grayColor];
+ favoriteName = nil;
+ favoriteHost = nil;
}
return self;
@@ -59,10 +61,10 @@
SPFavoriteTextFieldCell *cell = (SPFavoriteTextFieldCell *)[super copyWithZone:zone];
cell->favoriteName = nil;
- cell->favoriteName = [favoriteName retain];
+ if (favoriteName) cell->favoriteName = [favoriteName copyWithZone:zone];
cell->favoriteHost = nil;
- cell->favoriteHost = [favoriteHost retain];
+ if (favoriteHost) cell->favoriteHost = [favoriteHost copyWithZone:zone];
return cell;
}
diff --git a/Source/SPTextAndLinkCell.m b/Source/SPTextAndLinkCell.m
index 8eac562d..29d93a62 100644
--- a/Source/SPTextAndLinkCell.m
+++ b/Source/SPTextAndLinkCell.m
@@ -78,8 +78,11 @@ static inline NSRect SPTextLinkRectFromCellRect(NSRect inRect)
* Returns a new instance which is a copy of the receiver
*/
- (id) copyWithZone:(NSZone *)zone {
- SPTextAndLinkCell *copy = [super copyWithZone:zone];
+ SPTextAndLinkCell *copy = (SPTextAndLinkCell *)[super copyWithZone:zone];
+ copy->linkButton = nil;
if (linkButton) copy->linkButton = [linkButton copyWithZone:zone];
+ copy->linkTarget = linkTarget;
+ copy->linkAction = linkAction;
return copy;
}