[vlc-devel] commit: macosx: remove NSValue around VLCAutogeneratedMenu ( Derk-Jan Hartman )

git version control git at videolan.org
Fri Apr 3 13:46:54 CEST 2009


vlc | branch: master | Derk-Jan Hartman <hartman at videolan.org> | Fri Apr  3 13:39:10 2009 +0200| [e2fd56a120e23ffa23c2c2d262d4da18c0b356dd] | committer: Derk-Jan Hartman 

macosx: remove NSValue around VLCAutogeneratedMenu

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e2fd56a120e23ffa23c2c2d262d4da18c0b356dd
---

 modules/gui/macosx/controls.m |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/modules/gui/macosx/controls.m b/modules/gui/macosx/controls.m
index bf953c0..98cf405 100644
--- a/modules/gui/macosx/controls.m
+++ b/modules/gui/macosx/controls.m
@@ -710,13 +710,13 @@
     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;
@@ -821,7 +821,7 @@
             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 ) )
@@ -839,7 +839,7 @@
             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 ) )
@@ -867,7 +867,7 @@
 - (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];
 




More information about the vlc-devel mailing list