diff options
author | Sven Weidauer <sven.weidauer@gmail.com> | 2011-01-31 08:33:16 +0000 |
---|---|---|
committer | Sven Weidauer <sven.weidauer@gmail.com> | 2011-01-31 08:33:16 +0000 |
commit | f98bdddd09609b7a42b849279c7c83624090ab4e (patch) | |
tree | bf87341dd3c332803a2019b6c86784c7a076ce16 /cocoa/PSMTabBarControl/PSMTabDragAssistant.m | |
parent | 899c2e3305592725d646f5acf3c21eaad13699c7 (diff) | |
download | netsurf-f98bdddd09609b7a42b849279c7c83624090ab4e.tar.gz netsurf-f98bdddd09609b7a42b849279c7c83624090ab4e.tar.bz2 |
Updated PSMTabBarControl (warning fixes)
svn path=/trunk/netsurf/; revision=11560
Diffstat (limited to 'cocoa/PSMTabBarControl/PSMTabDragAssistant.m')
-rw-r--r-- | cocoa/PSMTabBarControl/PSMTabDragAssistant.m | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/cocoa/PSMTabBarControl/PSMTabDragAssistant.m b/cocoa/PSMTabBarControl/PSMTabDragAssistant.m index 82a063afa..4542e8d02 100644 --- a/cocoa/PSMTabBarControl/PSMTabDragAssistant.m +++ b/cocoa/PSMTabBarControl/PSMTabDragAssistant.m @@ -298,7 +298,7 @@ static PSMTabDragAssistant *sharedDragAssistant = nil; - (void)performDragOperation { // move cell - NSInteger destinationIndex = [[[self destinationTabBar] cells] indexOfObject:[self targetCell]]; + NSUInteger destinationIndex = [[[self destinationTabBar] cells] indexOfObject:[self targetCell]]; //there is the slight possibility of the targetCell now being set properly, so avoid errors if(destinationIndex >= [[[self destinationTabBar] cells] count]) { @@ -315,7 +315,7 @@ static PSMTabDragAssistant *sharedDragAssistant = nil; [[self sourceTabBar] removeTrackingRect:[[self draggedCell] cellTrackingTag]]; [[self sourceTabBar] removeTabForCell:[self draggedCell]]; - NSInteger i, insertIndex; + NSUInteger i, insertIndex; NSArray *cells = [[self destinationTabBar] cells]; //find the index of where the dragged cell was just dropped @@ -350,9 +350,8 @@ static PSMTabDragAssistant *sharedDragAssistant = nil; NSTabView *tabView = [[self sourceTabBar] tabView]; NSTabViewItem *item = [[self draggedCell] representedObject]; BOOL reselect = ([tabView selectedTabViewItem] == item); - NSInteger index; NSArray *cells = [[self sourceTabBar] cells]; - + NSUInteger index; //find the index of where the dragged cell was just dropped for(index = 0; index < [cells count] && [cells objectAtIndex:index] != [self draggedCell]; index++) { ; @@ -767,7 +766,7 @@ static PSMTabDragAssistant *sharedDragAssistant = nil; } - (void)distributePlaceholdersInTabBar:(PSMTabBarControl *)control { - NSInteger i, numVisibleTabs = [control numberOfVisibleTabs]; + NSUInteger i, numVisibleTabs = [control numberOfVisibleTabs]; for(i = 0; i < numVisibleTabs; i++) { PSMTabBarCell *pc = [[[PSMTabBarCell alloc] initPlaceholderWithFrame:[[self draggedCell] frame] expanded:NO inControlView:control] autorelease]; [[control cells] insertObject:pc atIndex:(2 * i)]; |