return NULL;
}
-int ExecuteOnMainThread( id target, SEL sel, void * p_arg )
-{
- int i_ret = 0;
-
- //NSAutoreleasePool * o_pool = [[NSAutoreleasePool alloc] init];
-
- if( [target respondsToSelector: @selector(performSelectorOnMainThread:
- withObject:waitUntilDone:)] )
- {
- [target performSelectorOnMainThread: sel
- withObject: [NSValue valueWithPointer: p_arg]
- waitUntilDone: NO];
- }
- else if( NSApp != nil && [[VLCMain sharedInstance] respondsToSelector: @selector(getIntf)] )
- {
- NSValue * o_v1;
- NSValue * o_v2;
- NSArray * o_array;
- NSPort * o_recv_port;
- NSInvocation * o_inv;
- NSPortMessage * o_msg;
- intf_thread_t * p_intf;
- NSConditionLock * o_lock;
- NSMethodSignature * o_sig;
-
- id * val[] = { &o_lock, &o_v2 };
-
- p_intf = (intf_thread_t *)VLCIntf;
-
- o_recv_port = [[NSPort port] retain];
- o_v1 = [NSValue valueWithPointer: val];
- o_v2 = [NSValue valueWithPointer: p_arg];
-
- o_sig = [target methodSignatureForSelector: sel];
- o_inv = [NSInvocation invocationWithMethodSignature: o_sig];
- [o_inv setArgument: &o_v1 atIndex: 2];
- [o_inv setTarget: target];
- [o_inv setSelector: sel];
-
- o_array = [NSArray arrayWithObject:
- [NSData dataWithBytes: &o_inv length: sizeof(o_inv)]];
- o_msg = [[NSPortMessage alloc]
- initWithSendPort: p_intf->p_sys->o_sendport
- receivePort: o_recv_port components: o_array];
-
- o_lock = [[NSConditionLock alloc] initWithCondition: 0];
- [o_msg sendBeforeDate: [NSDate distantPast]];
- [o_lock lockWhenCondition: 1];
- [o_lock unlock];
- [o_lock release];
-
- [o_msg release];
- [o_recv_port release];
- }
- else
- {
- i_ret = 1;
- }
-
- //[o_pool release];
-
- return( i_ret );
-}
-
/*****************************************************************************
* playlistChanged: Callback triggered by the intf-change playlist
* variable, to let the intf update the playlist.
else
{
b_small_window = NO;
- [o_playlist_view setFrame: NSMakeRect( 10, 10, [o_window frame].size.width - 20, [o_window frame].size.height - 105 )];
+ [o_playlist_view setFrame: NSMakeRect( 0, 0, [o_window frame].size.width, [o_window frame].size.height - 95 )];
[o_playlist_view setNeedsDisplay:YES];
[o_playlist_view setAutoresizesSubviews: YES];
[[o_window contentView] addSubview: o_playlist_view];
vlc_object_unlock( p_intf );
[o_pool release];
+ var_DelCallback( p_playlist, "playlist-current", PlaylistChanged, self );
+ var_DelCallback( p_playlist, "intf-change", PlaylistChanged, self );
+ var_DelCallback( p_playlist, "item-change", PlaylistChanged, self );
+ var_DelCallback( p_playlist, "item-append", PlaylistChanged, self );
+ var_DelCallback( p_playlist, "item-deleted", PlaylistChanged, self );
+
pthread_testcancel(); /* If we were cancelled stop here */
msg_Info( p_intf, "Killing the Mac OS X module" );
{
/* If large and coming from small then show */
[o_playlist_view setAutoresizesSubviews: YES];
- [o_playlist_view setFrame: NSMakeRect( 10, 10, [o_window frame].size.width - 20, [o_window frame].size.height - [o_window minSize].height - 10 )];
+ [o_playlist_view setFrame: NSMakeRect( 0, 0, [o_window frame].size.width, [o_window frame].size.height - [o_window minSize].height )];
[o_playlist_view setNeedsDisplay:YES];
[[o_window contentView] addSubview: o_playlist_view];
b_small_window = NO;