summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars-Dominik Braun <lars@6xq.net>2011-03-21 13:20:44 +0100
committerLars-Dominik Braun <lars@6xq.net>2011-03-21 14:54:34 +0100
commit89b04e6d798bb30b4d6a36c46bba3d624be4b559 (patch)
tree6f13867520769e9b434e43e87cf8c2a01b748e1a
parentab98a7b6ac4637301b0e2ff62970cabf2d639408 (diff)
downloadpianobar-windows-89b04e6d798bb30b4d6a36c46bba3d624be4b559.tar.gz
pianobar-windows-89b04e6d798bb30b4d6a36c46bba3d624be4b559.tar.bz2
pianobar-windows-89b04e6d798bb30b4d6a36c46bba3d624be4b559.zip
Enable delete seed in station manager
-rw-r--r--src/ui_act.c18
1 files 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,