* playlist.m: MacOS X interface module
*****************************************************************************
* Copyright (C) 2002-2004 VideoLAN
- * $Id: playlist.m,v 1.59 2004/03/03 11:34:19 bigben Exp $
+ * $Id$
*
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
* Derk-Jan Hartman <hartman at videolan dot org>
[o_table_view setIntercellSpacing: NSMakeSize (0.0, 1.0)];
[o_window setExcludedFromWindowsMenu: TRUE];
+// [o_tbv_info setDataSource: [VLCInfoDataSource init]];
+
/* We need to check whether _defaultTableHeaderSortImage exists, since it
belongs to an Apple hidden private API, and then can "disapear" at any time*/
[o_mi_play setTitle: _NS("Play")];
[o_mi_delete setTitle: _NS("Delete")];
[o_mi_selectall setTitle: _NS("Select All")];
+ [o_mi_info setTitle: _NS("Properties")];
+
[[o_tc_name headerCell] setStringValue:_NS("Name")];
[[o_tc_author headerCell] setStringValue:_NS("Author")];
[[o_tc_duration headerCell] setStringValue:_NS("Duration")];
}
if( o_tc_sortColumn == o_tc )
- {
+ {
b_isSortDescending = !b_isSortDescending;
}
else if( o_tc == o_tc_name || o_tc == o_tc_author ||
[o_mi_play setEnabled: b_item_sel];
[o_mi_delete setEnabled: b_item_sel];
[o_mi_selectall setEnabled: b_rows];
+ [o_mi_info setEnabled: b_item_sel];
return( o_ctx_menu );
}
vlc_mutex_lock( &p_playlist->object_lock );
o_current_name = [NSString stringWithUTF8String:
- p_playlist->pp_items[i_current]->psz_name];
+ p_playlist->pp_items[i_current]->input.psz_name];
o_current_author = [NSString stringWithUTF8String:
playlist_GetInfo(p_playlist, i_current ,_("General"),_("Author") )];
vlc_mutex_unlock( &p_playlist->object_lock );
[o_table_view scrollRowToVisible: i_row];
}
+- (int)selectedPlaylistItem
+{
+ return [o_table_view selectedRow];
+}
@end
{
vlc_mutex_lock( &p_playlist->object_lock );
o_value = [NSString stringWithUTF8String:
- p_playlist->pp_items[i_row]->psz_name];
+ p_playlist->pp_items[i_row]->input.psz_name];
+ if( o_value == NULL )
+ o_value = [NSString stringWithCString:
+ p_playlist->pp_items[i_row]->input.psz_name];
vlc_mutex_unlock( &p_playlist->object_lock );
}
else if( [[o_tc identifier] isEqualToString:@"2"] )
vlc_mutex_lock( &p_playlist->object_lock );
o_value = [NSString stringWithUTF8String:
playlist_GetInfo(p_playlist, i_row ,_("General"),_("Author") )];
+ if( o_value == NULL )
+ o_value = [NSString stringWithCString:
+ playlist_GetInfo(p_playlist, i_row ,_("General"),_("Author") )];
vlc_mutex_unlock( &p_playlist->object_lock );
}
else if( [[o_tc identifier] isEqualToString:@"3"] )
@end
+