aboutsummaryrefslogtreecommitdiffstats
path: root/src/screen_browser.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-09-25 21:35:06 +0200
committerMax Kellermann <max@duempel.org>2008-09-25 21:35:06 +0200
commit1198af221ec2d804d9ff840a9dcd5e770fb3d13a (patch)
treeb1be8456ca335ef6b0089e024ab26db6b8d70ba1 /src/screen_browser.c
parent728309e4aeaac71555ce68ffcd3ff92952a270d3 (diff)
downloadmpd-1198af221ec2d804d9ff840a9dcd5e770fb3d13a.tar.gz
mpd-1198af221ec2d804d9ff840a9dcd5e770fb3d13a.tar.xz
mpd-1198af221ec2d804d9ff840a9dcd5e770fb3d13a.zip
screen_browser: added hotkey for adding song
CMD_ADD ('a') appends a song to the playlist, no matter if it is already there, i.e. unlike CMD_SELECT, it does not toggle the song.
Diffstat (limited to '')
-rw-r--r--src/screen_browser.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/screen_browser.c b/src/screen_browser.c
index 9ce6fedd8..bad13ea02 100644
--- a/src/screen_browser.c
+++ b/src/screen_browser.c
@@ -391,6 +391,17 @@ browser_handle_select(struct screen_browser *browser, mpdclient_t *c)
return browser_select_entry(c, entry, TRUE);
}
+int
+browser_handle_add(struct screen_browser *browser, mpdclient_t *c)
+{
+ struct filelist_entry *entry = browser_get_selected(browser);
+
+ if (entry == NULL || entry->entity == NULL)
+ return -1;
+
+ return browser_select_entry(c, entry, FALSE);
+}
+
void
browser_handle_select_all(struct screen_browser *browser, mpdclient_t *c)
{