]> git.sesse.net Git - vlc/blobdiff - modules/gui/macosx/playlist.m
*.m: unified the title of the Information-panel and the menu-items pointing to it...
[vlc] / modules / gui / macosx / playlist.m
index 4c9e6b9517033a0f1c8ea3f2cf4bb23fd26a6d9c..aa51b209eb07f97f4628c379bd831b644d518239 100644 (file)
@@ -463,27 +463,6 @@ belongs to an Apple hidden private API, and then can "disapear" at any time*/
     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];
 }
 
@@ -501,7 +480,7 @@ belongs to an Apple hidden private API, and then can "disapear" at any time*/
     [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")];
@@ -517,13 +496,14 @@ belongs to an Apple hidden private API, and then can "disapear" at any time*/
     [[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:
@@ -1494,6 +1474,28 @@ belongs to an Apple hidden private API, and then can "disapear" at any time*/
     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)