Index: apps/gui/list.c
===================================================================
RCS file: /cvsroot/rockbox/apps/gui/list.c,v
retrieving revision 1.21
diff -u -r1.21 list.c
--- apps/gui/list.c	4 Jun 2006 17:14:17 -0000	1.21
+++ apps/gui/list.c	10 Jun 2006 21:23:30 -0000
@@ -397,6 +397,27 @@
     gui_list_put_selection_in_screen(gui_list, false);
 }
 
+void gui_list_select_relative_percent( struct gui_list * gui_list,
+                                          int percent_lines )
+{
+  int n = gui_list->nb_items ;
+  int p = ( n * percent_lines ) / 100 ;
+  int os = gui_list->selected_item ;
+
+  if( percent_lines < 0 ) {
+    int ns = os + ( p ? p : -1 ) ;
+    gui_list->selected_item = ns < 0 
+      ? ( gui_list->limit_scroll || n - ns <  0 ? 0 : n - ns ) 
+      : ns ;
+  } else if( percent_lines > 0 ) {
+    int ns = os + ( p ? p : 1 ) ;
+    gui_list->selected_item = ns >= n 
+      ? ( gui_list->limit_scroll || ns - n >= n ? n - 1 : ns - n ) 
+      : ns ;
+  }
+  gui_list_put_selection_in_screen(gui_list, false);
+}
+
 void gui_list_add_item(struct gui_list * gui_list)
 {
     gui_list->nb_items++;
@@ -554,6 +575,16 @@
                                       screens[screen].nb_lines);
 }
 
+void gui_synclist_list_select_relative_percent( struct gui_synclist * lists, 
+  enum screen_type screen, int percent_lines ) 
+{
+    (void) screen ;
+    int i;
+    FOR_NB_SCREENS(i)
+      gui_list_select_relative_percent( &(lists->gui_list[i]), percent_lines );
+}
+
+
 void gui_synclist_add_item(struct gui_synclist * lists)
 {
     int i;
Index: apps/gui/list.h
===================================================================
RCS file: /cvsroot/rockbox/apps/gui/list.h,v
retrieving revision 1.18
diff -u -r1.18 list.h
--- apps/gui/list.h	3 Apr 2006 08:51:08 -0000	1.18
+++ apps/gui/list.h	10 Jun 2006 21:23:31 -0000
@@ -286,6 +286,15 @@
                                           int nb_lines);
 
 /*
+ * Advance/retreat in the list by n percent of the total list elements,
+ * by at least one line if percent_lines != 0
+ * - gui_list : the list structure
+ * - percent_lines : the percent of the total number of lines to try to move the cursor
+ *   postive adavnces forward, negative retreats back, 0 has no effect
+ */
+extern void gui_list_select_relative_percent( struct gui_list * gui_list,
+															 int percent_lines ) ;
+/*
  * Adds an item to the list (the callback will be asked for one more item)
  * - gui_list : the list structure
  */
@@ -350,6 +359,8 @@
                                           enum screen_type screen);
 extern void gui_synclist_select_previous_page(struct gui_synclist * lists,
                                               enum screen_type screen);
+extern void gui_synclist_list_select_relative_percent( struct gui_synclist * lists, 
+		enum screen_type screen, int percent_lines ) ;
 extern void gui_synclist_add_item(struct gui_synclist * lists);
 extern void gui_synclist_del_item(struct gui_synclist * lists);
 extern void gui_synclist_limit_scroll(struct gui_synclist * lists, bool scroll);
