summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorritsuka <[email protected]>2009-03-01 18:00:26 +0000
committerritsuka <[email protected]>2009-03-01 18:00:26 +0000
commita2763d8dc216bc2670d49128d98dd65600cfe95f (patch)
tree8f0626993b49b3834ad6a89af3145fa4eab00de4
parent1d3a65d04e19f8adf752e44a2905d1b4932efe7e (diff)
MacGui; fixed warnings related to 64bit cocoa.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2183 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r--macosx/ChapterTitles.h4
-rw-r--r--macosx/ChapterTitles.m8
-rw-r--r--macosx/Controller.h4
-rw-r--r--macosx/Controller.mm92
-rw-r--r--macosx/HBFilterController.mm2
-rw-r--r--macosx/HBQueueController.mm2
6 files changed, 54 insertions, 58 deletions
diff --git a/macosx/ChapterTitles.h b/macosx/ChapterTitles.h
index e8071b596..94d06c806 100644
--- a/macosx/ChapterTitles.h
+++ b/macosx/ChapterTitles.h
@@ -19,10 +19,10 @@
- (id)tableView:(NSTableView *)aTableView
objectValueForTableColumn:(NSTableColumn *)aTableColumn
- row:(int)rowIndex;
+ row:(NSInteger)rowIndex;
- (void)tableView:(NSTableView *)aTableView
setObjectValue:(id)anObject
forTableColumn:(NSTableColumn *)aTableColumn
- row:(int)rowIndex;
+ row:(NSInteger)rowIndex;
@end
diff --git a/macosx/ChapterTitles.m b/macosx/ChapterTitles.m
index 0ad565119..893c2dc22 100644
--- a/macosx/ChapterTitles.m
+++ b/macosx/ChapterTitles.m
@@ -61,7 +61,7 @@
- (void)tableView:(NSTableView *)aTableView
setObjectValue:(id)anObject
forTableColumn:(NSTableColumn *)aTableColumn
- row:(int)rowIndex
+ row:(NSInteger)rowIndex
{
if(aTableColumn != nil && [[aTableColumn identifier] intValue] == 2)
{
@@ -80,7 +80,7 @@
- (id)tableView:(NSTableView *)aTableView
objectValueForTableColumn:(NSTableColumn *)aTableColumn
- row:(int)rowIndex
+ row:(NSInteger)rowIndex
{
NSString *cellEntry = @"__DATA ERROR__";
@@ -111,11 +111,11 @@ a timer to avoid interfering with the chain of events that handles the edit. */
NSTableView *chapterTable = [notification object];
NSInteger column = [chapterTable editedColumn];
NSInteger row = [chapterTable editedRow];
- int textMovement;
+ NSInteger textMovement;
// Edit the cell in the next row, same column
row++;
- textMovement = [[[notification userInfo] objectForKey:@"NSTextMovement"] intValue];
+ textMovement = [[[notification userInfo] objectForKey:@"NSTextMovement"] integerValue];
if( textMovement == NSReturnTextMovement && row < [chapterTable numberOfRows] )
{
NSArray *info = [NSArray arrayWithObjects:chapterTable,
diff --git a/macosx/Controller.h b/macosx/Controller.h
index c9118c023..73cb8eccc 100644
--- a/macosx/Controller.h
+++ b/macosx/Controller.h
@@ -314,7 +314,7 @@ BOOL fIsDragging;
- (IBAction)applyQueueSettings:(id)sender;
- (void) removeQueueFileItem:(int) queueItemToRemove;
- (void) clearQueueAllItems;
-- (void)moveObjectsInQueueArray:(NSMutableArray *)array fromIndexes:(NSIndexSet *)indexSet toIndex:(unsigned)insertIndex;
+- (void)moveObjectsInQueueArray:(NSMutableArray *)array fromIndexes:(NSIndexSet *)indexSet toIndex:(NSUInteger)insertIndex;
- (void)getQueueStats;
- (void)setQueueEncodingItemsAsPending;
- (IBAction) addToQueue: (id) sender;
@@ -395,6 +395,6 @@ BOOL fIsDragging;
- (void) prepareJobForPreview;
- (void) remindUserOfSleepOrShutdown;
-- (void)moveObjectsInPresetsArray:(NSMutableArray *)array fromIndexes:(NSIndexSet *)indexSet toIndex:(unsigned)insertIndex;
+- (void)moveObjectsInPresetsArray:(NSMutableArray *)array fromIndexes:(NSIndexSet *)indexSet toIndex:(NSUInteger)insertIndex;
@end
diff --git a/macosx/Controller.mm b/macosx/Controller.mm
index 2e73266dc..00bb5e729 100644
--- a/macosx/Controller.mm
+++ b/macosx/Controller.mm
@@ -2069,33 +2069,32 @@ fWorkingCount = 0;
}
/* this is actually called from the queue controller to modify the queue array and return it back to the queue controller */
-- (void)moveObjectsInQueueArray:(NSMutableArray *)array fromIndexes:(NSIndexSet *)indexSet toIndex:(unsigned)insertIndex
+- (void)moveObjectsInQueueArray:(NSMutableArray *)array fromIndexes:(NSIndexSet *)indexSet toIndex:(NSUInteger)insertIndex
{
- unsigned index = [indexSet lastIndex];
- unsigned aboveInsertIndexCount = 0;
+ NSUInteger index = [indexSet lastIndex];
+ NSUInteger aboveInsertIndexCount = 0;
- while (index != NSNotFound)
- {
- unsigned removeIndex;
-
- if (index >= insertIndex)
- {
- removeIndex = index + aboveInsertIndexCount;
- aboveInsertIndexCount++;
- }
- else
- {
- removeIndex = index;
- insertIndex--;
- }
-
- id object = [[QueueFileArray objectAtIndex:removeIndex] retain];
- [QueueFileArray removeObjectAtIndex:removeIndex];
- [QueueFileArray insertObject:object atIndex:insertIndex];
- [object release];
+
+ NSUInteger removeIndex;
- index = [indexSet indexLessThanIndex:index];
+ if (index >= insertIndex)
+ {
+ removeIndex = index + aboveInsertIndexCount;
+ aboveInsertIndexCount++;
}
+ else
+ {
+ removeIndex = index;
+ insertIndex--;
+ }
+
+ id object = [[QueueFileArray objectAtIndex:removeIndex] retain];
+ [QueueFileArray removeObjectAtIndex:removeIndex];
+ [QueueFileArray insertObject:object atIndex:insertIndex];
+ [object release];
+
+ index = [indexSet indexLessThanIndex:index];
+
/* We save all of the Queue data here
* and it also gets sent back to the queue controller*/
[self saveQueueFileItem];
@@ -5334,7 +5333,7 @@ the user is using "Custom" settings by determining the sender*/
}
/* We use this to deterimine children of an item */
-- (id)outlineView:(NSOutlineView *)fPresetsOutlineView child:(int)index ofItem:(id)item
+- (id)outlineView:(NSOutlineView *)fPresetsOutlineView child:(NSInteger)index ofItem:(id)item
{
/* we need to return the count of the array in ChildrenArray for this folder */
@@ -5350,7 +5349,7 @@ the user is using "Custom" settings by determining the sender*/
children = [item objectForKey:@"ChildrenArray"];
}
}
- if ((children == nil) || ([children count] <= index))
+ if ((children == nil) || ( [children count] <= (NSUInteger) index))
{
return nil;
}
@@ -5610,33 +5609,30 @@ return YES;
return YES;
}
-- (void)moveObjectsInPresetsArray:(NSMutableArray *)array fromIndexes:(NSIndexSet *)indexSet toIndex:(unsigned)insertIndex
+- (void)moveObjectsInPresetsArray:(NSMutableArray *)array fromIndexes:(NSIndexSet *)indexSet toIndex:(NSUInteger)insertIndex
{
- unsigned index = [indexSet lastIndex];
- unsigned aboveInsertIndexCount = 0;
+ NSUInteger index = [indexSet lastIndex];
+ NSUInteger aboveInsertIndexCount = 0;
- while (index != NSNotFound)
+ NSUInteger removeIndex;
+
+ if (index >= insertIndex)
{
- unsigned removeIndex;
-
- if (index >= insertIndex)
- {
- removeIndex = index + aboveInsertIndexCount;
- aboveInsertIndexCount++;
- }
- else
- {
- removeIndex = index;
- insertIndex--;
- }
-
- id object = [[array objectAtIndex:removeIndex] retain];
- [array removeObjectAtIndex:removeIndex];
- [array insertObject:object atIndex:insertIndex];
- [object release];
-
- index = [indexSet indexLessThanIndex:index];
+ removeIndex = index + aboveInsertIndexCount;
+ aboveInsertIndexCount++;
}
+ else
+ {
+ removeIndex = index;
+ insertIndex--;
+ }
+
+ id object = [[array objectAtIndex:removeIndex] retain];
+ [array removeObjectAtIndex:removeIndex];
+ [array insertObject:object atIndex:insertIndex];
+ [object release];
+
+ index = [indexSet indexLessThanIndex:index];
}
diff --git a/macosx/HBFilterController.mm b/macosx/HBFilterController.mm
index 2e71c9799..a67497a06 100644
--- a/macosx/HBFilterController.mm
+++ b/macosx/HBFilterController.mm
@@ -262,7 +262,7 @@ are maintained across different sources */
- (void) adjustFilterDisplay: (id) sender
{
- NSBox * filterBox;
+ NSBox * filterBox = nil;
NSTextField * filterField;
if (sender == fDetelecinePopUp)
{
diff --git a/macosx/HBQueueController.mm b/macosx/HBQueueController.mm
index aa5e55a8c..3e1b1f59b 100644
--- a/macosx/HBQueueController.mm
+++ b/macosx/HBQueueController.mm
@@ -491,7 +491,7 @@ static NSString* HBQueuePauseResumeToolbarIdentifier = @"HBQueuePauseRe
[fHBController Pause:NULL];
NSString * alertTitle = [NSString stringWithFormat:NSLocalizedString(@"Stop This Encode and Remove It ?", nil)];
// Which window to attach the sheet to?
- NSWindow * docWindow;
+ NSWindow * docWindow = nil;
if ([sender respondsToSelector: @selector(window)])
docWindow = [sender window];