diff --git a/src/screen_browser.c b/src/screen_browser.c
index e68e7028556ac27feac7825754b4b09f99e7d40a..26dca5285ac533d1f730bb389a3dbe6fed4b3a06 100644 (file)
--- a/src/screen_browser.c
+++ b/src/screen_browser.c
#define BUFSIZE 1024
+#ifndef NCMPC_MINI
#define HIGHLIGHT (0x01)
+#endif
static const char playlist_format[] = "*%s*";
+#ifndef NCMPC_MINI
+
/* clear the highlight flag for all items in the filelist */
static void
clear_highlights(mpdclient_filelist_t *fl)
}
}
+#endif
+
/* list_window callback */
const char *
browser_lw_callback(unsigned idx, int *highlight, void *data)
assert(entry != NULL);
entity = entry->entity;
+#ifndef NCMPC_MINI
*highlight = (entry->flags & HIGHLIGHT);
+#else
+ *highlight = false;
+#endif
if( entity == NULL )
return "[..]";
filelist_free(browser->filelist);
browser->filelist = mpdclient_filelist_get(c, path);
+#ifndef NCMPC_MINI
sync_highlights(c, browser->filelist);
+#endif
idx = filelist_find_directory(browser->filelist, old_path);
g_free(old_path);
mpd_InfoEntity *entity = entry->entity;
mpd_Song *song = entity->info.song;
+#ifndef NCMPC_MINI
if (!(entry->flags & HIGHLIGHT)) {
+#endif
if (mpdclient_cmd_add(c, song) == 0) {
char buf[BUFSIZE];
+#ifndef NCMPC_MINI
entry->flags |= HIGHLIGHT;
+#endif
strfsong(buf, BUFSIZE, options.list_format, song);
screen_status_printf(_("Adding \'%s\' to playlist\n"), buf);
mpdclient_update(c); /* get song id */
} else
return -1;
+#ifndef NCMPC_MINI
}
+#endif
idx = playlist_get_index_from_file(c, song->file);
mpdclient_cmd_play(c, idx);
static int
browser_select_entry(mpdclient_t *c, filelist_entry_t *entry,
- gboolean toggle)
+ mpd_unused gboolean toggle)
{
assert(entry != NULL);
assert(entry->entity != NULL);
assert(entry->entity->info.song != NULL);
- if (!toggle || (entry->flags & HIGHLIGHT) == 0) {
+#ifndef NCMPC_MINI
+ if (!toggle || (entry->flags & HIGHLIGHT) == 0)
+#endif
+ {
mpd_Song *song = entry->entity->info.song;
+#ifndef NCMPC_MINI
entry->flags |= HIGHLIGHT;
+#endif
if (mpdclient_cmd_add(c, song) == 0) {
char buf[BUFSIZE];
strfsong(buf, BUFSIZE, options.list_format, song);
screen_status_printf(_("Adding \'%s\' to playlist\n"), buf);
}
+#ifndef NCMPC_MINI
} else {
/* remove song from playlist */
mpd_Song *song = entry->entity->info.song;
while ((idx = playlist_get_index_from_file(c, song->file)) >=0)
mpdclient_cmd_delete(c, idx);
+#endif
}
return 0;
#endif
bool
-browser_cmd(struct screen_browser *browser, struct screen *screen,
+browser_cmd(struct screen_browser *browser,
struct mpdclient *c, command_t cmd)
{
+#ifdef ENABLE_LYRICS_SCREEN
struct filelist_entry *entry;
+#endif
switch (cmd) {
case CMD_PLAY:
case CMD_LIST_RFIND:
case CMD_LIST_FIND_NEXT:
case CMD_LIST_RFIND_NEXT:
- screen_find(screen,
- browser->lw, filelist_length(browser->filelist),
+ screen_find(browser->lw, filelist_length(browser->filelist),
cmd, browser_lw_callback,
browser->filelist);
return true;