<plist version="1.0">
<dict>
<key>IBDocumentLocation</key>
- <string>852 421 505 517 0 0 1280 938 </string>
+ <string>23 -174 505 517 0 0 1024 746 </string>
<key>IBEditorPositions</key>
<dict>
<key>1617</key>
<string>542 480 104 149 0 0 1024 746 </string>
<key>2197</key>
- <string>150 134 596 368 0 0 1280 938 </string>
+ <string>259 330 596 367 0 0 1024 746 </string>
<key>29</key>
- <string>58 849 419 44 0 0 1280 938 </string>
+ <string>84 667 419 44 0 0 1024 746 </string>
<key>915</key>
<string>54 452 185 199 0 0 1024 746 </string>
</dict>
<key>IBLockedObjects</key>
<array>
<integer>1789</integer>
- <integer>2199</integer>
- <integer>2206</integer>
- <integer>2208</integer>
- <integer>2202</integer>
<integer>2203</integer>
+ <integer>2208</integer>
+ <integer>2206</integer>
+ <integer>2199</integer>
</array>
<key>IBOpenObjects</key>
<array>
<integer>21</integer>
+ <integer>29</integer>
<integer>2197</integer>
</array>
<key>IBSystem Version</key>
IBOutlet id o_tc_duration;
IBOutlet id o_status_field;
IBOutlet id o_search_field;
-
+ IBOutlet id o_random_ckb;
+ IBOutlet id o_loop_popup;
+ IBOutlet id o_mi_save_playlist;
+
NSImage *o_descendingSortingImage;
NSImage *o_ascendingSortingImage;
}
+- (IBAction)handlePopUp:(id)sender;
+
- (void)initStrings;
- (void)playlistUpdated;
- (void)playItem:(id)sender;
- (void)appendArray:(NSArray*)o_array atPos:(int)i_position enqueue:(BOOL)b_enqueue;
+
@end
- (void)initStrings
{
-#if 0
[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_tc_name headerCell] setStringValue:_NS("Name")];
[[o_tc_author headerCell] setStringValue:_NS("Author")];
[[o_tc_duration headerCell] setStringValue:_NS("Duration")];
-#if 0
[o_random_ckb setTitle: _NS("Random")];
+#if 0
[o_search_button setTitle: _NS("Search")];
#endif
[o_btn_playlist setToolTip: _NS("Playlist")];
-#if 0
[[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")];
-#endif
}
- (void)playlistUpdated
vlc_object_release( p_playlist );
}
+- (IBAction)handlePopUp:(id)sender
+
+{
+ intf_thread_t * p_intf = VLCIntf;
+ vlc_value_t val1,val2;
+ playlist_t * p_playlist = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
+ FIND_ANYWHERE );
+ if( p_playlist == NULL )
+ {
+ return;
+ }
+
+ switch ([o_loop_popup indexOfSelectedItem])
+ {
+ case 1:
+
+ val1.b_bool = 0;
+ var_Set( p_playlist, "loop", val1 );
+ val1.b_bool = 1;
+ var_Set( p_playlist, "repeat", val1 );
+ vout_OSDMessage( p_intf, DEFAULT_CHAN, _( "Repeat One" ) );
+ break;
+
+ case 2:
+ val1.b_bool = 0;
+ var_Set( p_playlist, "repeat", val1 );
+ val1.b_bool = 1;
+ var_Set( p_playlist, "loop", val1 );
+ vout_OSDMessage( p_intf, DEFAULT_CHAN, _( "Repeat All" ) );
+ break;
+
+ default:
+ var_Get( p_playlist, "repeat", &val1 );
+ var_Get( p_playlist, "loop", &val2 );
+ if (val1.b_bool || val2.b_bool)
+ {
+ val1.b_bool = 0;
+ var_Set( p_playlist, "repeat", val1 );
+ var_Set( p_playlist, "loop", val1 );
+ vout_OSDMessage( p_intf, DEFAULT_CHAN, _( "Repeat Off" ) );
+ }
+ break;
+ }
+ vlc_object_release( p_playlist );
+ [self playlistUpdated];
+}
+
@end
@implementation VLCPlaylist (NSOutlineViewDataSource)
vlc_object_release( p_playlist );
if( i_return == -1 ) i_return = 0;
msg_Dbg( p_playlist, "I have %d children", i_return );
+ [o_status_field setStringValue: [NSString stringWithFormat:
+ _NS("%i items in playlist"), i_return]];
return i_return;
}