<plist version="1.0">
<dict>
<key>IBDocumentLocation</key>
- <string>134 289 496 270 0 0 1024 746 </string>
+ <string>520 277 496 270 0 0 1440 878 </string>
<key>IBEditorPositions</key>
<dict>
<key>1617</key>
<key>2197</key>
<string>422 532 596 143 0 0 1440 878 </string>
<key>29</key>
- <string>294 89 438 44 0 0 1024 746 </string>
+ <string>393 311 438 44 0 0 1440 878 </string>
<key>915</key>
<string>678 573 187 249 0 0 1280 1002 </string>
</dict>
<key>IBFramework Version</key>
- <string>439.0</string>
+ <string>443.0</string>
<key>IBLockedObjects</key>
<array/>
<key>IBOpenObjects</key>
<array>
<integer>29</integer>
<integer>21</integer>
+ <integer>2197</integer>
</array>
<key>IBSystem Version</key>
- <string>8F46</string>
+ <string>8G32</string>
</dict>
</plist>
BOOL b_selected_item_met;
BOOL b_isSortDescending;
id o_tc_sortColumn;
+
+ /* "add node" button and menu entry */
+ IBOutlet id o_mi_addNode;
+ IBOutlet id o_btn_addNode;
}
- (void)searchfieldChanged:(NSNotification *)o_notification;
- (IBAction)sortNodeByAuthor:(id)sender;
- (IBAction)recursiveExpandNode:(id)sender;
+- (IBAction)addNode:(id)sender;
+
- (void)appendArray:(NSArray*)o_array atPos:(int)i_position enqueue:(BOOL)b_enqueue;
- (void)appendNodeArray:(NSArray*)o_array inNode:(playlist_item_t *)p_node atPos:(int)i_position inView:(int)i_view enqueue:(BOOL)b_enqueue;
[[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
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)