diff --git a/src/screen_browser.c b/src/screen_browser.c
index 45b782a079378b5d2c3fbe84cae10e211c727fd2..985be3898fcd290f4baa38f9d78e6233cfe0058a 100644 (file)
--- a/src/screen_browser.c
+++ b/src/screen_browser.c
mpd_entity_get_directory(entity);
char *directory = utf8_to_locale(g_basename(mpd_directory_get_path(dir)));
g_strlcpy(buf, directory, sizeof(buf));
+ g_free(directory);
return buf;
} else if (mpd_entity_get_type(entity) == MPD_ENTITY_TYPE_SONG) {
const struct mpd_song *song = mpd_entity_get_song(entity);
{
struct list_window_range range;
struct filelist_entry *entry;
- bool success;
+ bool success = false;
list_window_get_range(browser->lw, &range);
for (unsigned i = range.start; i < range.end; ++i) {
case MPD_ENTITY_TYPE_SONG:
paint_song_row(w, y, width, selected, highlight,
- mpd_entity_get_song(entity));
+ mpd_entity_get_song(entity), NULL);
break;
case MPD_ENTITY_TYPE_PLAYLIST:
break;
default:
- waddstr(w, "<unknown>");
+ row_paint_text(w, width, highlight ? COLOR_LIST_BOLD : COLOR_LIST,
+ selected, "<unknown>");
}
- whline(w, ' ', width);
-
if (selected)
wattroff(w, A_REVERSE);
}