diff --git a/src/screen_artist.c b/src/screen_artist.c
index 077fca52bd61ccf442e88d1cafba8229feb347ad..52b81d02ad3c662b99d84ea8cc3920781616f38b 100644 (file)
--- a/src/screen_artist.c
+++ b/src/screen_artist.c
/* ncmpc (Ncurses MPD Client)
- * (c) 2004-2010 The Music Player Daemon Project
+ * (c) 2004-2017 The Music Player Daemon Project
* Project homepage: http://musicpd.org
*
* This program is free software; you can redistribute it and/or modify
#include "mpdclient.h"
#include "screen_browser.h"
#include "filelist.h"
+#include "options.h"
#include <assert.h>
#include <string.h>
screen_artist_init(WINDOW *w, int cols, int rows)
{
browser.lw = list_window_init(w, cols, rows);
+ browser.song_format = options.list_format;
artist = NULL;
album = NULL;
}
static void
paint_artist_callback(WINDOW *w, unsigned i,
gcc_unused unsigned y, unsigned width,
- bool selected, void *data)
+ bool selected, const void *data)
{
- GPtrArray *list = data;
+ const GPtrArray *list = data;
char *p = utf8_to_locale(g_ptr_array_index(list, i));
screen_browser_paint_directory(w, width, selected, p);
static void
paint_album_callback(WINDOW *w, unsigned i,
gcc_unused unsigned y, unsigned width,
- bool selected, void *data)
+ bool selected, const void *data)
{
- GPtrArray *list = data;
+ const GPtrArray *list = data;
const char *p;
char *q = NULL;
case CMD_LIST_JUMP:
switch (mode) {
case LIST_ARTISTS:
- screen_jump(browser.lw, screen_artist_lw_callback,
+ screen_jump(browser.lw,
+ screen_artist_lw_callback, artist_list,
paint_artist_callback, artist_list);
artist_repaint();
return true;
case LIST_ALBUMS:
- screen_jump(browser.lw, screen_artist_lw_callback,
+ screen_jump(browser.lw,
+ screen_artist_lw_callback, album_list,
paint_album_callback, album_list);
artist_repaint();
return true;