From 89b04e6d798bb30b4d6a36c46bba3d624be4b559 Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Mon, 21 Mar 2011 13:20:44 +0100 Subject: Enable delete seed in station manager --- src/ui_act.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/src/ui_act.c b/src/ui_act.c index 491cedb..6c4e386 100644 --- a/src/ui_act.c +++ b/src/ui_act.c @@ -550,13 +550,27 @@ BarUiActCallback(BarUiActManageStation) { PianoArtist_t *artist = BarUiSelectArtist (reqData.info.artistSeeds, &app->input); if (artist != NULL) { - BarUiMsg (MSG_INFO, "Deleting artist %s\n", artist->name); + PianoRequestDataDeleteSeed_t reqData; + + memset (&reqData, 0, sizeof (reqData)); + reqData.artist = artist; + + BarUiMsg (MSG_INFO, "Deleting artist seed..."); + BarUiActDefaultPianoCall (PIANO_REQUEST_DELETE_SEED, &reqData); + BarUiActDefaultEventcmd ("stationdeleteartistseed"); } } else if (selectBuf[0] == 's') { PianoSong_t *song = BarUiSelectSong (&app->settings, reqData.info.songSeeds, &app->input); if (song != NULL) { - BarUiMsg (MSG_INFO, "Deleting seed %s\n", song->title); + PianoRequestDataDeleteSeed_t reqData; + + memset (&reqData, 0, sizeof (reqData)); + reqData.song = song; + + BarUiMsg (MSG_INFO, "Deleting song seed..."); + BarUiActDefaultPianoCall (PIANO_REQUEST_DELETE_SEED, &reqData); + BarUiActDefaultEventcmd ("stationdeletesongseed"); } } else if (selectBuf[0] == 'f') { PianoSong_t *song = BarUiSelectSong (&app->settings, -- cgit v1.2.3