Commit 5e8d27a2 authored by Felix Paul Kühne's avatar Felix Paul Kühne

macosx: use modern ObjC syntax for C-Numbers to NSNumber conversations

parent cc3fef6d
...@@ -350,7 +350,7 @@ static int Open(vlc_object_t *p_this) ...@@ -350,7 +350,7 @@ static int Open(vlc_object_t *p_this)
[p_sys->output setSampleBufferDelegate:p_sys->output queue:queue]; [p_sys->output setSampleBufferDelegate:p_sys->output queue:queue];
dispatch_release(queue); dispatch_release(queue);
p_sys->output.videoSettings = [NSDictionary dictionaryWithObject:[NSNumber numberWithInt:kCVPixelFormatType_32BGRA] forKey:(id)kCVPixelBufferPixelFormatTypeKey]; p_sys->output.videoSettings = [NSDictionary dictionaryWithObject:@(kCVPixelFormatType_32BGRA) forKey:(id)kCVPixelBufferPixelFormatTypeKey];
[p_sys->session startRunning]; [p_sys->session startRunning];
[input release]; [input release];
......
...@@ -344,10 +344,10 @@ static int Open(vlc_object_t *p_this) ...@@ -344,10 +344,10 @@ static int Open(vlc_object_t *p_this)
msg_Dbg(p_demux, "PAR size %i %i", (int)par_size.width, (int)par_size.height); msg_Dbg(p_demux, "PAR size %i %i", (int)par_size.width, (int)par_size.height);
[p_sys->output setPixelBufferAttributes: [NSDictionary dictionaryWithObjectsAndKeys: [p_sys->output setPixelBufferAttributes: [NSDictionary dictionaryWithObjectsAndKeys:
[NSNumber numberWithUnsignedInt:kCVPixelFormatType_422YpCbCr8], (id)kCVPixelBufferPixelFormatTypeKey, @(kCVPixelFormatType_422YpCbCr8), (id)kCVPixelBufferPixelFormatTypeKey,
[NSNumber numberWithInt: p_sys->height], kCVPixelBufferHeightKey, @(p_sys->height), kCVPixelBufferHeightKey,
[NSNumber numberWithInt: p_sys->width], kCVPixelBufferWidthKey, @(p_sys->width), kCVPixelBufferWidthKey,
[NSNumber numberWithBool:YES], (id)kCVPixelBufferOpenGLCompatibilityKey, @YES, (id)kCVPixelBufferOpenGLCompatibilityKey,
nil]]; nil]];
[p_sys->output setAutomaticallyDropsLateVideoFrames:YES]; [p_sys->output setAutomaticallyDropsLateVideoFrames:YES];
[p_sys->output setMinimumVideoFrameInterval: (1/25)]; // 25 fps [p_sys->output setMinimumVideoFrameInterval: (1/25)]; // 25 fps
......
...@@ -86,25 +86,25 @@ static AppleRemote *_o_sharedInstance = nil; ...@@ -86,25 +86,25 @@ static AppleRemote *_o_sharedInstance = nil;
hidDeviceInterface = NULL; hidDeviceInterface = NULL;
NSMutableDictionary * mutableCookieToButtonMapping = [[NSMutableDictionary alloc] init]; NSMutableDictionary * mutableCookieToButtonMapping = [[NSMutableDictionary alloc] init];
[mutableCookieToButtonMapping setObject:[NSNumber numberWithInt:kRemoteButtonVolume_Plus] forKey:@"33_31_30_21_20_2_"]; [mutableCookieToButtonMapping setObject:@(kRemoteButtonVolume_Plus) forKey:@"33_31_30_21_20_2_"];
[mutableCookieToButtonMapping setObject:[NSNumber numberWithInt:kRemoteButtonVolume_Minus] forKey:@"33_32_30_21_20_2_"]; [mutableCookieToButtonMapping setObject:@(kRemoteButtonVolume_Minus) forKey:@"33_32_30_21_20_2_"];
[mutableCookieToButtonMapping setObject:[NSNumber numberWithInt:kRemoteButtonMenu] forKey:@"33_22_21_20_2_33_22_21_20_2_"]; [mutableCookieToButtonMapping setObject:@(kRemoteButtonMenu) forKey:@"33_22_21_20_2_33_22_21_20_2_"];
[mutableCookieToButtonMapping setObject:[NSNumber numberWithInt:kRemoteButtonPlay] forKey:@"33_23_21_20_2_33_23_21_20_2_"]; [mutableCookieToButtonMapping setObject:@(kRemoteButtonPlay) forKey:@"33_23_21_20_2_33_23_21_20_2_"];
[mutableCookieToButtonMapping setObject:[NSNumber numberWithInt:kRemoteButtonRight] forKey:@"33_24_21_20_2_33_24_21_20_2_"]; [mutableCookieToButtonMapping setObject:@(kRemoteButtonRight) forKey:@"33_24_21_20_2_33_24_21_20_2_"];
[mutableCookieToButtonMapping setObject:[NSNumber numberWithInt:kRemoteButtonLeft] forKey:@"33_25_21_20_2_33_25_21_20_2_"]; [mutableCookieToButtonMapping setObject:@(kRemoteButtonLeft) forKey:@"33_25_21_20_2_33_25_21_20_2_"];
[mutableCookieToButtonMapping setObject:[NSNumber numberWithInt:kRemoteButtonRight_Hold] forKey:@"33_21_20_14_12_2_"]; [mutableCookieToButtonMapping setObject:@(kRemoteButtonRight_Hold) forKey:@"33_21_20_14_12_2_"];
[mutableCookieToButtonMapping setObject:[NSNumber numberWithInt:kRemoteButtonLeft_Hold] forKey:@"33_21_20_13_12_2_"]; [mutableCookieToButtonMapping setObject:@(kRemoteButtonLeft_Hold) forKey:@"33_21_20_13_12_2_"];
[mutableCookieToButtonMapping setObject:[NSNumber numberWithInt:kRemoteButtonMenu_Hold] forKey:@"33_21_20_2_33_21_20_2_"]; [mutableCookieToButtonMapping setObject:@(kRemoteButtonMenu_Hold) forKey:@"33_21_20_2_33_21_20_2_"];
[mutableCookieToButtonMapping setObject:[NSNumber numberWithInt:kRemoteButtonPlay_Sleep] forKey:@"37_33_21_20_2_37_33_21_20_2_"]; [mutableCookieToButtonMapping setObject:@(kRemoteButtonPlay_Sleep) forKey:@"37_33_21_20_2_37_33_21_20_2_"];
[mutableCookieToButtonMapping setObject:[NSNumber numberWithInt:k2009RemoteButtonPlay] forKey:@"33_21_20_8_2_33_21_20_8_2_"]; [mutableCookieToButtonMapping setObject:@(k2009RemoteButtonPlay) forKey:@"33_21_20_8_2_33_21_20_8_2_"];
[mutableCookieToButtonMapping setObject:[NSNumber numberWithInt:k2009RemoteButtonFullscreen] forKey:@"33_21_20_3_2_33_21_20_3_2_"]; [mutableCookieToButtonMapping setObject:@(k2009RemoteButtonFullscreen) forKey:@"33_21_20_3_2_33_21_20_3_2_"];
if( OSX_SNOW_LEOPARD ) if( OSX_SNOW_LEOPARD )
/* 10.6.2+ Snow Leopard cookies */ /* 10.6.2+ Snow Leopard cookies */
[mutableCookieToButtonMapping setObject:[NSNumber numberWithInt:kRemoteControl_Switched] forKey:@"19_"]; [mutableCookieToButtonMapping setObject:@(kRemoteControl_Switched) forKey:@"19_"];
else else
/* Lion cookies */ /* Lion cookies */
[mutableCookieToButtonMapping setObject:[NSNumber numberWithInt:kRemoteControl_Switched] forKey:@"42_33_23_21_20_2_33_23_21_20_2_"]; [mutableCookieToButtonMapping setObject:@(kRemoteControl_Switched) forKey:@"42_33_23_21_20_2_33_23_21_20_2_"];
_cookieToButtonMapping = [[NSDictionary alloc] initWithDictionary: mutableCookieToButtonMapping]; _cookieToButtonMapping = [[NSDictionary alloc] initWithDictionary: mutableCookieToButtonMapping];
[mutableCookieToButtonMapping release]; [mutableCookieToButtonMapping release];
...@@ -343,7 +343,7 @@ static AppleRemote* sharedInstance=nil; ...@@ -343,7 +343,7 @@ static AppleRemote* sharedInstance=nil;
lastPlusMinusEvent = event; lastPlusMinusEvent = event;
lastPlusMinusEventTime = [NSDate timeIntervalSinceReferenceDate]; lastPlusMinusEventTime = [NSDate timeIntervalSinceReferenceDate];
[self performSelector:@selector(sendSimulatedPlusMinusEvent:) [self performSelector:@selector(sendSimulatedPlusMinusEvent:)
withObject:[NSNumber numberWithDouble:lastPlusMinusEventTime] withObject:@(lastPlusMinusEventTime)
afterDelay:HOLD_RECOGNITION_TIME_INTERVAL]; afterDelay:HOLD_RECOGNITION_TIME_INTERVAL];
return; return;
} else { } else {
...@@ -375,8 +375,8 @@ static AppleRemote* sharedInstance=nil; ...@@ -375,8 +375,8 @@ static AppleRemote* sharedInstance=nil;
eventClickCount = 1; eventClickCount = 1;
} }
lastClickCountEvent = event; lastClickCountEvent = event;
timeNumber = [NSNumber numberWithDouble:lastClickCountEventTime]; timeNumber = @(lastClickCountEventTime);
eventNumber= [NSNumber numberWithUnsignedInt:event]; eventNumber= @(event);
} }
[self performSelector: @selector(executeClickCountEvent:) [self performSelector: @selector(executeClickCountEvent:)
withObject: @[eventNumber, timeNumber] withObject: @[eventNumber, timeNumber]
...@@ -584,7 +584,7 @@ static void QueueCallbackFunction(void* target, IOReturn result, void* refcon, ...@@ -584,7 +584,7 @@ static void QueueCallbackFunction(void* target, IOReturn result, void* refcon,
if (object == nil || ![object isKindOfClass:[NSNumber class]]) continue; if (object == nil || ![object isKindOfClass:[NSNumber class]]) continue;
usagePage = [object longValue]; usagePage = [object longValue];
[mutableAllCookies addObject: [NSNumber numberWithInt:(int)cookie]]; [mutableAllCookies addObject: @((int)cookie)];
} }
_allCookies = [[NSArray alloc] initWithArray: mutableAllCookies]; _allCookies = [[NSArray alloc] initWithArray: mutableAllCookies];
[mutableAllCookies release]; [mutableAllCookies release];
......
...@@ -208,7 +208,7 @@ static void updateControlFromWidget(NSView *control, extension_widget_t *widget, ...@@ -208,7 +208,7 @@ static void updateControlFromWidget(NSView *control, extension_widget_t *widget,
for (value = widget->p_values; value != NULL; value = value->p_next) for (value = widget->p_values; value != NULL; value = value->p_next)
{ {
NSDictionary *entry = [NSDictionary dictionaryWithObjectsAndKeys: NSDictionary *entry = [NSDictionary dictionaryWithObjectsAndKeys:
[NSNumber numberWithInt:value->i_id], @"id", @(value->i_id), @"id",
@(value->psz_text), @"text", @(value->psz_text), @"text",
nil]; nil];
[contentArray addObject:entry]; [contentArray addObject:entry];
......
...@@ -411,7 +411,7 @@ ...@@ -411,7 +411,7 @@
} }
- (NSNumber*)extendedAccessibilityIsAttributeSettable: (NSString*)theAttributeName { - (NSNumber*)extendedAccessibilityIsAttributeSettable: (NSString*)theAttributeName {
return ([theAttributeName isEqualToString: NSAccessibilitySubroleAttribute] ? [NSNumber numberWithBool: NO] : nil); // make the Subrole attribute we added non-settable return ([theAttributeName isEqualToString: NSAccessibilitySubroleAttribute] ? @NO : nil); // make the Subrole attribute we added non-settable
} }
- (void)accessibilityPerformAction: (NSString*)theActionName { - (void)accessibilityPerformAction: (NSString*)theActionName {
......
...@@ -317,10 +317,10 @@ ...@@ -317,10 +317,10 @@
[dict setObject:view forKey:@"view"]; [dict setObject:view forKey:@"view"];
[_griddedViews addObject:dict]; [_griddedViews addObject:dict];
} }
[dict setObject:[NSNumber numberWithInt:rowSpan] forKey:@"rowSpan"]; [dict setObject:@(rowSpan) forKey:@"rowSpan"];
[dict setObject:[NSNumber numberWithInt:colSpan] forKey:@"colSpan"]; [dict setObject:@(colSpan) forKey:@"colSpan"];
[dict setObject:[NSNumber numberWithInt:row] forKey:@"row"]; [dict setObject:@(row) forKey:@"row"];
[dict setObject:[NSNumber numberWithInt:column] forKey:@"col"]; [dict setObject:@(column) forKey:@"col"];
[self addSubview:view]; [self addSubview:view];
[self relayout]; [self relayout];
......
...@@ -90,7 +90,7 @@ static VLAboutBox *_o_sharedInstance = nil; ...@@ -90,7 +90,7 @@ static VLAboutBox *_o_sharedInstance = nil;
/* l10n */ /* l10n */
[o_about_window setTitle: _NS("About VLC media player")]; [o_about_window setTitle: _NS("About VLC media player")];
NSDictionary *stringAttributes = [NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithInt:NSUnderlineStyleSingle], NSUnderlineStyleAttributeName, [NSColor colorWithCalibratedRed:0. green:0.3411 blue:0.6824 alpha:1.], NSForegroundColorAttributeName, [NSFont systemFontOfSize:13], NSFontAttributeName, nil]; NSDictionary *stringAttributes = [NSDictionary dictionaryWithObjectsAndKeys:@(NSUnderlineStyleSingle), NSUnderlineStyleAttributeName, [NSColor colorWithCalibratedRed:0. green:0.3411 blue:0.6824 alpha:1.], NSForegroundColorAttributeName, [NSFont systemFontOfSize:13], NSFontAttributeName, nil];
NSAttributedString *attrStr; NSAttributedString *attrStr;
attrStr = [[NSAttributedString alloc] initWithString:_NS("Credits") attributes:stringAttributes]; attrStr = [[NSAttributedString alloc] initWithString:_NS("Credits") attributes:stringAttributes];
[o_credits_btn setAttributedTitle:attrStr]; [o_credits_btn setAttributedTitle:attrStr];
......
...@@ -265,7 +265,7 @@ ...@@ -265,7 +265,7 @@
if ([self alphaValue] < 1.0 || b_displayed != YES) { if ([self alphaValue] < 1.0 || b_displayed != YES) {
if (![self fadeTimer]) if (![self fadeTimer])
[self setFadeTimer:[NSTimer scheduledTimerWithTimeInterval:0.05 target:self selector:@selector(focus:) userInfo:[NSNumber numberWithShort:1] repeats:YES]]; [self setFadeTimer:[NSTimer scheduledTimerWithTimeInterval:0.05 target:self selector:@selector(focus:) userInfo:@1 repeats:YES]];
else if ([[[self fadeTimer] userInfo] shortValue]==0) else if ([[[self fadeTimer] userInfo] shortValue]==0)
b_fadeQueued=YES; b_fadeQueued=YES;
} }
...@@ -279,7 +279,7 @@ ...@@ -279,7 +279,7 @@
if (([self alphaValue] > 0.0)) { if (([self alphaValue] > 0.0)) {
if (![self fadeTimer]) if (![self fadeTimer])
[self setFadeTimer:[NSTimer scheduledTimerWithTimeInterval:0.05 target:self selector:@selector(unfocus:) userInfo:[NSNumber numberWithShort:0] repeats:YES]]; [self setFadeTimer:[NSTimer scheduledTimerWithTimeInterval:0.05 target:self selector:@selector(unfocus:) userInfo:@0 repeats:YES]];
else if ([[[self fadeTimer] userInfo] shortValue]==1) else if ([[[self fadeTimer] userInfo] shortValue]==1)
b_fadeQueued=YES; b_fadeQueued=YES;
} }
......
...@@ -1153,7 +1153,7 @@ static VLCMain *_o_sharedMainInstance = nil; ...@@ -1153,7 +1153,7 @@ static VLCMain *_o_sharedMainInstance = nil;
/* simulate an event as long as the user holds the button */ /* simulate an event as long as the user holds the button */
b_remote_button_hold = pressedDown; b_remote_button_hold = pressedDown;
if (pressedDown) { if (pressedDown) {
NSNumber* buttonIdentifierNumber = [NSNumber numberWithInt: buttonIdentifier]; NSNumber* buttonIdentifierNumber = @(buttonIdentifier);
[self performSelector:@selector(executeHoldActionForRemoteButton:) [self performSelector:@selector(executeHoldActionForRemoteButton:)
withObject:buttonIdentifierNumber]; withObject:buttonIdentifierNumber];
} }
......
...@@ -1043,7 +1043,7 @@ static VLCOpen *_o_sharedMainInstance = nil; ...@@ -1043,7 +1043,7 @@ static VLCOpen *_o_sharedMainInstance = nil;
[o_specialMediaFolders addObject:o_dict]; [o_specialMediaFolders addObject:o_dict];
} }
[self performSelectorOnMainThread:@selector(updateMediaSelector:) withObject:[NSNumber numberWithBool:YES] waitUntilDone:NO]; [self performSelectorOnMainThread:@selector(updateMediaSelector:) withObject:@YES waitUntilDone:NO];
[o_pool release]; [o_pool release];
} }
......
...@@ -2006,9 +2006,9 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain]; \ ...@@ -2006,9 +2006,9 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain]; \
if (_p_item->value.psz && if (_p_item->value.psz &&
strstr(_p_item->value.psz, module_get_object(p_parser))) strstr(_p_item->value.psz, module_get_object(p_parser)))
o_moduleenabled = [NSNumber numberWithBool:YES]; o_moduleenabled = @YES;
else else
o_moduleenabled = [NSNumber numberWithBool:NO]; o_moduleenabled = @NO;
[o_modulearray addObject:[NSMutableArray [o_modulearray addObject:[NSMutableArray
arrayWithObjects: o_modulename, o_modulelongname, arrayWithObjects: o_modulename, o_modulelongname,
...@@ -2025,9 +2025,9 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain]; \ ...@@ -2025,9 +2025,9 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain]; \
#define addLuaIntf(shortname, longname) \ #define addLuaIntf(shortname, longname) \
if (_p_item->value.psz && strstr(_p_item->value.psz, shortname))\ if (_p_item->value.psz && strstr(_p_item->value.psz, shortname))\
o_moduleenabled = [NSNumber numberWithBool:YES];\ o_moduleenabled = @YES;\
else\ else\
o_moduleenabled = [NSNumber numberWithBool:NO];\ o_moduleenabled = @NO;\
[o_modulearray addObject:[NSMutableArray arrayWithObjects: @shortname, _NS(longname), o_moduleenabled, nil]] [o_modulearray addObject:[NSMutableArray arrayWithObjects: @shortname, _NS(longname), o_moduleenabled, nil]]
addLuaIntf("http", "Web"); addLuaIntf("http", "Web");
......
...@@ -359,7 +359,7 @@ static inline char * __config_GetLabel(vlc_object_t *p_this, const char *psz_nam ...@@ -359,7 +359,7 @@ static inline char * __config_GetLabel(vlc_object_t *p_this, const char *psz_nam
mi = [[NSMenuItem alloc] initWithTitle: [NSString stringWithFormat: @"%d", p_item->list.i[i]] action:NULL keyEquivalent: @""]; mi = [[NSMenuItem alloc] initWithTitle: [NSString stringWithFormat: @"%d", p_item->list.i[i]] action:NULL keyEquivalent: @""];
else else
msg_Err(p_intf, "item %d of pref %s failed to be created", i, name); msg_Err(p_intf, "item %d of pref %s failed to be created", i, name);
[mi setRepresentedObject:[NSNumber numberWithInt: p_item->list.i[i]]]; [mi setRepresentedObject:@(p_item->list.i[i])];
[[object menu] addItem: [mi autorelease]]; [[object menu] addItem: [mi autorelease]];
if (p_item->value.i == p_item->list.i[i]) if (p_item->value.i == p_item->list.i[i])
[object selectItem:[object lastItem]]; [object selectItem:[object lastItem]];
......
...@@ -632,8 +632,7 @@ static VLCWizard *_o_sharedInstance = nil; ...@@ -632,8 +632,7 @@ static VLCWizard *_o_sharedInstance = nil;
[o_t4_pop_videoCodec removeItemWithTitle:@"Theora"]; [o_t4_pop_videoCodec removeItemWithTitle:@"Theora"];
} else { } else {
/* RTP/UDP Unicast/Multicast Streaming */ /* RTP/UDP Unicast/Multicast Streaming */
[o_userSelections setObject: [[NSNumber numberWithInt: mode] [o_userSelections setObject: [@(mode) stringValue] forKey:@"stmgMhd"];
stringValue] forKey:@"stmgMhd"];
/* disable all codecs which don't support MPEG-TS */ /* disable all codecs which don't support MPEG-TS */
[o_t4_pop_audioCodec removeItemWithTitle:@"Vorbis"]; [o_t4_pop_audioCodec removeItemWithTitle:@"Vorbis"];
...@@ -678,7 +677,7 @@ static VLCWizard *_o_sharedInstance = nil; ...@@ -678,7 +677,7 @@ static VLCWizard *_o_sharedInstance = nil;
if ([o_t4_ckb_video state] == NSOnState) if ([o_t4_ckb_video state] == NSOnState)
{ {
NSNumber * theNum; NSNumber * theNum;
theNum = [NSNumber numberWithInt:[[o_t4_pop_videoCodec selectedItem]tag]]; theNum = @([[o_t4_pop_videoCodec selectedItem]tag]);
[o_userSelections setObject:@"YES" forKey:@"trnscdVideo"]; [o_userSelections setObject:@"YES" forKey:@"trnscdVideo"];
[o_userSelections setObject:[o_t4_pop_videoBitrate titleOfSelectedItem] [o_userSelections setObject:[o_t4_pop_videoBitrate titleOfSelectedItem]
forKey:@"trnscdVideoBitrate"]; forKey:@"trnscdVideoBitrate"];
...@@ -692,7 +691,7 @@ static VLCWizard *_o_sharedInstance = nil; ...@@ -692,7 +691,7 @@ static VLCWizard *_o_sharedInstance = nil;
if ([o_t4_ckb_audio state] == NSOnState) if ([o_t4_ckb_audio state] == NSOnState)
{ {
NSNumber * theNum; NSNumber * theNum;
theNum = [NSNumber numberWithInt:[[o_t4_pop_audioCodec selectedItem]tag]]; theNum = @([[o_t4_pop_audioCodec selectedItem]tag]);
[o_userSelections setObject:@"YES" forKey:@"trnscdAudio"]; [o_userSelections setObject:@"YES" forKey:@"trnscdAudio"];
[o_userSelections setObject:[o_t4_pop_audioBitrate titleOfSelectedItem] [o_userSelections setObject:[o_t4_pop_audioBitrate titleOfSelectedItem]
forKey:@"trnscdAudioBitrate"]; forKey:@"trnscdAudioBitrate"];
...@@ -1002,7 +1001,7 @@ static VLCWizard *_o_sharedInstance = nil; ...@@ -1002,7 +1001,7 @@ static VLCWizard *_o_sharedInstance = nil;
{ {
/* get the chosen encap format and store it */ /* get the chosen encap format and store it */
NSNumber * theNum; NSNumber * theNum;
theNum = [NSNumber numberWithInt:[[o_t5_matrix_encap selectedCell] tag]]; theNum = @([[o_t5_matrix_encap selectedCell] tag]);
[o_userSelections setObject:[theNum stringValue] forKey:@"encapFormat"]; [o_userSelections setObject:[theNum stringValue] forKey:@"encapFormat"];
/* show either "Streaming 2" or "Transcode 2" to the user */ /* show either "Streaming 2" or "Transcode 2" to the user */
...@@ -1051,8 +1050,7 @@ static VLCWizard *_o_sharedInstance = nil; ...@@ -1051,8 +1050,7 @@ static VLCWizard *_o_sharedInstance = nil;
/* include subtitles? */ /* include subtitles? */
[o_userSelections setObject: [o_userSelections setObject:
[[NSNumber numberWithInt:[o_t6_ckb_soverlay state]] stringValue] [@([o_t6_ckb_soverlay state]) stringValue] forKey: @"soverlay"];
forKey: @"soverlay"];
/* go to "Summary" */ /* go to "Summary" */
[self showSummary]; [self showSummary];
...@@ -1178,8 +1176,7 @@ static VLCWizard *_o_sharedInstance = nil; ...@@ -1178,8 +1176,7 @@ static VLCWizard *_o_sharedInstance = nil;
/* include subtitles ? */ /* include subtitles ? */
[o_userSelections setObject: [o_userSelections setObject:
[[NSNumber numberWithInt:[o_t7_ckb_soverlay state]] stringValue] [@([o_t7_ckb_soverlay state]) stringValue] forKey: @"soverlay"];
forKey: @"soverlay"];
/* go to "Summary" */ /* go to "Summary" */
[self showSummary]; [self showSummary];
......
...@@ -275,7 +275,7 @@ void updateProgressPanel (void *priv, const char *text, float value) ...@@ -275,7 +275,7 @@ void updateProgressPanel (void *priv, const char *text, float value)
intf_sys_t *sys = (intf_sys_t *)priv; intf_sys_t *sys = (intf_sys_t *)priv;
NSDictionary *dict = [NSDictionary dictionaryWithObjectsAndKeys: NSDictionary *dict = [NSDictionary dictionaryWithObjectsAndKeys:
[NSNumber numberWithFloat:value], @"value", @(value), @"value",
text ? @(text) : nil, @"text", text ? @(text) : nil, @"text",
nil]; nil];
...@@ -392,7 +392,7 @@ bool checkProgressPanel (void *priv) ...@@ -392,7 +392,7 @@ bool checkProgressPanel (void *priv)
break; break;
} }
return [NSNumber numberWithInt:ret]; return @(ret);
} }
- (NSDictionary *)displayLogin:(NSDictionary *)dialog - (NSDictionary *)displayLogin:(NSDictionary *)dialog
...@@ -456,7 +456,7 @@ bool checkProgressPanel (void *priv) ...@@ -456,7 +456,7 @@ bool checkProgressPanel (void *priv)
{ {
VLCAssertIsMainThread(); VLCAssertIsMainThread();
return [NSNumber numberWithBool:[_currentProgressBarPanel isCancelled]]; return @([_currentProgressBarPanel isCancelled]);
} }
#pragma mark - #pragma mark -
...@@ -744,7 +744,7 @@ static void updateControlFromWidget(NSView *control, extension_widget_t *widget, ...@@ -744,7 +744,7 @@ static void updateControlFromWidget(NSView *control, extension_widget_t *widget,
for(value = widget->p_values; value != NULL; value = value->p_next) for(value = widget->p_values; value != NULL; value = value->p_next)
{ {
NSDictionary *entry = [NSDictionary dictionaryWithObjectsAndKeys: NSDictionary *entry = [NSDictionary dictionaryWithObjectsAndKeys:
[NSNumber numberWithInt:value->i_id], @"id", @(value->i_id), @"id",
@(value->psz_text), @"text", @(value->psz_text), @"text",
nil]; nil];
[contentArray addObject:entry]; [contentArray addObject:entry];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment