aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKalle Wallin <kaw@linux.se>2004-04-14 19:34:28 +0000
committerKalle Wallin <kaw@linux.se>2004-04-14 19:34:28 +0000
commit937207a84c32e2db4e6257beadc8a7e968c07f61 (patch)
tree9224e41e6aaff000aae032f1eedf83bafdc3fe3a
parent3b9684fc2a84b50ec682db84c1c82f6760250806 (diff)
downloadmpd-937207a84c32e2db4e6257beadc8a7e968c07f61.tar.gz
mpd-937207a84c32e2db4e6257beadc8a7e968c07f61.tar.xz
mpd-937207a84c32e2db4e6257beadc8a7e968c07f61.zip
Highlight and center current track even when paused.
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@759 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to '')
-rw-r--r--screen_play.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/screen_play.c b/screen_play.c
index c9fd248eb..95c2899fe 100644
--- a/screen_play.c
+++ b/screen_play.c
@@ -14,7 +14,6 @@
#include "screen_file.h"
#include "screen_play.h"
-
#define BUFSIZE 256
static char *
@@ -29,7 +28,7 @@ list_callback(int index, int *highlight, void *data)
return NULL;
}
- if( IS_PLAYING(c->status->state) && index==c->song_id )
+ if( index==c->song_id && !IS_STOPPED(c->status->state) )
{
*highlight = 1;
}
@@ -44,7 +43,7 @@ center_playing_item(screen_t *screen, mpd_client_t *c)
int length = c->playlist_length;
int offset = lw->selected-lw->start;
- if( !lw || length<lw->rows || !IS_PLAYING(c->status->state) )
+ if( !lw || length<lw->rows || IS_STOPPED(c->status->state) )
return 0;
/* try to center the song that are playing */
@@ -174,8 +173,12 @@ play_cmd(screen_t *screen, mpd_client_t *c, command_t cmd)
file_clear_highlight(c, song);
mpd_sendDeleteCommand(c->connection, screen->playlist->selected);
mpd_finishCommand(c->connection);
- screen_status_printf("Removed \'%s\' from playlist!",
- mpc_get_song_name(song));
+ if( !mpc_error(c) )
+ {
+ screen_status_printf("Removed \'%s\' from playlist!",
+ mpc_get_song_name(song));
+
+ }
}
return 1;
case CMD_SAVE_PLAYLIST: