diff options
author | Max Kellermann <max@duempel.org> | 2008-09-18 23:35:11 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-09-18 23:35:11 +0200 |
commit | cde030e211b3d9ea517403b5d5547b6d374fc470 (patch) | |
tree | a8b7c87bf74807553b98506a0e72c247dbf3b6c7 /src/screen_search.c | |
parent | 4f7926a989e2428a4701de3410e80997867ff63b (diff) | |
download | mpd-cde030e211b3d9ea517403b5d5547b6d374fc470.tar.gz mpd-cde030e211b3d9ea517403b5d5547b6d374fc470.tar.xz mpd-cde030e211b3d9ea517403b5d5547b6d374fc470.zip |
screen_browser: moved code to screen_browser.c
Isolate the generic browser code from the directory browser.
Diffstat (limited to '')
-rw-r--r-- | src/screen_search.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/src/screen_search.c b/src/screen_search.c index 02ba2d1c6..365a23c6f 100644 --- a/src/screen_search.c +++ b/src/screen_search.c @@ -399,7 +399,7 @@ paint(mpd_unused screen_t *screen, mpdclient_t *c) if (browser.filelist) { browser.lw->flags = 0; - list_window_paint(browser.lw, browse_lw_callback, browser.filelist); + list_window_paint(browser.lw, browser_lw_callback, browser.filelist); browser.filelist->updated = FALSE; } else { browser.lw->flags = LW_HIDE_CURSOR; @@ -421,7 +421,7 @@ update(screen_t *screen, mpdclient_t *c) return; } - list_window_paint(browser.lw, browse_lw_callback, browser.filelist); + list_window_paint(browser.lw, browser_lw_callback, browser.filelist); wnoutrefresh(browser.lw->w); } @@ -448,12 +448,11 @@ search_cmd(screen_t *screen, mpdclient_t *c, command_t cmd) { switch (cmd) { case CMD_PLAY: - browse_handle_enter(screen, c, browser.lw, browser.filelist); + browser_handle_enter(&browser, c); return 1; case CMD_SELECT: - if (browse_handle_select(screen, c, browser.lw, - browser.filelist) == 0) { + if (browser_handle_select(&browser, c) == 0) { /* continue and select next item... */ cmd = CMD_LIST_NEXT; } @@ -461,8 +460,7 @@ search_cmd(screen_t *screen, mpdclient_t *c, command_t cmd) return list_window_cmd(browser.lw, browser.filelist->length, cmd); case CMD_SELECT_ALL: - browse_handle_select_all(screen, c, browser.lw, - browser.filelist); + browser_handle_select_all(&browser, c); paint (screen, c); return 0; @@ -500,14 +498,13 @@ search_cmd(screen_t *screen, mpdclient_t *c, command_t cmd) if (browser.filelist) return screen_find(screen, browser.lw, browser.filelist->length, - cmd, browse_lw_callback, + cmd, browser_lw_callback, browser.filelist); else return 1; case CMD_MOUSE_EVENT: - return browse_handle_mouse_event(screen, c, browser.lw, - browser.filelist); + return browser_handle_mouse_event(&browser, c); default: if (browser.filelist) |