diff options
Diffstat (limited to 'source/widgets/listview.c')
-rw-r--r-- | source/widgets/listview.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source/widgets/listview.c b/source/widgets/listview.c index 7bfd47d0..210f6f0e 100644 --- a/source/widgets/listview.c +++ b/source/widgets/listview.c @@ -77,6 +77,8 @@ struct _listview void *mouse_activated_data; }; +static int listview_get_desired_height ( widget *wid ); + static void listview_free ( widget *wid ) { listview *lv = (listview *) wid; @@ -340,7 +342,7 @@ listview *listview_create ( const char *name, listview_update_callback cb, void // char *tb_name = g_strjoin (".", lv->widget.name,"element", NULL); textbox *tb = textbox_create ( tb_name, 0, NORMAL, "" ); - lv->element_height = textbox_get_estimated_char_height (tb, lv->eh); + lv->element_height = textbox_get_estimated_height (tb, lv->eh); g_free(tb_name); lv->callback = cb; @@ -452,8 +454,9 @@ void listview_nav_page_next ( listview *lv ) widget_queue_redraw ( WIDGET ( lv ) ); } -unsigned int listview_get_desired_height ( listview *lv ) +static int listview_get_desired_height ( widget *wid ) { + listview *lv = (listview *)wid; if ( lv == NULL || lv->widget.enabled == FALSE ) { return 0; } |