MenuItem newPlayPlaylistItem = new MenuItem(playPlaylistMenu, SWT.PUSH);
newPlayPlaylistItem.setText(Messages.getString("TrayController.MenuDefaultPlaylist")); //$NON-NLS-1$
newPlayPlaylistItem.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
new PlayPlaylistAction(Constants.DEFAULT_PLAYLIST_ID).run();
}
});
new MenuItem(playPlaylistMenu, SWT.SEPARATOR);
Object[] playlistList = Controller.getInstance().getPlaylistController().getPlaylistList();
for (int i = 0; i < playlistList.length; i++) {
final MenuItem playlistItem = new MenuItem(playPlaylistMenu, SWT.PUSH);
playlistItem.setText(((Playlist) playlistList[i]).getName());
playlistItem.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
new PlayPlaylistAction(playlistItem.getText()).run();
}
});
}
if (ApplicationUtils.doesEngineSupportPodcasts()) {