Commit c2d4afc4 authored by Benjamin Pracht's avatar Benjamin Pracht

Part of the context menu:

* same options for node and items ATM
* some options still don't work
parent 28a3a504
......@@ -80,7 +80,6 @@
ACTIONS = {
createOutlineGroup = id;
deleteOutlineGroup = id;
handleGroup = id;
infoCancel = id;
infoOk = id;
toggleInfoPanel = id;
......@@ -91,13 +90,8 @@
OUTLETS = {
"o_author_lbl" = id;
"o_author_txt" = id;
"o_btn_add_group" = id;
"o_btn_cancel" = id;
"o_btn_delete_group" = id;
"o_btn_ok" = id;
"o_group_cbx" = id;
"o_group_color" = id;
"o_group_lbl" = id;
"o_info_window" = id;
"o_outline_view" = id;
"o_title_lbl" = id;
......@@ -395,13 +389,18 @@
SUPERCLASS = NSObject;
},
{
ACTIONS = {handlePopUp = id; searchItem = id; };
ACTIONS = {handlePopUp = id; playItem = id; searchItem = id; selectAll = id; };
CLASS = VLCPlaylist;
LANGUAGE = ObjC;
OUTLETS = {
"o_btn_playlist" = id;
"o_ctx_menu" = id;
"o_loop_popup" = id;
"o_mi_delete" = id;
"o_mi_info" = id;
"o_mi_play" = id;
"o_mi_save_playlist" = id;
"o_mi_selectall" = id;
"o_outline_view" = id;
"o_random_ckb" = id;
"o_search_field" = id;
......
......@@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>IBDocumentLocation</key>
<string>45 176 505 517 0 0 1024 746 </string>
<string>94 104 505 517 0 0 1024 746 </string>
<key>IBEditorPositions</key>
<dict>
<key>1617</key>
......@@ -13,7 +13,7 @@
<key>29</key>
<string>84 667 419 44 0 0 1024 746 </string>
<key>915</key>
<string>54 452 185 199 0 0 1024 746 </string>
<string>54 452 100 130 0 0 1024 746 </string>
</dict>
<key>IBFramework Version</key>
<string>364.0</string>
......@@ -26,10 +26,8 @@
</array>
<key>IBOpenObjects</key>
<array>
<integer>2197</integer>
<integer>915</integer>
<integer>29</integer>
<integer>1789</integer>
<integer>21</integer>
</array>
<key>IBSystem Version</key>
<string>7R28</string>
......
......@@ -68,10 +68,11 @@
- (NSMenu *)menuForEvent:(NSEvent *)o_event;
- (void)playlistUpdated;
- (void)playItem:(id)sender;
- (IBAction)playItem:(id)sender;
- (IBAction)selectAll:(id)sender;
- (void)appendArray:(NSArray*)o_array atPos:(int)i_position enqueue:(BOOL)b_enqueue;
- (void)initDict;
@end
......@@ -65,12 +65,6 @@
return( [[self delegate] menuForEvent: o_event] );
}
- reloadPlaylist
{
[[self delegate] initDict];
[self reloadData];
}
- (bool)isItem:(playlist_item_t *)p_item inNode:(playlist_item_t *)p_node
{
playlist_t * p_playlist = vlc_object_find( VLCIntf, VLC_OBJECT_PLAYLIST,
......@@ -165,7 +159,7 @@ msg_Dbg( p_intf, "KEYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY");
}
playlist_Delete( p_playlist, p_item->input.i_id );
}
[self reloadPlaylist];
[[self delegate] playlistUpdated];
}
break;
......@@ -239,15 +233,10 @@ belongs to an Apple hidden private API, and then can "disapear" at any time*/
- (void)initStrings
{
[o_mi_save_playlist setTitle: _NS("Save Playlist...")];
#if 0
[o_mi_play setTitle: _NS("Play")];
[o_mi_delete setTitle: _NS("Delete")];
[o_mi_selectall setTitle: _NS("Select All")];
[o_mi_toggleItemsEnabled setTitle: _NS("Item Enabled")];
[o_mi_enableGroup setTitle: _NS("Enable all group items")];
[o_mi_disableGroup setTitle: _NS("Disable all group items")];
[o_mi_info setTitle: _NS("Properties")];
#endif
[[o_tc_name headerCell] setStringValue:_NS("Name")];
[[o_tc_author headerCell] setStringValue:_NS("Author")];
[[o_tc_duration headerCell] setStringValue:_NS("Duration")];
......@@ -266,6 +255,7 @@ belongs to an Apple hidden private API, and then can "disapear" at any time*/
- (void)playlistUpdated
{
[o_outline_dict removeAllObjects];
[o_outline_view reloadData];
}
......@@ -319,6 +309,12 @@ belongs to an Apple hidden private API, and then can "disapear" at any time*/
}
}
- (IBAction)selectAll:(id)sender
{
[o_outline_view selectAll: nil];
}
- (void)appendArray:(NSArray*)o_array atPos:(int)i_position enqueue:(BOOL)b_enqueue
{
int i_item;
......@@ -597,11 +593,6 @@ belongs to an Apple hidden private API, and then can "disapear" at any time*/
return( o_ctx_menu );
}
- (void)initDict
{
[o_outline_dict removeAllObjects];
}
@end
@implementation VLCPlaylist (NSOutlineViewDataSource)
......
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