ListWindow: convert list_window_callback_fn_t to an abstract class
[ncmpc-debian.git] / src / TextListRenderer.cxx
index 9ca1b02..1a19bab 100644 (file)
@@ -17,7 +17,9 @@
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
+#include "config.h"
 #include "TextListRenderer.hxx"
+#include "ListText.hxx"
 #include "paint.hxx"
 
 #include <assert.h>
@@ -34,7 +36,7 @@ void
 TextListRenderer::PaintListItem(WINDOW *w, unsigned i, unsigned,
                                unsigned width, bool selected) const
 {
-       const char *label = callback(i, callback_data);
+       const char *label = text.GetListItemText(i);
        assert(label != nullptr);
 
        list_window_paint_row(w, width, selected, label);