vlc_list_release( p_list );
vlc_object_release( p_playlist );
- /* Change the simple textfield into a searchField if we can... */
-#if 0
- if( MACOS_VERSION >= 10.3 )
- {
- NSView *o_parentview = [o_status_field superview];
- NSSearchField *o_better_search_field = [[NSSearchField alloc]initWithFrame:[o_search_field frame]];
- [o_better_search_field setRecentsAutosaveName:@"VLC media player search"];
- [o_better_search_field setDelegate:self];
- [[NSNotificationCenter defaultCenter] addObserver: self
- selector: @selector(searchfieldChanged:)
- name: NSControlTextDidChangeNotification
- object: o_better_search_field];
-
- [o_better_search_field setTarget:self];
- [o_better_search_field setAction:@selector(searchItem:)];
-
- [o_better_search_field setAutoresizingMask:NSViewMinXMargin];
- [o_parentview addSubview:o_better_search_field];
- [o_search_field setHidden:YES];
- }
-#endif
//[self playlistUpdated];
}
[o_mi_delete setTitle: _NS("Delete")];
[o_mi_recursive_expand setTitle: _NS("Expand Node")];
[o_mi_selectall setTitle: _NS("Select All")];
- [o_mi_info setTitle: _NS("Properties")];
+ [o_mi_info setTitle: _NS("Information")];
[o_mi_preparse setTitle: _NS("Preparse")];
[o_mi_sort_name setTitle: _NS("Sort Node by Name")];
[o_mi_sort_author setTitle: _NS("Sort Node by Author")];
[[o_loop_popup itemAtIndex:0] setTitle: _NS("Standard Play")];
[[o_loop_popup itemAtIndex:1] setTitle: _NS("Repeat One")];
[[o_loop_popup itemAtIndex:2] setTitle: _NS("Repeat All")];
+ [o_mi_addNode setTitle: _NS("Add Folder to Playlist")];
}
- (void)playlistUpdated
{
unsigned int i;
- /* Clear indications of any existing column sorting*/
+ /* Clear indications of any existing column sorting */
for( i = 0 ; i < [[o_outline_view tableColumns] count] ; i++ )
{
[o_outline_view setIndicatorImage:nil inTableColumn:
vlc_object_release( p_playlist );
}
+- (IBAction)addNode:(id)sender
+{
+ /* simply adds a new node to the end of the playlist */
+ playlist_t * p_playlist = vlc_object_find( VLCIntf, VLC_OBJECT_PLAYLIST,
+ FIND_ANYWHERE );
+ if( !p_playlist )
+ {
+ msg_Err( VLCIntf, "Uh Oh! Unable to find playlist!" );
+ return;
+ }
+
+ playlist_item_t * p_item = playlist_NodeCreate( p_playlist, VIEW_CATEGORY,
+ _("Empty Folder"), p_playlist->p_general );
+
+ if(! p_item )
+ msg_Warn( VLCIntf, "node creation failed, fix VLC!" );
+
+ playlist_ViewUpdate( p_playlist, VIEW_CATEGORY );
+
+ vlc_object_release( p_playlist );
+}
+
@end
@implementation VLCPlaylist (NSOutlineViewDataSource)