summaryrefslogtreecommitdiff
path: root/src/ui.c
diff options
context:
space:
mode:
authorLars-Dominik Braun <PromyLOPh@lavabit.com>2009-03-09 10:13:01 +0100
committerLars-Dominik Braun <PromyLOPh@lavabit.com>2009-03-09 10:13:01 +0100
commit9d753bf7f9ee0e2b56be5b13b7e6f26f11938235 (patch)
treeaaa580f6b010d88ab1f03ac03a488b3af956f317 /src/ui.c
parent0c6860fdf282e871a11f7a859e672231455dd94c (diff)
downloadpianobar-windows-9d753bf7f9ee0e2b56be5b13b7e6f26f11938235.tar.gz
pianobar-windows-9d753bf7f9ee0e2b56be5b13b7e6f26f11938235.tar.bz2
pianobar-windows-9d753bf7f9ee0e2b56be5b13b7e6f26f11938235.zip
Use icon for questions too
Diffstat (limited to 'src/ui.c')
-rw-r--r--src/ui.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/ui.c b/src/ui.c
index 6c82606..2b03edb 100644
--- a/src/ui.c
+++ b/src/ui.c
@@ -108,7 +108,8 @@ char BarReadlineInt (const char *prompt, int *retVal) {
char *buf;
char ret = 0;
- if ((buf = readline (prompt)) != NULL && strlen (buf) > 0 &&
+ BarUiMsg (MSG_QUESTION, prompt);
+ if ((buf = readline (NULL)) != NULL && strlen (buf) > 0 &&
BarIsNumericStr (buf)) {
*retVal = atoi (buf);
ret = 1;
@@ -272,7 +273,8 @@ char *BarUiSelectMusicId (const PianoHandle_t *ph) {
PianoArtist_t *tmpArtist;
PianoSong_t *tmpSong;
- lineBuf = readline ("Search for artist/title: ");
+ BarUiMsg (MSG_QUESTION, "Search for artist/title: ");
+ lineBuf = readline (NULL);
if (lineBuf != NULL && strlen (lineBuf) > 0) {
BarUiMsg (MSG_INFO, "Searching... ");
if (BarUiPrintPianoStatus (PianoSearchMusic (ph, lineBuf,
@@ -283,8 +285,8 @@ char *BarUiSelectMusicId (const PianoHandle_t *ph) {
BarUiMsg (MSG_NONE, "\r");
if (searchResult.songs != NULL && searchResult.artists != NULL) {
/* songs and artists found */
- BarUiMsg (MSG_QUESTION,
- "Is this an [a]rtist or [t]rack name? Press c to abort.\n");
+ BarUiMsg (MSG_QUESTION, "Is this an [a]rtist or [t]rack name? "
+ "Press c to abort. ");
read (fileno (stdin), &yesnoBuf, sizeof (yesnoBuf));
if (yesnoBuf == 'a') {
tmpArtist = BarUiSelectArtist (searchResult.artists);