diff --git a/src/screen_queue.c b/src/screen_queue.c
index f3ca21a06e49a6c5a1ae2d73d0ac9483e3548df0..67df4b53655b7f3603cf174ae48c1a88c724b266 100644 (file)
--- a/src/screen_queue.c
+++ b/src/screen_queue.c
/* ncmpc (Ncurses MPD Client)
- * (c) 2004-2009 The Music Player Daemon Project
+ * (c) 2004-2010 The Music Player Daemon Project
* Project homepage: http://musicpd.org
*
* This program is free software; you can redistribute it and/or modify
handle_add_to_playlist(struct mpdclient *c)
{
gchar *path;
-#ifndef NCMPC_MINI
GCompletion *gcmp;
+#ifndef NCMPC_MINI
GList *list = NULL;
GList *dir_list = NULL;
completion_callback_data_t data;
wrln_completion_callback_data = &data;
wrln_pre_completion_callback = add_pre_completion_cb;
wrln_post_completion_callback = add_post_completion_cb;
+#else
+ gcmp = NULL;
#endif
/* get path */
path = screen_readln(_("Add"),
NULL,
NULL,
-#ifdef NCMPC_MINI
- NULL
-#else
- gcmp
-#endif
- );
+ gcmp);
/* destroy completion data */
#ifndef NCMPC_MINI
{
if (c->events & MPD_IDLE_QUEUE)
screen_queue_restore_selection();
+ else
+ /* the queue size may have changed, even if we havn't
+ revceived the QUEUE idle event yet */
+ list_window_set_length(lw, playlist_length(playlist));
if (((c->events & MPD_IDLE_PLAYER) != 0 &&
screen_queue_song_change(c->status)) ||
case CMD_SHUFFLE:
list_window_get_range(lw, &range);
- if (range.end < range.start + 1)
+ if (range.end <= range.start + 1)
/* No range selection, shuffle all list. */
break;