+ return YES;
+}
+
+/* retrieve the string values for the cells */
+- (id)outlineView:(NSOutlineView *)outlineView objectValueForTableColumn:(NSTableColumn *)o_tc byItem:(id)item
+{
+ id o_value = nil;
+ playlist_item_t *p_item;
+
+ if( item == nil || ![item isKindOfClass: [NSValue class]] ) return( @"error" );
+
+ p_item = (playlist_item_t *)[item pointerValue];
+ if( p_item == NULL )
+ {
+ return( @"error");
+ }
+//NSLog( @"values for %p", p_item );
+
+ if( [[o_tc identifier] isEqualToString:@"1"] )
+ {
+ /* sanity check to prevent the NSString class from crashing */
+ if( p_item->p_input->psz_name != NULL )
+ {
+ o_value = [NSString stringWithUTF8String:
+ p_item->p_input->psz_name];
+ if( o_value == NULL )
+ o_value = [NSString stringWithCString:
+ p_item->p_input->psz_name];
+ }
+ }
+ else if( [[o_tc identifier] isEqualToString:@"2"] && p_item->p_input->p_meta &&
+ p_item->p_input->p_meta->psz_artist && *p_item->p_input->p_meta->psz_artist )
+ {
+ o_value = [NSString stringWithUTF8String:
+ p_item->p_input->p_meta->psz_artist];
+ if( o_value == NULL )
+ o_value = [NSString stringWithCString:
+ p_item->p_input->p_meta->psz_artist];
+ }
+ else if( [[o_tc identifier] isEqualToString:@"3"] )
+ {
+ char psz_duration[MSTRTIME_MAX_SIZE];
+ mtime_t dur = p_item->p_input->i_duration;
+ if( dur != -1 )
+ {
+ secstotimestr( psz_duration, dur/1000000 );
+ o_value = [NSString stringWithUTF8String: psz_duration];
+ }
+ else
+ {
+ o_value = @"-:--:--";
+ }
+ }
+
+ return( o_value );
+}
+
+@end
+
+/*****************************************************************************
+ * VLCPlaylistWizard implementation
+ *****************************************************************************/
+@implementation VLCPlaylistWizard
+
+- (IBAction)reloadOutlineView
+{
+ /* Only reload the outlineview if the wizard window is open since this can
+ be quite long on big playlists */
+ if( [[o_outline_view window] isVisible] )