From: Max Kellermann Date: Sat, 10 Oct 2009 18:25:46 +0000 (+0200) Subject: screen_browser: added wrapper function screen_browser_paint() X-Git-Tag: release-0.16~120 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=2d0bd040629278f2daee876f88e5c9c084f7b54b;p=ncmpc.git screen_browser: added wrapper function screen_browser_paint() Don't export browser_lw_callback(). --- diff --git a/src/screen_artist.c b/src/screen_artist.c index a135f91..116f4b6 100644 --- a/src/screen_artist.c +++ b/src/screen_artist.c @@ -339,8 +339,7 @@ static void screen_artist_paint(void) { if (browser.filelist) { - list_window_paint(browser.lw, browser_lw_callback, - browser.filelist); + screen_browser_paint(&browser); } else if (album_list != NULL) list_window_paint(browser.lw, screen_artist_lw_callback, album_list); diff --git a/src/screen_browser.c b/src/screen_browser.c index c795414..994ea2d 100644 --- a/src/screen_browser.c +++ b/src/screen_browser.c @@ -72,7 +72,7 @@ screen_browser_sync_highlights(struct filelist *fl, #endif /* list_window callback */ -const char * +static const char * browser_lw_callback(unsigned idx, bool *highlight, G_GNUC_UNUSED char **second_column, void *data) { const struct filelist *fl = (const struct filelist *) data; @@ -477,3 +477,9 @@ browser_cmd(struct screen_browser *browser, return false; } + +void +screen_browser_paint(const struct screen_browser *browser) +{ + list_window_paint(browser->lw, browser_lw_callback, browser->filelist); +} diff --git a/src/screen_browser.h b/src/screen_browser.h index 2b02fbd..c3a47de 100644 --- a/src/screen_browser.h +++ b/src/screen_browser.h @@ -45,7 +45,8 @@ screen_browser_sync_highlights(struct filelist *fl, #endif -const char *browser_lw_callback(unsigned index, bool *highlight, char** second_column, void *filelist); +void +screen_browser_paint(const struct screen_browser *browser); struct filelist_entry * browser_get_selected_entry(const struct screen_browser *browser); diff --git a/src/screen_file.c b/src/screen_file.c index f7b3b56..c5688fe 100644 --- a/src/screen_file.c +++ b/src/screen_file.c @@ -308,7 +308,7 @@ screen_file_get_title(char *str, size_t size) static void screen_file_paint(void) { - list_window_paint(browser.lw, browser_lw_callback, browser.filelist); + screen_browser_paint(&browser); } static void diff --git a/src/screen_search.c b/src/screen_search.c index 7c35fd2..7a8c011 100644 --- a/src/screen_search.c +++ b/src/screen_search.c @@ -399,7 +399,7 @@ screen_search_paint(void) { if (browser.filelist) { browser.lw->hide_cursor = false; - list_window_paint(browser.lw, browser_lw_callback, browser.filelist); + screen_browser_paint(&browser); } else { browser.lw->hide_cursor = true; list_window_paint(browser.lw, lw_search_help_callback, NULL);