summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorLars-Dominik Braun <PromyLOPh@gmail.com>2008-07-22 16:24:11 +0200
committerLars-Dominik Braun <PromyLOPh@gmail.com>2008-07-22 16:24:11 +0200
commit6f68808f29976443fa4af9de6b2d5535460e35e7 (patch)
treea5bd5d793b3af6905c27c8989bae5be341991f03 /src/main.c
parent5d504c7f88d35efe8e5c8e8236de1c0e171d6558 (diff)
downloadpianobar-windows-6f68808f29976443fa4af9de6b2d5535460e35e7.tar.gz
pianobar-windows-6f68808f29976443fa4af9de6b2d5535460e35e7.tar.bz2
pianobar-windows-6f68808f29976443fa4af9de6b2d5535460e35e7.zip
Fix wrong "select station" message
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/main.c b/src/main.c
index a2d096f..7b65ffd 100644
--- a/src/main.c
+++ b/src/main.c
@@ -78,11 +78,10 @@ char BarReadlineInt (char *prompt, int *retVal) {
* @param piano handle
* @return pointer to selected station or NULL
*/
-PianoStation_t *BarUiSelectStation (PianoHandle_t *ph) {
+PianoStation_t *BarUiSelectStation (PianoHandle_t *ph, char *prompt) {
PianoStation_t *curStation = NULL;
int i = 0;
- printf ("which station do you want to listen to?\n");
curStation = ph->stations;
while (curStation != NULL) {
printf ("%2i) %s%s\n", i, curStation->name,
@@ -90,7 +89,7 @@ PianoStation_t *BarUiSelectStation (PianoHandle_t *ph) {
curStation = curStation->next;
i++;
}
- if (!BarReadlineInt (NULL, &i)) {
+ if (!BarReadlineInt (prompt, &i)) {
return NULL;
}
curStation = ph->stations;
@@ -348,7 +347,7 @@ int main (int argc, char **argv) {
}
/* select station */
- curStation = BarUiSelectStation (&ph);
+ curStation = BarUiSelectStation (&ph, "Select station: ");
if (curStation != NULL) {
printf ("Playing station \"%s\"\n", curStation->name);
}
@@ -584,7 +583,7 @@ int main (int argc, char **argv) {
BarUiMsg ("No song playing.\n");
break;
}
- moveStation = BarUiSelectStation (&ph);
+ moveStation = BarUiSelectStation (&ph, "Move song to station: ");
if (moveStation != NULL) {
printf ("Moving song to \"%s\"... ", moveStation->name);
fflush (stdout);
@@ -631,7 +630,7 @@ int main (int argc, char **argv) {
player.doQuit = 1;
PianoDestroyPlaylist (&ph);
curSong = NULL;
- curStation = BarUiSelectStation (&ph);
+ curStation = BarUiSelectStation (&ph, "Select station: ");
if (curStation != NULL) {
printf ("Changed station to %s\n", curStation->name);
}
@@ -679,7 +678,7 @@ int main (int argc, char **argv) {
if (curStation->isQuickMix) {
PianoStation_t *selStation;
while ((selStation =
- BarUiSelectStation (&ph)) != NULL) {
+ BarUiSelectStation (&ph, "Toggle quickmix for station: ")) != NULL) {
selStation->useQuickMix = !selStation->useQuickMix;
}
BarUiMsg ("Setting quickmix stations... ");