summaryrefslogtreecommitdiff
path: root/cocoa/PSMTabBarControl/PSMTabBarControl.m
diff options
context:
space:
mode:
authorSven Weidauer <sven.weidauer@gmail.com>2011-01-31 08:33:16 +0000
committerSven Weidauer <sven.weidauer@gmail.com>2011-01-31 08:33:16 +0000
commitf98bdddd09609b7a42b849279c7c83624090ab4e (patch)
treebf87341dd3c332803a2019b6c86784c7a076ce16 /cocoa/PSMTabBarControl/PSMTabBarControl.m
parent899c2e3305592725d646f5acf3c21eaad13699c7 (diff)
downloadnetsurf-f98bdddd09609b7a42b849279c7c83624090ab4e.tar.gz
netsurf-f98bdddd09609b7a42b849279c7c83624090ab4e.tar.bz2
Updated PSMTabBarControl (warning fixes)
svn path=/trunk/netsurf/; revision=11560
Diffstat (limited to 'cocoa/PSMTabBarControl/PSMTabBarControl.m')
-rw-r--r--cocoa/PSMTabBarControl/PSMTabBarControl.m20
1 files changed, 10 insertions, 10 deletions
diff --git a/cocoa/PSMTabBarControl/PSMTabBarControl.m b/cocoa/PSMTabBarControl/PSMTabBarControl.m
index 865180417..3a7e0c6d4 100644
--- a/cocoa/PSMTabBarControl/PSMTabBarControl.m
+++ b/cocoa/PSMTabBarControl/PSMTabBarControl.m
@@ -564,7 +564,7 @@
// add to collection
[_cells addObject:cell];
[cell release];
- if([_cells count] == [tabView numberOfTabViewItems]) {
+ if([_cells count] == (NSUInteger)[tabView numberOfTabViewItems]) {
[self update]; // don't update unless all are accounted for!
}
}
@@ -923,7 +923,7 @@
- (void)update:(BOOL)animate {
// make sure all of our tabs are accounted for before updating
- if([[self tabView] numberOfTabViewItems] != [_cells count]) {
+ if((NSUInteger)[[self tabView] numberOfTabViewItems] != [_cells count]) {
return;
}
@@ -952,7 +952,7 @@
if(animate) {
NSMutableArray *targetFrames = [NSMutableArray arrayWithCapacity:[_cells count]];
- for(NSInteger i = 0; i < [_cells count]; i++) {
+ for(NSUInteger i = 0; i < [_cells count]; i++) {
currentCell = [_cells objectAtIndex:i];
//we're going from NSRect -> NSValue -> NSRect -> NSValue here - oh well
@@ -973,7 +973,7 @@
[[NSRunLoop currentRunLoop] addTimer:_animationTimer forMode:NSEventTrackingRunLoopMode];
[self _animateCells:_animationTimer];
} else {
- for(NSInteger i = 0; i < [_cells count]; i++) {
+ for(NSUInteger i = 0; i < [_cells count]; i++) {
currentCell = [_cells objectAtIndex:i];
[currentCell setFrame:[_controller cellFrameAtIndex:i]];
@@ -992,11 +992,11 @@
NSAnimation *animation = [[timer userInfo] objectAtIndex:1];
NSArray *targetFrames = [[timer userInfo] objectAtIndex:0];
PSMTabBarCell *currentCell;
- NSInteger cellCount = [_cells count];
+ NSUInteger cellCount = [_cells count];
if((cellCount > 0) && [animation isAnimating]) {
//compare our target position with the current position and move towards the target
- for(NSInteger i = 0; i < [targetFrames count] && i < cellCount; i++) {
+ for(NSUInteger i = 0; i < [targetFrames count] && i < cellCount; i++) {
currentCell = [_cells objectAtIndex:i];
NSRect cellFrame = [currentCell frame], targetFrame = [[targetFrames objectAtIndex:i] rectValue];
CGFloat sizeChange;
@@ -1032,7 +1032,7 @@
} else {
//put all the cells where they should be in their final position
if(cellCount > 0) {
- for(NSInteger i = 0; i < [targetFrames count] && i < cellCount; i++) {
+ for(NSUInteger i = 0; i < [targetFrames count] && i < cellCount; i++) {
PSMTabBarCell *currentCell = [_cells objectAtIndex:i];
NSRect cellFrame = [currentCell frame], targetFrame = [[targetFrames objectAtIndex:i] rectValue];
@@ -1064,7 +1064,7 @@
[_animationTimer invalidate];
[_animationTimer release]; _animationTimer = nil;
- for(NSInteger i = 0; i < cellCount; i++) {
+ for(NSUInteger i = 0; i < cellCount; i++) {
currentCell = [_cells objectAtIndex:i];
//we've hit the cells that are in overflow, stop setting up tracking rects
@@ -1618,7 +1618,7 @@
- (void)tabView:(NSTabView *)aTabView didSelectTabViewItem:(NSTabViewItem *)tabViewItem {
// here's a weird one - this message is sent before the "tabViewDidChangeNumberOfTabViewItems"
// message, thus I can end up updating when there are no cells, if no tabs were (yet) present
- NSInteger tabIndex = [aTabView indexOfTabViewItem:tabViewItem];
+ NSUInteger tabIndex = [aTabView indexOfTabViewItem:tabViewItem];
if([_cells count] > 0 && tabIndex < [_cells count]) {
PSMTabBarCell *thisCell = [_cells objectAtIndex:tabIndex];
@@ -1930,7 +1930,7 @@
}
- (NSInteger)numberOfVisibleTabs {
- NSInteger i, cellCount = 0;
+ NSUInteger i, cellCount = 0;
PSMTabBarCell *nextCell;
for(i = 0; i < [_cells count]; i++) {