Code

screen_queue: simplified screen_readln() call in MINI
authorMax Kellermann <max@duempel.org>
Wed, 2 Dec 2009 12:34:11 +0000 (13:34 +0100)
committerMax Kellermann <max@duempel.org>
Wed, 2 Dec 2009 12:34:11 +0000 (13:34 +0100)
src/screen_queue.c

index f3ca21a06e49a6c5a1ae2d73d0ac9483e3548df0..fbcc18039a98d593e8cf6d153fb00c47f4c6a263 100644 (file)
@@ -376,8 +376,8 @@ static int
 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;
@@ -391,18 +391,15 @@ handle_add_to_playlist(struct mpdclient *c)
        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