From 95be4febc87ab103d77ed41b2594691ae4f9f0ee Mon Sep 17 00:00:00 2001 From: Jonathan Gordon Date: Sun, 11 May 2008 14:08:46 +0000 Subject: doh! fix yellow. remove the calls to stop_scroll(), clear_viewport() does that nothing should be using screens[].nb_lines anymore... change the list code to be a good example. (playlist_viewer is the last thing using it which needs fixing) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17456 a1c6a512-1295-4272-9138-f99709370657 --- apps/gui/list.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'apps/gui/list.c') diff --git a/apps/gui/list.c b/apps/gui/list.c index 7adb83eb97..288c18ab1c 100644 --- a/apps/gui/list.c +++ b/apps/gui/list.c @@ -483,13 +483,15 @@ void gui_synclist_set_color_callback(struct gui_synclist * lists, static void gui_synclist_select_next_page(struct gui_synclist * lists, enum screen_type screen) { - gui_list_select_at_offset(lists, screens[screen].nb_lines); + int nb_lines = viewport_get_nb_lines(lists->parent[screen]); + gui_list_select_at_offset(lists, nb_lines); } static void gui_synclist_select_previous_page(struct gui_synclist * lists, enum screen_type screen) { - gui_list_select_at_offset(lists, -screens[screen].nb_lines); + int nb_lines = viewport_get_nb_lines(lists->parent[screen]); + gui_list_select_at_offset(lists, -nb_lines); } void gui_synclist_limit_scroll(struct gui_synclist * lists, bool scroll) -- cgit v1.2.3