summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLars-Dominik Braun <lars@6xq.net>2011-05-05 17:21:56 +0200
committerLars-Dominik Braun <lars@6xq.net>2011-05-05 17:49:03 +0200
commitda587f1423529e6daae07bc4ff604ab5d6132942 (patch)
tree5e2614ca9f7362a525b0350c25ab1f4ca3f097ec /src
parent2fc425e1a21c676861ec820bc1432292ea159aa9 (diff)
downloadpianobar-da587f1423529e6daae07bc4ff604ab5d6132942.tar.gz
pianobar-da587f1423529e6daae07bc4ff604ab5d6132942.tar.bz2
pianobar-da587f1423529e6daae07bc4ff604ab5d6132942.zip
Replace generic "search for artist/title" message
Closes #115
Diffstat (limited to 'src')
-rw-r--r--src/ui.c4
-rw-r--r--src/ui.h2
-rw-r--r--src/ui_act.c6
3 files changed, 7 insertions, 5 deletions
diff --git a/src/ui.c b/src/ui.c
index 94e559e..fd2302d 100644
--- a/src/ui.c
+++ b/src/ui.c
@@ -473,14 +473,14 @@ PianoArtist_t *BarUiSelectArtist (PianoArtist_t *startArtist,
* @param allow seed suggestions if != NULL
* @return musicId or NULL on abort/error
*/
-char *BarUiSelectMusicId (BarApp_t *app, char *similarToId) {
+char *BarUiSelectMusicId (BarApp_t *app, char *similarToId, const char *msg) {
char *musicId = NULL;
char lineBuf[100], selectBuf[2];
PianoSearchResult_t searchResult;
PianoArtist_t *tmpArtist;
PianoSong_t *tmpSong;
- BarUiMsg (MSG_QUESTION, "Search for artist/title: ");
+ BarUiMsg (MSG_QUESTION, msg);
if (BarReadlineStr (lineBuf, sizeof (lineBuf), &app->input,
BAR_RL_DEFAULT) > 0) {
if (strcmp ("?", lineBuf) == 0 && similarToId != NULL) {
diff --git a/src/ui.h b/src/ui.h
index 4489c71..32f075a 100644
--- a/src/ui.h
+++ b/src/ui.h
@@ -42,7 +42,7 @@ PianoStation_t *BarUiSelectStation (PianoHandle_t *, const char *,
PianoSong_t *BarUiSelectSong (const BarSettings_t *, PianoSong_t *,
BarReadlineFds_t *);
PianoArtist_t *BarUiSelectArtist (PianoArtist_t *, BarReadlineFds_t *);
-char *BarUiSelectMusicId (BarApp_t *, char *);
+char *BarUiSelectMusicId (BarApp_t *, char *, const char *);
void BarStationFromGenre (BarApp_t *);
void BarUiPrintStation (PianoStation_t *);
void BarUiPrintSong (const BarSettings_t *, const PianoSong_t *,
diff --git a/src/ui_act.c b/src/ui_act.c
index 9a8f67b..3785f46 100644
--- a/src/ui_act.c
+++ b/src/ui_act.c
@@ -98,7 +98,8 @@ BarUiActCallback(BarUiActAddMusic) {
assert (selStation != NULL);
- reqData.musicId = BarUiSelectMusicId (app, app->playlist->musicId);
+ reqData.musicId = BarUiSelectMusicId (app, app->playlist->musicId,
+ "Add artist or title to station: ");
if (reqData.musicId != NULL) {
if (!BarTransformIfShared (app, selStation)) {
return;
@@ -146,7 +147,8 @@ BarUiActCallback(BarUiActCreateStation) {
WaitressReturn_t wRet;
PianoRequestDataCreateStation_t reqData;
- reqData.id = BarUiSelectMusicId (app, NULL);
+ reqData.id = BarUiSelectMusicId (app, NULL,
+ "Create station from artist or title: ");
if (reqData.id != NULL) {
reqData.type = "mi";
BarUiMsg (MSG_INFO, "Creating station... ");