<plist version="1.0">
<dict>
<key>IBDocumentLocation</key>
- <string>91 42 496 270 0 0 800 578 </string>
+ <string>43 309 496 270 0 0 1024 746 </string>
<key>IBEditorPositions</key>
<dict>
<key>1617</key>
<key>2197</key>
<string>214 442 596 144 0 0 1024 746 </string>
<key>29</key>
- <string>205 505 419 44 0 0 800 578 </string>
+ <string>326 664 419 44 0 0 1024 746 </string>
<key>915</key>
- <string>730 416 178 211 0 0 1024 746 </string>
+ <string>756 516 178 230 0 0 1024 746 </string>
</dict>
<key>IBFramework Version</key>
<string>364.0</string>
<array/>
<key>IBOpenObjects</key>
<array>
- <integer>29</integer>
- <integer>2029</integer>
<integer>21</integer>
</array>
<key>IBSystem Version</key>
IBOutlet id o_mi_selectall;
IBOutlet id o_mi_sort_name;
IBOutlet id o_mi_sort_author;
+ IBOutlet id o_mi_recursive_expand;
/* "services discovery" menu in the playlist menu */
IBOutlet id o_mi_services;
- (IBAction)selectAll:(id)sender;
- (IBAction)sortNodeByName:(id)sender;
- (IBAction)sortNodeByAuthor:(id)sender;
+- (IBAction)recursiveExpandNode:(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_mi_save_playlist setTitle: _NS("Save Playlist...")];
[o_mi_play setTitle: _NS("Play")];
[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_sort_name setTitle: _NS("Sort Node by Name")];
numberOfChildrenOfItem: o_item] > 0 )
//is a node and not an item
{
- id o_playing_item = [o_outline_dict objectForKey:
- [NSString stringWithFormat: @"%p", p_playlist->status.p_item]];
if( p_playlist->status.i_status != PLAYLIST_STOPPED &&
- [self isValueItem: o_playing_item inNode: o_item] == YES )
+ [self isItem: p_playlist->status.p_item inNode:
+ ((playlist_item_t *)[o_item pointerValue])] == YES )
{
// if current item is in selected node and is playing then stop playlist
playlist_Stop( p_playlist );
vlc_object_release( p_playlist );
}
+- (IBAction)recursiveExpandNode:(id)sender
+{
+ int i;
+ id o_item = [o_outline_view itemAtRow: [o_outline_view selectedRow]];
+ playlist_item_t *p_item = (playlist_item_t *)[o_item pointerValue];
+
+ if( ![[o_outline_view dataSource] outlineView: o_outline_view
+ isItemExpandable: o_item] )
+ {
+ for( i = 0 ; i < p_item->i_parents ; i++ )
+ {
+ if( p_item->pp_parents[i]->i_view == i_current_view )
+ {
+ o_item = [o_outline_dict objectForKey: [NSString
+ stringWithFormat: @"%p", p_item->pp_parents[i]->p_parent]];
+ break;
+ }
+ }
+ }
+
+ /* We need to collapse the node first, since OSX refuses to recursively
+ expand an already expanded node, even if children nodes are collapsed. */
+ [o_outline_view collapseItem: o_item collapseChildren: YES];
+ [o_outline_view expandItem: o_item expandChildren: YES];
+}
+
- (NSMenu *)menuForEvent:(NSEvent *)o_event
{
NSPoint pt;
[o_mi_delete setEnabled: b_item_sel];
[o_mi_selectall setEnabled: b_rows];
[o_mi_info setEnabled: b_item_sel];
+ [o_mi_recursive_expand setEnabled: b_item_sel];
+ [o_mi_sort_name setEnabled: b_item_sel];
+ [o_mi_sort_author setEnabled: b_item_sel];
return( o_ctx_menu );
}