summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e3dd59c)
raw | patch | inline | side by side (parent: e3dd59c)
author | Kalle Wallin <kaw@linux.se> | |
Sat, 27 Mar 2004 21:44:58 +0000 (21:44 +0000) | ||
committer | Kalle Wallin <kaw@linux.se> | |
Sat, 27 Mar 2004 21:44:58 +0000 (21:44 +0000) |
main.c | patch | blob | history | |
screen.c | patch | blob | history |
index 0e36133295c2477b76cb52963c4dbba3aaa9d4d2..f4e0f1dfe2609b7db804b735d29ef1a30211690f 100644 (file)
--- a/main.c
+++ b/main.c
while( connected || options->reconnect )
{
command_t cmd;
+ static int repeat = -1;
+ static int random = -1;
if( connected && counter==0 )
{
else
mpd_finishCommand(mpc->connection);
counter=10;
+
+ if( repeat<0 )
+ {
+ repeat = mpc->status->repeat;
+ random = mpc->status->random;
+ }
+ if( repeat != mpc->status->repeat )
+ screen_status_printf("Repeat is %s",
+ mpc->status->repeat ? "On" : "Off");
+ if( random != mpc->status->random )
+ screen_status_printf("Random is %s",
+ mpc->status->random ? "On" : "Off");
+
+ repeat = mpc->status->repeat;
+ random = mpc->status->random;
}
if( connected )
{
+
+
screen_update(mpc);
if( (cmd=get_keyboard_command()) != CMD_NONE )
{
diff --git a/screen.c b/screen.c
index 18feab9a0d9484d4fb4a3c2f8dd8c8c8d75e869a..17457843294f3ad6686f335b6c5d103fedb8a230 100644 (file)
--- a/screen.c
+++ b/screen.c
if( (IS_PLAYING(status->state) || IS_PAUSED(status->state)) && song )
{
- // my_mvwaddstr(w, 0, x, mpc_get_song_name(song), COLOR_PAIR(2));
mvwaddstr(w, 0, x, mpc_get_song_name(song));
}
" [%i:%02i/%i:%02i] ",
status->elapsedTime/60, status->elapsedTime%60,
status->totalTime/60, status->totalTime%60 );
- //my_mvwaddstr(w, 0, x, screen->buf, COLOR_PAIR(1));
mvwaddstr(w, 0, x, screen->buf);
}
n = !c->status->repeat;
mpd_sendRepeatCommand(c->connection, n);
mpd_finishCommand(c->connection);
- screen_status_printf("Repeat is %s", n ? "On" : "Off");
break;
case CMD_RANDOM:
n = !c->status->random;
mpd_sendRandomCommand(c->connection, n);
mpd_finishCommand(c->connection);
- screen_status_printf("Random is %s", n ? "On" : "Off");
break;
case CMD_VOLUME_UP:
if( c->status->volume!=MPD_STATUS_NO_VOLUME && c->status->volume<100 )