Code

screen_browser: added wrapper function screen_browser_paint()
authorMax Kellermann <max@duempel.org>
Sat, 10 Oct 2009 18:25:46 +0000 (20:25 +0200)
committerMax Kellermann <max@duempel.org>
Sat, 10 Oct 2009 18:25:46 +0000 (20:25 +0200)
Don't export browser_lw_callback().

src/screen_artist.c
src/screen_browser.c
src/screen_browser.h
src/screen_file.c
src/screen_search.c

index a135f9192bbef84357dccce66685ae4aa6e1e451..116f4b64cf8fd164f6f788e40948c1b77227576d 100644 (file)
@@ -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);
index c795414ba916cf4b3187928d324581618cb0d5fd..994ea2dd5f61150ec95bcd758785897fc86d14e7 100644 (file)
@@ -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);
+}
index 2b02fbd8290eb9364be5a521052e6dfb18cb324b..c3a47de16b0a9c7ba0888556c6c0613c8ad20f9d 100644 (file)
@@ -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);
index f7b3b567e4110a750c6ffb123e7211cc079ff73c..c5688fe6263cd520a8005a298141dd1d0896fb8e 100644 (file)
@@ -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
index 7c35fd2fa44da1c86a0e60e460fadbac7a5956aa..7a8c01134582cf8a23044459ebc183699efd90b4 100644 (file)
@@ -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);