]> git.sesse.net Git - vlc/commitdiff
macosx: remove NSValue around VLCAutogeneratedMenu
authorDerk-Jan Hartman <hartman@videolan.org>
Fri, 3 Apr 2009 11:39:10 +0000 (13:39 +0200)
committerDerk-Jan Hartman <hartman@videolan.org>
Fri, 3 Apr 2009 11:39:10 +0000 (13:39 +0200)
modules/gui/macosx/controls.m

index bf953c0b3139d02bf92761e9a1531087450496fc..98cf405125297e1f3b83f0edd79e6a71b6faa4c4 100644 (file)
     case VLC_VAR_VOID:
         o_data = [[VLCAutoGeneratedMenuContent alloc] initWithVariableName: psz_variable ofObject: p_object
                 andValue: val ofType: i_type];
-        [o_mi setRepresentedObject: [NSValue valueWithPointer:[o_data autorelease]]];
+        [o_mi setRepresentedObject: [o_data autorelease]];
         break;
 
     case VLC_VAR_BOOL:
         o_data = [[VLCAutoGeneratedMenuContent alloc] initWithVariableName: psz_variable ofObject: p_object
                 andValue: val ofType: i_type];
-        [o_mi setRepresentedObject: [NSValue valueWithPointer:[o_data autorelease]]];
+        [o_mi setRepresentedObject: [o_data autorelease]];
         if( !( i_type & VLC_VAR_ISCOMMAND ) )
             [o_mi setState: val.b_bool ? TRUE : FALSE ];
         break;
             o_lmi = [o_menu addItemWithTitle: o_title action: pf_callback keyEquivalent: @""];
             o_data = [[VLCAutoGeneratedMenuContent alloc] initWithVariableName: strdup(psz_variable) ofObject: p_object
                     andValue: another_val ofType: i_type];
-            [o_lmi setRepresentedObject: [NSValue valueWithPointer:[o_data autorelease]]];
+            [o_lmi setRepresentedObject: [o_data autorelease]];
             [o_lmi setTarget: self];
 
             if( !strcmp( val.psz_string, val_list.p_list->p_values[i].psz_string ) && !( i_type & VLC_VAR_ISCOMMAND ) )
             o_lmi = [o_menu addItemWithTitle: o_title action: pf_callback keyEquivalent: @""];
             o_data = [[VLCAutoGeneratedMenuContent alloc] initWithVariableName: strdup(psz_variable) ofObject: p_object
                     andValue: val_list.p_list->p_values[i] ofType: i_type];
-            [o_lmi setRepresentedObject: [NSValue valueWithPointer:[ o_data autorelease]]];
+            [o_lmi setRepresentedObject: [o_data autorelease]];
             [o_lmi setTarget: self];
 
             if( val_list.p_list->p_values[i].i_int == val.i_int && !( i_type & VLC_VAR_ISCOMMAND ) )
 - (IBAction)toggleVar:(id)sender
 {
     NSMenuItem *o_mi = (NSMenuItem *)sender;
-    VLCAutoGeneratedMenuContent *o_data = [[o_mi representedObject] pointerValue];
+    VLCAutoGeneratedMenuContent *o_data = [o_mi representedObject];
     [NSThread detachNewThreadSelector: @selector(toggleVarThread:)
         toTarget: self withObject: o_data];