Commit 0d78e9eb authored by Derk-Jan Hartman's avatar Derk-Jan Hartman

* Added playlist preparse item to the playlist contextual menu.

parent 5a896a3e
......@@ -245,6 +245,7 @@
deleteItem = id;
handlePopUp = id;
playItem = id;
preparseItem = id;
recursiveExpandNode = id;
savePlaylist = id;
searchItem = id;
......@@ -261,6 +262,7 @@
"o_mi_delete" = id;
"o_mi_info" = id;
"o_mi_play" = id;
"o_mi_preparse" = id;
"o_mi_recursive_expand" = id;
"o_mi_save_playlist" = id;
"o_mi_selectall" = id;
......
......@@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>IBDocumentLocation</key>
<string>52 78 496 270 0 0 1440 878 </string>
<string>531 112 496 270 0 0 1280 1002 </string>
<key>IBEditorPositions</key>
<dict>
<key>1617</key>
......@@ -11,19 +11,19 @@
<key>2197</key>
<string>422 532 596 143 0 0 1440 878 </string>
<key>29</key>
<string>557 789 437 44 0 0 1440 878 </string>
<string>468 906 437 44 0 0 1280 1002 </string>
<key>915</key>
<string>756 516 178 230 0 0 1024 746 </string>
<string>678 573 187 249 0 0 1280 1002 </string>
</dict>
<key>IBFramework Version</key>
<string>437.0</string>
<string>439.0</string>
<key>IBLockedObjects</key>
<array/>
<key>IBOpenObjects</key>
<array>
<integer>2029</integer>
<integer>29</integer>
<integer>21</integer>
<integer>29</integer>
<integer>2029</integer>
</array>
<key>IBSystem Version</key>
<string>8C46</string>
......
......@@ -81,6 +81,7 @@
IBOutlet id o_mi_play;
IBOutlet id o_mi_delete;
IBOutlet id o_mi_info;
IBOutlet id o_mi_preparse;
IBOutlet id o_mi_selectall;
IBOutlet id o_mi_sort_name;
IBOutlet id o_mi_sort_author;
......@@ -119,6 +120,7 @@
- (IBAction)servicesChange:(id)sender;
- (IBAction)playItem:(id)sender;
- (IBAction)preparseItem:(id)sender;
- (IBAction)savePlaylist:(id)sender;
- (IBAction)deleteItem:(id)sender;
- (IBAction)selectAll:(id)sender;
......
......@@ -492,6 +492,7 @@ belongs to an Apple hidden private API, and then can "disapear" at any time*/
[o_mi_recursive_expand setTitle: _NS("Expand Node")];
[o_mi_selectall setTitle: _NS("Select All")];
[o_mi_info setTitle: _NS("Properties")];
[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_mi_services setTitle: _NS("Services discovery")];
......@@ -810,6 +811,49 @@ belongs to an Apple hidden private API, and then can "disapear" at any time*/
}
}
/* When called retrieves the selected outlineview row and plays that node or item */
- (IBAction)preparseItem:(id)sender
{
int i_count;
NSMutableArray *o_to_preparse;
intf_thread_t * p_intf = VLCIntf;
playlist_t * p_playlist = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
FIND_ANYWHERE );
o_to_preparse = [NSMutableArray arrayWithArray:[[o_outline_view selectedRowEnumerator] allObjects]];
i_count = [o_to_preparse count];
if( p_playlist != NULL )
{
int i, i_row;
NSNumber *o_number;
playlist_item_t *p_item = NULL;
for( i = 0; i < i_count; i++ )
{
o_number = [o_to_preparse lastObject];
i_row = [o_number intValue];
p_item = [[o_outline_view itemAtRow:i_row] pointerValue];
[o_to_preparse removeObject: o_number];
[o_outline_view deselectRow: i_row];
if( p_item )
{
if( p_item->i_children == -1 )
{
playlist_PreparseEnqueue( p_playlist, &p_item->input );
}
else
{
msg_Dbg( p_intf, "preparse of nodes not yet implemented" );
}
}
}
vlc_object_release( p_playlist );
}
[self playlistUpdated];
}
- (IBAction)servicesChange:(id)sender
{
NSMenuItem *o_mi = (NSMenuItem *)sender;
......@@ -1331,6 +1375,7 @@ belongs to an Apple hidden private API, and then can "disapear" at any time*/
[o_mi_delete setEnabled: b_item_sel];
[o_mi_selectall setEnabled: b_rows];
[o_mi_info setEnabled: b_item_sel];
[o_mi_preparse 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];
......
......@@ -55,6 +55,7 @@
NSMutableDictionary *o_save_prefs;
IBOutlet id o_prefs_window;
IBOutlet id o_title;
IBOutlet id o_tree;
IBOutlet id o_prefs_view;
IBOutlet id o_save_btn;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment