[vlc-devel] [PATCH 07/12] fiex more array access in modules/gui/macosx/*
Benedikt Bergenthal
benedikt at kdrennert.de
Fri May 10 18:47:56 CEST 2013
diff --git a/modules/gui/macosx/controls.m b/modules/gui/macosx/controls.m
index 1a1b4a0..cc99627 100644
--- a/modules/gui/macosx/controls.m
+++ b/modules/gui/macosx/controls.m
@@ -223,12 +223,12 @@
[fieldContent componentsSeparatedByString: @":"];
if ([[fieldContent componentsSeparatedByString: @":"] count] == 3) {
- timeInSec += ([ourTempArray[0] intValue] * 3600); //h
- timeInSec += ([ourTempArray[1] intValue] * 60); //m
- timeInSec += [ourTempArray[2] intValue]; //s
+ timeInSec += ([[ourTempArray objectAtIndex:0] intValue] * 3600); //h
+ timeInSec += ([[ourTempArray objectAtIndex:1] intValue] * 60); //m
+ timeInSec += [[ourTempArray objectAtIndex:2] intValue]; //s
} else {
- timeInSec += ([ourTempArray[0] intValue] * 60); //m
- timeInSec += [ourTempArray[1] intValue]; //s
+ timeInSec += ([[ourTempArray objectAtIndex:0] intValue] * 60); //m
+ timeInSec += [[ourTempArray objectAtIndex:1] intValue]; //s
}
}
else
diff --git a/modules/gui/macosx/coredialogs.m b/modules/gui/macosx/coredialogs.m
index 7d24fc6..3850170 100644
--- a/modules/gui/macosx/coredialogs.m
+++ b/modules/gui/macosx/coredialogs.m
@@ -317,10 +317,10 @@ static VLCCoreDialogProvider *_o_sharedInstance = nil;
(NSTableColumn *)theTableColumn row: (NSInteger)row
{
if ([[theTableColumn identifier] isEqualToString: @"error_msg"])
- return o_errors[row];
+ return [o_errors objectAtIndex:row];
if ([[theTableColumn identifier] isEqualToString: @"icon"])
- return o_icons[row];
+ return [o_icons objectAtIndex:row];
return @"unknown identifier";
}
diff --git a/modules/gui/macosx/intf.m b/modules/gui/macosx/intf.m
index 64930c4..a42a22b 100644
--- a/modules/gui/macosx/intf.m
+++ b/modules/gui/macosx/intf.m
@@ -1061,7 +1061,7 @@ static VLCMain *_o_sharedMainInstance = nil;
- (void)application:(NSApplication *)o_app openFiles:(NSArray *)o_names
{
BOOL b_autoplay = config_GetInt(VLCIntf, "macosx-autoplay");
- char *psz_uri = vlc_path2uri([o_names[0] UTF8String], "file");
+ char *psz_uri = vlc_path2uri([[o_names objectAtIndex:0] UTF8String], "file");
// try to add file as subtitle
if ([o_names count] == 1 && psz_uri) {
@@ -1081,7 +1081,7 @@ static VLCMain *_o_sharedMainInstance = nil;
NSArray *o_sorted_names = [o_names sortedArrayUsingSelector: @selector(caseInsensitiveCompare:)];
NSMutableArray *o_result = [NSMutableArray arrayWithCapacity: [o_sorted_names count]];
for (int i = 0; i < [o_sorted_names count]; i++) {
- psz_uri = vlc_path2uri([o_sorted_names[i] UTF8String], "file");
+ psz_uri = vlc_path2uri([[o_sorted_names objectAtIndex:i] UTF8String], "file");
if (!psz_uri)
continue;
@@ -1269,7 +1269,7 @@ static VLCMain *_o_sharedMainInstance = nil;
BOOL b_found_key = NO;
for (int i = 0; i < [o_usedHotkeys count]; i++) {
- NSString *str = o_usedHotkeys[i];
+ NSString *str = [o_usedHotkeys objectAtIndex:i];
unsigned int i_keyModifiers = [[VLCStringUtility sharedInstance] VLCModifiersToCocoa: str];
if ([[characters lowercaseString] isEqualToString: [[VLCStringUtility sharedInstance] VLCKeyToString: str]] &&
@@ -1784,22 +1784,22 @@ static VLCMain *_o_sharedMainInstance = nil;
NSArray * compo = [fname componentsSeparatedByString:@"_"];
if ([compo count] < 3)
continue;
- compo = [compo[1] componentsSeparatedByString:@"-"];
+ compo = [[compo objectAtIndex:1] componentsSeparatedByString:@"-"];
if ([compo count] < 4)
continue;
// Dooh. ugly.
- if (year < [compo[0] intValue] ||
- (year ==[compo[0] intValue] &&
- (month < [compo[1] intValue] ||
- (month ==[compo[1] intValue] &&
- (day < [compo[2] intValue] ||
- (day ==[compo[2] intValue] &&
- hours < [compo[3] intValue])))))) {
- year = [compo[0] intValue];
- month = [compo[1] intValue];
- day = [compo[2] intValue];
- hours = [compo[3] intValue];
+ if (year < [[compo objectAtIndex:0] intValue] ||
+ (year ==[[compo objectAtIndex:0] intValue] &&
+ (month < [[compo objectAtIndex:1] intValue] ||
+ (month ==[[compo objectAtIndex:1] intValue] &&
+ (day < [[compo objectAtIndex:2] intValue] ||
+ (day ==[[compo objectAtIndex:2] intValue] &&
+ hours < [[compo objectAtIndex:3] intValue])))))) {
+ year = [[compo objectAtIndex:0] intValue];
+ month = [[compo objectAtIndex:1] intValue];
+ day = [[compo objectAtIndex:2] intValue];
+ hours = [[compo objectAtIndex:3] intValue];
latestLog = [crashReporter stringByAppendingPathComponent:fname];
}
}
@@ -1889,7 +1889,7 @@ static VLCMain *_o_sharedMainInstance = nil;
NSArray *libraries = NSSearchPathForDirectoriesInDomains(NSLibraryDirectory,
NSUserDomainMask, YES);
if (!libraries || [libraries count] == 0) return;
- NSString * preferences = [libraries[0] stringByAppendingPathComponent:@"Preferences"];
+ NSString * preferences = [[libraries objectAtIndex:0] stringByAppendingPathComponent:@"Preferences"];
/* File not found, don't attempt anything */
if (![[NSFileManager defaultManager] fileExistsAtPath:[preferences stringByAppendingPathComponent:@"org.videolan.vlc"]] &&
@@ -1970,7 +1970,7 @@ static VLCMain *_o_sharedMainInstance = nil;
[o_msg_lock lock];
if (rowIndex < [o_msg_arr count])
- result = o_msg_arr[rowIndex];
+ result = [o_msg_arr objectAtIndex:rowIndex];
[o_msg_lock unlock];
if (result != NULL)
@@ -2027,7 +2027,7 @@ static VLCMain *_o_sharedMainInstance = nil;
NSUInteger count = [o_msg_arr count];
NSMutableAttributedString * string = [[NSMutableAttributedString alloc] init];
for (NSUInteger i = 0; i < count; i++)
- [string appendAttributedString: o_msg_arr[i]];
+ [string appendAttributedString: [o_msg_arr objectAtIndex:i]];
NSData *data = [string RTFFromRange:NSMakeRange(0, [string length])
documentAttributes:[NSDictionary dictionaryWithObject: NSRTFTextDocumentType forKey: NSDocumentTypeDocumentAttribute]];
diff --git a/modules/gui/macosx/misc.m b/modules/gui/macosx/misc.m
index 3a9bfde..377cd67 100644
--- a/modules/gui/macosx/misc.m
+++ b/modules/gui/macosx/misc.m
@@ -176,7 +176,7 @@ static NSMutableArray *blackoutWindows = NULL;
NSUInteger count = [[NSScreen screens] count];
for ( NSUInteger i = 0; i < count; i++ ) {
- NSScreen *screen = [NSScreen screens][i];
+ NSScreen *screen = [[NSScreen screens] objectAtIndex:i];
if ([screen displayID] == displayID)
return screen;
}
@@ -185,7 +185,7 @@ static NSMutableArray *blackoutWindows = NULL;
- (BOOL)hasMenuBar
{
- return ([self displayID] == [[NSScreen screens][0] displayID]);
+ return ([self displayID] == [[[NSScreen screens] objectAtIndex:0] displayID]);
}
- (BOOL)hasDock
@@ -221,7 +221,7 @@ static NSMutableArray *blackoutWindows = NULL;
NSUInteger screenCount = [[NSScreen screens] count];
for (NSUInteger i = 0; i < screenCount; i++) {
- NSScreen *screen = [NSScreen screens][i];
+ NSScreen *screen = [[NSScreen screens] objectAtIndex:i];
VLCWindow *blackoutWindow;
NSRect screen_rect;
@@ -255,7 +255,7 @@ static NSMutableArray *blackoutWindows = NULL;
NSUInteger blackoutWindowCount = [blackoutWindows count];
for (NSUInteger i = 0; i < blackoutWindowCount; i++) {
- VLCWindow *blackoutWindow = blackoutWindows[i];
+ VLCWindow *blackoutWindow = [blackoutWindows objectAtIndex:i];
[[blackoutWindow screen] setNonFullscreenPresentationOptions];
[blackoutWindow closeAndAnimate: YES];
}
diff --git a/modules/gui/macosx/open.m b/modules/gui/macosx/open.m
index 0540639..05e9b16 100644
--- a/modules/gui/macosx/open.m
+++ b/modules/gui/macosx/open.m
@@ -105,7 +105,7 @@ static VLCOpen *_o_sharedMainInstance = nil;
[o_currentOpticalMediaIconView release];
[o_currentOpticalMediaView release];
for (int i = 0; i < [o_displayInfos count]; i ++) {
- NSValue *v = o_displayInfos[i];
+ NSValue *v = [o_displayInfos objectAtIndex:i];
free([v pointerValue]);
}
[o_displayInfos removeAllObjects];
@@ -240,7 +240,7 @@ static VLCOpen *_o_sharedMainInstance = nil;
NSUInteger deviceCount = [qtkvideoDevices count];
for (int ivideo = 0; ivideo < deviceCount; ivideo++) {
QTCaptureDevice *qtk_device;
- qtk_device = qtkvideoDevices[ivideo];
+ qtk_device = [qtkvideoDevices objectAtIndex:ivideo];
[o_qtk_video_device_pop addItemWithTitle: [qtk_device localizedDisplayName]];
if ([[[qtk_device uniqueID]stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]] isEqualToString:qtk_currdevice_uid])
@@ -264,7 +264,7 @@ static VLCOpen *_o_sharedMainInstance = nil;
NSUInteger deviceCount = [qtkaudioDevices count];
for (int iaudio = 0; iaudio < deviceCount; iaudio++) {
QTCaptureDevice *qtkaudio_device;
- qtkaudio_device = qtkaudioDevices[iaudio];
+ qtkaudio_device = [qtkaudioDevices objectAtIndex:iaudio];
[o_qtk_audio_device_pop addItemWithTitle: [qtkaudio_device localizedDisplayName]];
[o_screen_qtk_audio_pop addItemWithTitle: [qtkaudio_device localizedDisplayName]];
if ([[[qtkaudio_device uniqueID]stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]] isEqualToString:qtkaudio_currdevice_uid]) {
@@ -463,21 +463,21 @@ static VLCOpen *_o_sharedMainInstance = nil;
NSUInteger componentCount = [components count];
NSInteger tempValue;
if (componentCount == 1)
- tempValue = [components[0] intValue];
+ tempValue = [[components objectAtIndex:0] intValue];
else if (componentCount == 2)
- tempValue = [components[0] intValue] * 60 + [components[1] intValue];
+ tempValue = [[components objectAtIndex:0] intValue] * 60 + [[components objectAtIndex:1] intValue];
else if (componentCount == 3)
- tempValue = [components[0] intValue] * 3600 + [components[1] intValue] * 60 + [components[2] intValue];
+ tempValue = [[components objectAtIndex:0] intValue] * 3600 + [[components objectAtIndex:1] intValue] * 60 + [[components objectAtIndex:2] intValue];
if (tempValue > 0)
[o_options addObject: [NSString stringWithFormat:@"start-time=%li", tempValue]];
components = [[o_file_stoptime_fld stringValue] componentsSeparatedByString:@":"];
componentCount = [components count];
if (componentCount == 1)
- tempValue = [components[0] intValue];
+ tempValue = [[components objectAtIndex:0] intValue];
else if (componentCount == 2)
- tempValue = [components[0] intValue] * 60 + [components[1] intValue];
+ tempValue = [[components objectAtIndex:0] intValue] * 60 + [[components objectAtIndex:1] intValue];
else if (componentCount == 3)
- tempValue = [components[0] intValue] * 3600 + [components[1] intValue] * 60 + [components[2] intValue];
+ tempValue = [[components objectAtIndex:0] intValue] * 3600 + [[components objectAtIndex:1] intValue] * 60 + [[components objectAtIndex:2] intValue];
if (tempValue > 0)
[o_options addObject: [NSString stringWithFormat:@"stop-time=%li", tempValue]];
}
@@ -485,14 +485,14 @@ static VLCOpen *_o_sharedMainInstance = nil;
NSArray * soutMRL = [o_sout_options soutMRL];
NSUInteger count = [soutMRL count];
for (NSUInteger i = 0 ; i < count ; i++)
- [o_options addObject: [NSString stringWithString: soutMRL[i]]];
+ [o_options addObject: [NSString stringWithString: [soutMRL objectAtIndex:i]]];
}
if ([o_file_slave_ckbox state] && o_file_slave_path)
[o_options addObject: [NSString stringWithFormat: @"input-slave=%@", o_file_slave_path]];
if ([[[o_tabview selectedTabViewItem] label] isEqualToString: _NS("Capture")]) {
if ([[[o_capture_mode_pop selectedItem] title] isEqualToString: _NS("Screen")]) {
int selected_index = [o_screen_screen_pop indexOfSelectedItem];
- NSValue *v = o_displayInfos[selected_index];
+ NSValue *v = [o_displayInfos objectAtIndex:selected_index];
struct display_info_t *item = (struct display_info_t *)[v pointerValue];
[o_options addObject: [NSString stringWithFormat: @"screen-fps=%f", [o_screen_fps_fld floatValue]]];
@@ -532,7 +532,7 @@ static VLCOpen *_o_sharedMainInstance = nil;
int selected_index = [o_screen_screen_pop indexOfSelectedItem];
if (selected_index >= [o_displayInfos count]) return;
- NSValue *v = o_displayInfos[selected_index];
+ NSValue *v = [o_displayInfos objectAtIndex:selected_index];
struct display_info_t *item = (struct display_info_t *)[v pointerValue];
[o_screen_left_stp setMaxValue: item->rect.size.width];
@@ -547,13 +547,13 @@ static VLCOpen *_o_sharedMainInstance = nil;
{
NSInteger i_selectedDevice = [o_qtk_video_device_pop indexOfSelectedItem];
if ([qtkvideoDevices count] >= 1) {
- NSValue *sizes = [[qtkvideoDevices[i_selectedDevice] formatDescriptions][0] attributeForKey: QTFormatDescriptionVideoEncodedPixelsSizeAttribute];
+ NSValue *sizes = [[[[qtkvideoDevices objectAtIndex:i_selectedDevice] formatDescriptions] objectAtIndex:0] attributeForKey: QTFormatDescriptionVideoEncodedPixelsSizeAttribute];
[o_capture_width_fld setIntValue: [sizes sizeValue].width];
[o_capture_height_fld setIntValue: [sizes sizeValue].height];
[o_capture_width_stp setIntValue: [o_capture_width_fld intValue]];
[o_capture_height_stp setIntValue: [o_capture_height_fld intValue]];
- qtk_currdevice_uid = [[(QTCaptureDevice *)qtkvideoDevices[i_selectedDevice] uniqueID] stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]];
+ qtk_currdevice_uid = [[(QTCaptureDevice *)[qtkvideoDevices objectAtIndex:i_selectedDevice] uniqueID] stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]];
}
}
@@ -561,7 +561,7 @@ static VLCOpen *_o_sharedMainInstance = nil;
{
NSInteger i_selectedDevice = [o_qtk_audio_device_pop indexOfSelectedItem];
if ([qtkaudioDevices count] >= 1) {
- qtkaudio_currdevice_uid = [[(QTCaptureDevice *)qtkaudioDevices[i_selectedDevice] uniqueID] stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]];
+ qtkaudio_currdevice_uid = [[(QTCaptureDevice *)[qtkaudioDevices objectAtIndex:i_selectedDevice] uniqueID] stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]];
}
[o_screen_qtk_audio_pop selectItemAtIndex: i_selectedDevice];
[o_qtk_audio_device_pop selectItemAtIndex: i_selectedDevice];
@@ -674,12 +674,12 @@ static VLCOpen *_o_sharedMainInstance = nil;
NSMutableArray *o_values = [NSMutableArray arrayWithCapacity:count];
NSMutableArray *o_array = [NSMutableArray arrayWithCapacity:count];
for (NSUInteger i = 0; i < count; i++)
- [o_values addObject: [o_urls[i] path]];
+ [o_values addObject: [[o_urls objectAtIndex:i] path]];
[o_values sortUsingSelector:@selector(caseInsensitiveCompare:)];
for (NSUInteger i = 0; i < count; i++) {
NSDictionary *o_dic;
- char *psz_uri = vlc_path2uri([o_values[i] UTF8String], "file");
+ char *psz_uri = vlc_path2uri([[o_values objectAtIndex:i] UTF8String], "file");
if (!psz_uri)
continue;
@@ -746,7 +746,7 @@ static VLCOpen *_o_sharedMainInstance = nil;
if (returnCode == NSFileHandlingPanelOKButton) {
if (o_file_path)
[o_file_path release];
- o_file_path = [[o_open_panel URLs][0] path];
+ o_file_path = [[[o_open_panel URLs] objectAtIndex: 0] path];
[o_file_path retain];
[self openFilePathChanged: nil];
}
@@ -770,7 +770,7 @@ static VLCOpen *_o_sharedMainInstance = nil;
if ([o_open_panel runModal] == NSOKButton) {
if (o_file_slave_path)
[o_file_slave_path release];
- o_file_slave_path = [[o_open_panel URLs][0] path];
+ o_file_slave_path = [[[o_open_panel URLs] objectAtIndex: 0] path];
[o_file_slave_path retain];
}
}
@@ -921,7 +921,7 @@ static VLCOpen *_o_sharedMainInstance = nil;
NSArray *dirContents = [fm contentsOfDirectoryAtPath:mountPath error:nil];
for (int i = 0; i < [dirContents count]; i++) {
- NSString *currentFile = dirContents[i];
+ NSString *currentFile = [dirContents objectAtIndex: i];
NSString *fullPath = [mountPath stringByAppendingPathComponent:currentFile];
BOOL isDir;
@@ -1028,7 +1028,7 @@ static VLCOpen *_o_sharedMainInstance = nil;
NSUInteger count = [o_paths count];
NSMutableArray *o_result = [NSMutableArray arrayWithCapacity:count];
for (NSUInteger i = 0; i < count; i++)
- [o_result addObject: [self scanPath:o_paths[i]]];
+ [o_result addObject: [self scanPath:o_paths] objectAtIndex:i];
@synchronized (self) {
if (o_opticalDevices)
@@ -1050,7 +1050,7 @@ static VLCOpen *_o_sharedMainInstance = nil;
[o_specialMediaFolders addObject:o_dict];
}
- [self performSelectorOnMainThread:@selector(updateMediaSelector:) withObject:@YES waitUntilDone:NO];
+ [self performSelectorOnMainThread:@selector(updateMediaSelector:) withObject:YES waitUntilDone:NO];
[o_pool release];
}
@@ -1072,7 +1072,7 @@ static VLCOpen *_o_sharedMainInstance = nil;
NSUInteger count = [o_allMediaDevices count];
if (count > 0) {
for (NSUInteger i = 0; i < count ; i++) {
- NSDictionary *o_dict = o_allMediaDevices[i];
+ NSDictionary *o_dict = [o_allMediaDevices objectAtIndex:i];
[o_disc_selector_pop addItemWithTitle: [[NSFileManager defaultManager] displayNameAtPath:[o_dict objectForKey:@"path"]]];
}
@@ -1096,7 +1096,7 @@ static VLCOpen *_o_sharedMainInstance = nil;
- (IBAction)discSelectorChanged:(id)sender
{
- NSDictionary *o_dict = o_allMediaDevices[[o_disc_selector_pop indexOfSelectedItem]];
+ NSDictionary *o_dict = [o_allMediaDevices objectAtIndex:[o_disc_selector_pop indexOfSelectedItem]];
[self showOpticalAtPath:o_dict];
}
@@ -1116,7 +1116,7 @@ static VLCOpen *_o_sharedMainInstance = nil;
[o_open_panel setAllowedFileTypes:@[@"public.directory"]];
if ([o_open_panel runModal] == NSOKButton) {
- NSString *o_path = [[o_open_panel URLs][0] path];
+ NSString *o_path = [[[o_open_panel URLs] objectAtIndex:0] path];
if ([o_path length] > 0) {
[NSThread detachNewThreadSelector:@selector(scanSpecialPath:) toTarget:self withObject:o_path];
}
@@ -1125,7 +1125,7 @@ static VLCOpen *_o_sharedMainInstance = nil;
- (IBAction)dvdreadOptionChanged:(id)sender
{
- NSDictionary *o_dict = o_allMediaDevices[[o_disc_selector_pop indexOfSelectedItem]];
+ NSDictionary *o_dict = [o_allMediaDevices objectAtIndex:[o_disc_selector_pop indexOfSelectedItem]];
NSString *o_device_path = [o_dict objectForKey:@"devicePath"];
if (sender == o_disc_dvdwomenus_enablemenus_btn) {
@@ -1162,7 +1162,7 @@ static VLCOpen *_o_sharedMainInstance = nil;
if (sender == o_disc_vcd_chapter_stp)
[o_disc_vcd_chapter setIntValue: [o_disc_vcd_chapter_stp intValue]];
- NSString *o_device_path = [o_allMediaDevices[[o_disc_selector_pop indexOfSelectedItem]] objectForKey:@"devicePath"];
+ NSString *o_device_path = [o_allMediaDevices objectAtIndex:[o_disc_selector_pop indexOfSelectedItem] objectForKey:@"devicePath"];
[self setMRL: [NSString stringWithFormat: @"vcd://%@@%i:%i", o_device_path, [o_disc_vcd_title intValue], [o_disc_vcd_chapter intValue]]];
}
@@ -1367,7 +1367,7 @@ static VLCOpen *_o_sharedMainInstance = nil;
returnedError = CGGetOnlineDisplayList(displayCount, ids, &displayCount);
if (!returnedError) {
for (i = 0; i < [o_displayInfos count]; i ++) {
- v = o_displayInfos[i];
+ v = [o_displayInfos objectAtIndex:i];
free([v pointerValue]);
}
[o_displayInfos removeAllObjects];
@@ -1544,7 +1544,7 @@ static VLCOpen *_o_sharedMainInstance = nil;
[o_open_panel setPrompt: _NS("Open")];
if ([o_open_panel runModal] == NSOKButton) {
- o_sub_path = [[o_open_panel URLs][0] path];
+ o_sub_path = [[[o_open_panel URLs] objectAtIndex:0] path];
[o_sub_path retain];
[o_file_subtitles_filename_lbl setStringValue: [[NSFileManager defaultManager] displayNameAtPath:o_sub_path]];
[o_file_sub_path_fld setStringValue: [o_file_subtitles_filename_lbl stringValue]];
diff --git a/modules/gui/macosx/playlist.m b/modules/gui/macosx/playlist.m
index 28b750c..47e91d6 100644
--- a/modules/gui/macosx/playlist.m
+++ b/modules/gui/macosx/playlist.m
@@ -470,12 +470,12 @@
[o_playlist_header setMenu: o_context_menu];
for (NSUInteger i = 0; i < count; i++) {
- o_column = o_columnArray[i][0];
+ o_column = [[o_columnArray objectAtIndex:i] objectAtIndex:0];
if ([o_column isEqualToString:@"status"])
continue;
[o_menu setPlaylistColumnTableState: NSOnState forColumn: o_column];
- [[o_outline_view tableColumnWithIdentifier: o_column] setWidth: [o_columnArray[i][1] floatValue]];
+ [[o_outline_view tableColumnWithIdentifier: o_column] setWidth: [[[o_columnArray objectAtIndex:i] objectAtIndex:1] floatValue]];
}
[[NSNotificationCenter defaultCenter] addObserver: self selector: @selector(applicationWillTerminate:) name: NSApplicationWillTerminateNotification object: nil];
@@ -522,7 +522,7 @@
/* Clear indications of any existing column sorting */
NSUInteger count = [[o_outline_view tableColumns] count];
for (NSUInteger i = 0 ; i < count ; i++)
- [o_outline_view setIndicatorImage:nil inTableColumn: [o_outline_view tableColumns][i]];
+ [o_outline_view setIndicatorImage:nil inTableColumn: [[o_outline_view tableColumns] objectAtIndex:i]];
[o_outline_view setHighlightedTableColumn:nil];
o_tc_sortColumn = nil;
@@ -599,7 +599,7 @@
id o_item;
if ((o_item = [o_outline_dict objectForKey:
[NSString stringWithFormat: @"%p",
- [o_array[j] pointerValue]]]) != nil) {
+ [[o_array objectAtIndex:j] pointerValue]]]) != nil) {
[o_outline_view expandItem: o_item];
}
}
@@ -671,7 +671,7 @@
if (o_items == o_nodes) {
if (j == i) continue;
}
- if ([self isItem: [o_items[i] pointerValue]
+ if ([self isItem: [[o_items objectAtIndex:i] pointerValue]
inNode: [o_nodes[j] pointerValue]
checkItemExistence: NO locked:NO]) {
[o_items removeObjectAtIndex:i];
@@ -1009,7 +1009,7 @@
if (o_options) {
NSUInteger count = [o_options count];
for (NSUInteger i = 0; i < count; i++)
- input_item_AddOption(p_input, [o_options[i] UTF8String], VLC_INPUT_OPTION_TRUSTED);
+ input_item_AddOption(p_input, [[o_options objectAtIndex:i] UTF8String], VLC_INPUT_OPTION_TRUSTED);
}
/* Recent documents menu */
@@ -1035,7 +1035,7 @@
NSDictionary *o_one_item;
/* Get the item */
- o_one_item = o_array[i_item];
+ o_one_item = [o_array objectAtIndex:i_item];
p_input = [self createItem: o_one_item];
if (!p_input)
continue;
@@ -1068,7 +1068,7 @@
NSDictionary *o_one_item;
/* Get the item */
- o_one_item = o_array[i_item];
+ o_one_item = [o_array objectAtIndex: i_item];
p_input = [self createItem: o_one_item];
if (!p_input)
@@ -1161,7 +1161,7 @@
if (o_result != NULL) {
int i_start;
- if ([o_result[0] pointerValue] == p_playlist->p_local_category)
+ if ([[o_result objectAtIndex:0] pointerValue] == p_playlist->p_local_category)
i_start = 1;
else
i_start = 0;
@@ -1170,11 +1170,11 @@
for (NSUInteger i = i_start ; i < count - 1 ; i++) {
[o_outline_view expandItem: [o_outline_dict objectForKey:
[NSString stringWithFormat: @"%p",
- [o_result[i] pointerValue]]]];
+ [[o_result objectAtIndex:i] pointerValue]]]];
}
i_row = [o_outline_view rowForItem: [o_outline_dict objectForKey:
[NSString stringWithFormat: @"%p",
- [o_result[count - 1] pointerValue]]]];
+ [[o_result objectAtIndex:(count - 1)] pointerValue]]]];
}
if (i_row > -1) {
[o_outline_view selectRowIndexes:[NSIndexSet indexSetWithIndex:i_row] byExtendingSelection:NO];
@@ -1366,7 +1366,7 @@
NSUInteger count = [o_columns count];
NSTableColumn * o_currentColumn;
for (NSUInteger i = 0; i < count; i++) {
- o_currentColumn = o_columns[i];
+ o_currentColumn = [o_columns objectAtIndex:i];
[o_arrayToSave addObject: @[[o_currentColumn identifier], @([o_currentColumn width])]];
}
[[NSUserDefaults standardUserDefaults] setObject: o_arrayToSave forKey:@"PlaylistColumnSelection"];
@@ -1400,7 +1400,7 @@
NSUInteger itemCount = [items count];
for (NSUInteger i = 0 ; i < itemCount ; i++) {
- id o_item = items[i];
+ id o_item = [items objectAtIndex:i];
/* Fill the items and nodes to move in 2 different arrays */
if (((playlist_item_t *)[o_item pointerValue])->i_children > 0)
@@ -1451,7 +1451,7 @@
NSUInteger count = [o_nodes_array count];
for (NSUInteger i = 0 ; i < count ; i++) {
/* We refuse to Drop in a child of an item we are moving */
- if ([self isItem: [item pointerValue] inNode: [o_nodes_array[i] pointerValue] checkItemExistence: NO locked:NO]) {
+ if ([self isItem: [item pointerValue] inNode: [[o_nodes_array objectAtIndex:i] pointerValue] checkItemExistence: NO locked:NO]) {
return NSDragOperationNone;
}
}
@@ -1505,7 +1505,7 @@
PL_LOCK;
NSUInteger j = 0;
for (NSUInteger i = 0; i < count; i++) {
- p_item = [o_all_items[i] pointerValue];
+ p_item = [[o_all_items objectAtIndex:i] pointerValue];
if (p_item)
pp_items[j++] = p_item;
}
@@ -1520,7 +1520,7 @@
free(pp_items);
[self playlistUpdated];
- i_row = [o_outline_view rowForItem:[o_outline_dict objectForKey:[NSString stringWithFormat: @"%p", [o_all_items[0] pointerValue]]]];
+ i_row = [o_outline_view rowForItem:[o_outline_dict objectForKey:[NSString stringWithFormat: @"%p", [[o_all_items objectAtIndex:0] pointerValue]]]];
if (i_row == -1)
i_row = [o_outline_view rowForItem:[o_outline_dict objectForKey:[NSString stringWithFormat: @"%p", p_new_parent]]];
@@ -1546,7 +1546,7 @@
BOOL b_returned = NO;
if (count == 1 && p_input) {
- b_returned = input_AddSubtitle(p_input, vlc_path2uri([o_values[0] UTF8String], NULL), true);
+ b_returned = input_AddSubtitle(p_input, vlc_path2uri([[o_values objectAtIndex:0] UTF8String], NULL), true);
vlc_object_release(p_input);
if (!b_returned)
return YES;
@@ -1556,7 +1556,7 @@
for (NSUInteger i = 0; i < count; i++) {
NSDictionary *o_dic;
- char *psz_uri = vlc_path2uri([o_values[i] UTF8String], NULL);
+ char *psz_uri = vlc_path2uri([[o_values objectAtIndex:i] UTF8String], NULL);
if (!psz_uri)
continue;
--
1.8.2.2
More information about the vlc-devel
mailing list