From: <des...@us...> - 2003-12-26 05:53:34
|
Update of /cvsroot/beepmp/bmp/beep In directory sc8-pr-cvs1:/tmp/cvs-serv28237 Modified Files: playlist_list.c Log Message: - fixed playlist drawing error when list is short Index: playlist_list.c =================================================================== RCS file: /cvsroot/beepmp/bmp/beep/playlist_list.c,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** playlist_list.c 26 Dec 2003 05:29:35 -0000 1.15 --- playlist_list.c 26 Dec 2003 05:53:31 -0000 1.16 *************** *** 393,404 **** } - PLAYLIST_LOCK(); - list = playlist_get(); - pl->pl_fheight = (ascent + abs(descent)); pl->pl_num_visible = height / pl->pl_fheight; ! max_first = MAX(g_list_length(list) - pl->pl_num_visible, 0); pl->pl_first = CLAMP(pl->pl_first, 0, max_first); for (i = 0; i < pl->pl_first; i++) --- 393,406 ---- } pl->pl_fheight = (ascent + abs(descent)); pl->pl_num_visible = height / pl->pl_fheight; ! max_first = playlist_get_length() - pl->pl_num_visible; ! max_first = MAX(max_first, 0); ! pl->pl_first = CLAMP(pl->pl_first, 0, max_first); + + PLAYLIST_LOCK(); + list = playlist_get(); for (i = 0; i < pl->pl_first; i++) |