aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPNarrowDownCompletion.m
diff options
context:
space:
mode:
authorstuconnolly <stuart02@gmail.com>2012-05-09 15:19:40 +0000
committerstuconnolly <stuart02@gmail.com>2012-05-09 15:19:40 +0000
commitafbd3852fa962b3b4399b83ba33295c7621d04a8 (patch)
tree85644bdcb5091955483e67e88308e5c535bb6248 /Source/SPNarrowDownCompletion.m
parent9131db394c46f10260fcec1a1df5216b140e2bc2 (diff)
downloadsequelpro-afbd3852fa962b3b4399b83ba33295c7621d04a8.tar.gz
sequelpro-afbd3852fa962b3b4399b83ba33295c7621d04a8.tar.bz2
sequelpro-afbd3852fa962b3b4399b83ba33295c7621d04a8.zip
Fix more gcc warnings.
Diffstat (limited to 'Source/SPNarrowDownCompletion.m')
-rw-r--r--Source/SPNarrowDownCompletion.m28
1 files changed, 14 insertions, 14 deletions
diff --git a/Source/SPNarrowDownCompletion.m b/Source/SPNarrowDownCompletion.m
index 76336069..ad4be13a 100644
--- a/Source/SPNarrowDownCompletion.m
+++ b/Source/SPNarrowDownCompletion.m
@@ -318,21 +318,21 @@
{
caretPos = aPos;
- NSRect mainScreen = [self rectOfMainScreen];
+ NSRect screen = [self rectOfMainScreen];
- NSInteger offx = (caretPos.x/mainScreen.size.width) + 1;
+ NSInteger offx = (caretPos.x/screen.size.width) + 1;
- if((caretPos.x + [self frame].size.width) > (mainScreen.size.width*offx))
- caretPos.x = (mainScreen.size.width*offx) - [self frame].size.width - 5;
+ if((caretPos.x + [self frame].size.width) > (screen.size.width*offx))
+ caretPos.x = (screen.size.width*offx) - [self frame].size.width - 5;
if(caretPos.y >= 0 && caretPos.y < [self frame].size.height)
{
- caretPos.y += [self frame].size.height + ([tableFont pointSize]*1.5);
+ caretPos.y += [self frame].size.height + ([tableFont pointSize]*1.5f);
isAbove = YES;
}
- if(caretPos.y < 0 && (mainScreen.size.height-[self frame].size.height) < (caretPos.y*-1))
+ if(caretPos.y < 0 && (screen.size.height-[self frame].size.height) < (caretPos.y*-1))
{
- caretPos.y += [self frame].size.height + ([tableFont pointSize]*1.5);
+ caretPos.y += [self frame].size.height + ([tableFont pointSize]*1.5f);
isAbove = YES;
}
@@ -345,7 +345,7 @@
[self setLevel:NSNormalWindowLevel];
[self setHidesOnDeactivate:YES];
[self setHasShadow:YES];
- [self setAlphaValue:0.9];
+ [self setAlphaValue:0.9f];
NSScrollView* scrollView = [[[NSScrollView alloc] initWithFrame:NSZeroRect] autorelease];
[scrollView setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable];
@@ -731,10 +731,10 @@
if(caretPos.y >= 0 && (isAbove || caretPos.y < newHeight))
{
isAbove = YES;
- old.y = caretPos.y + newHeight + ([tableFont pointSize]*1.5);
+ old.y = caretPos.y + newHeight + ([tableFont pointSize]*1.5f);
}
if(caretPos.y < 0 && (isAbove || ([self rectOfMainScreen].size.height-newHeight) < (caretPos.y*-1)))
- old.y = caretPos.y + newHeight + ([tableFont pointSize]*1.5);
+ old.y = caretPos.y + newHeight + ([tableFont pointSize]*1.5f);
// newHeight is currently the new height for theTableView, but we need to resize the whole window
// so here we use the difference in height to find the new height for the window
@@ -759,16 +759,16 @@
- (NSRect)rectOfMainScreen
{
- NSRect mainScreen = [[NSScreen mainScreen] frame];
+ NSRect screen = [[NSScreen mainScreen] frame];
for (NSScreen *candidate in [NSScreen screens])
{
if (NSMinX([candidate frame]) == 0.0f && NSMinY([candidate frame]) == 0.0f) {
- mainScreen = [candidate frame];
+ screen = [candidate frame];
}
}
- return mainScreen;
+ return screen;
}
// =============================
@@ -983,7 +983,7 @@
// Restore the text selection location, and clearly mark the autosuggested text
[theView setSelectedRange:NSMakeRange(currentSelectionPosition, 0)];
- NSMutableAttributedStringAddAttributeValueRange([theView textStorage], NSForegroundColorAttributeName, [[theView otherTextColor] colorWithAlphaComponent:0.3], NSMakeRange(currentSelectionPosition, [toInsert length]));
+ NSMutableAttributedStringAddAttributeValueRange([theView textStorage], NSForegroundColorAttributeName, [[theView otherTextColor] colorWithAlphaComponent:0.3f], NSMakeRange(currentSelectionPosition, [toInsert length]));
NSMutableAttributedStringAddAttributeValueRange([theView textStorage], kSPAutoCompletePlaceholderName, kSPAutoCompletePlaceholderVal, NSMakeRange(currentSelectionPosition, [toInsert length]));
[self checkSpaceForAllowedCharacter];