diff options
author | stuconnolly <stuart02@gmail.com> | 2010-03-31 18:24:37 +0000 |
---|---|---|
committer | stuconnolly <stuart02@gmail.com> | 2010-03-31 18:24:37 +0000 |
commit | 786a51fb9539858aa8974d9fd93e9410867ee08d (patch) | |
tree | 5c27f959e01e3b4310009d93f29d5f9fcdb32eea /Source/SPTextAndLinkCell.m | |
parent | ef9f2de4c69410664f5c75db6b512138c7df72aa (diff) | |
download | sequelpro-786a51fb9539858aa8974d9fd93e9410867ee08d.tar.gz sequelpro-786a51fb9539858aa8974d9fd93e9410867ee08d.tar.bz2 sequelpro-786a51fb9539858aa8974d9fd93e9410867ee08d.zip |
More tidy up. Constants and functions.
Diffstat (limited to 'Source/SPTextAndLinkCell.m')
-rw-r--r-- | Source/SPTextAndLinkCell.m | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/Source/SPTextAndLinkCell.m b/Source/SPTextAndLinkCell.m index 29d93a62..194f0e61 100644 --- a/Source/SPTextAndLinkCell.m +++ b/Source/SPTextAndLinkCell.m @@ -24,6 +24,7 @@ // More info at <http://code.google.com/p/sequel-pro/> #import "SPTextAndLinkCell.h" +#import "SPConstants.h" @implementation SPTextAndLinkCell @@ -48,7 +49,7 @@ static inline NSRect SPTextLinkRectFromCellRect(NSRect inRect) hasLink = NO; linkButton = nil; linkTarget = nil; - drawState = SP_LINKDRAWSTATE_NORMAL; + drawState = SPLinkDrawStateNormal; lastLinkColumn = NSNotFound; lastLinkRow = NSNotFound; @@ -140,22 +141,22 @@ static inline NSRect SPTextLinkRectFromCellRect(NSRect inRect) NSInteger newDrawState = ([self isHighlighted])? ((([(NSTableView *)[self controlView] editedColumn] != -1 || [[[self controlView] window] firstResponder] == [self controlView]) - && [[[self controlView] window] isKeyWindow])?SP_LINKDRAWSTATE_HIGHLIGHT:SP_LINKDRAWSTATE_BACKGROUNDHIGHLIGHT): - SP_LINKDRAWSTATE_NORMAL; + && [[[self controlView] window] isKeyWindow])?SPLinkDrawStateHighlight:SPLinkDrawStateBackgroundHighlight): + SPLinkDrawStateNormal; // Update the link arrow style if the state has changed if (drawState != newDrawState) { drawState = newDrawState; switch (drawState) { - case SP_LINKDRAWSTATE_NORMAL: + case SPLinkDrawStateNormal: [linkButton setImage:[NSImage imageNamed:@"link-arrow"]]; [linkButton setAlternateImage:[NSImage imageNamed:@"link-arrow-clicked"]]; break; - case SP_LINKDRAWSTATE_HIGHLIGHT: + case SPLinkDrawStateHighlight: [linkButton setImage:[NSImage imageNamed:@"link-arrow-highlighted"]]; [linkButton setAlternateImage:[NSImage imageNamed:@"link-arrow-highlighted-clicked"]]; break; - case SP_LINKDRAWSTATE_BACKGROUNDHIGHLIGHT: + case SPLinkDrawStateBackgroundHighlight: [linkButton setImage:[NSImage imageNamed:@"link-arrow-clicked"]]; [linkButton setAlternateImage:[NSImage imageNamed:@"link-arrow"]]; break; |