Index: rockbox/apps/gui/gwps.c
===================================================================
--- rockbox/apps/gui/gwps.c	(revision 14749)
+++ rockbox/apps/gui/gwps.c	(working copy)
@@ -40,6 +40,7 @@
 #include "ata.h"
 #include "screens.h"
 #include "playlist.h"
+#include "plugin.h"
 #ifdef HAVE_LCD_BITMAP
 #include "icons.h"
 #include "peakmeter.h"
@@ -66,6 +67,8 @@
 struct gui_wps gui_wps[NB_SCREENS];
 static struct wps_data wps_datas[NB_SCREENS];
 
+extern struct playlist_info current_playlist;
+
 /* change the path to the current played track */
 static void wps_state_update_ctp(const char *path);
 /* initial setup of wps_data  */
@@ -141,6 +144,16 @@
 
         restore = true;
     }
+
+// IPOD-SIMILARITYWHEEL BEGIN
+    int x = 0;
+    int y = 69;
+    int sel = 0;
+
+    FOR_NB_SCREENS(i)
+        gui_wps[i].display->update_rect(0, 0, LCD_WIDTH, LCD_HEIGHT);
+// IPOD-SIMILARITYWHEEL END
+
     while ( 1 )
     {
         bool audio_paused = (audio_status() & AUDIO_STATUS_PAUSE)?true:false;
@@ -181,7 +194,7 @@
                     break;
                 }
                 peak_meter_peek();
-                sleep(0);   /* Sleep until end of current tick. */
+                sleep(0);   
 
                 if (TIME_AFTER(current_tick, next_refresh)) {
                     FOR_NB_SCREENS(i)
@@ -260,14 +273,17 @@
                 break;
 
             case ACTION_WPS_BROWSE:
-#ifdef HAVE_LCD_CHARCELLS
+               playlist_start(sel, 0);
+               break;
+
+/*#ifdef HAVE_LCD_CHARCELLS
                 status_set_record(false);
                 status_set_audio(false);
 #endif
                 FOR_NB_SCREENS(i)
                     gui_wps[i].display->stop_scroll();
                 return GO_TO_PREVIOUS_BROWSER;
-                break;
+                break;*/
 
                 /* play/pause */
             case ACTION_WPS_PLAY:
@@ -297,7 +313,7 @@
 
                 /* volume up */
             case ACTION_WPS_VOLUP:
-            {
+/*            {
                 global_settings.volume++;
                 bool res = false;
                 setvol();
@@ -310,12 +326,12 @@
                     restore = true;
                     restoretimer = current_tick + HZ;
                 }
-            }
+            }*/
                 break;
 
                 /* volume down */
             case ACTION_WPS_VOLDOWN:
-            {
+/*            {
                 global_settings.volume--;
                 setvol();
                 bool res = false;
@@ -328,7 +344,7 @@
                     restore = true;
                     restoretimer = current_tick + HZ;
                 }
-            }
+            }*/
                 break;
             /* fast forward 
                 OR next dir if this is straight after ACTION_WPS_SKIPNEXT */
@@ -642,6 +658,31 @@
                 break;
         }
 
+// IPOD SIMILARITYWHEEL BEGIN
+#ifdef HAVE_WHEEL_POSITION
+        int cps = 0;
+        int total = playlist_amount();
+
+        if (wheel_status() != -1)
+            cps = get_ipod_scroll_wheel_clicks_per_second();
+
+        if (cps > 300)
+            cps = 300;
+        if (cps < -300)
+            cps = -300;
+
+        x = (x + cps/13) % 320;
+        if (x < 0)
+            x += 320;
+
+        int selx = 320 - x+73;
+        if (selx > 320)
+            selx = selx - 320;
+
+        sel = (int)(((float)(selx)/(float)320)*(float)total);
+#endif
+// IPOD SIMILARITYWHEEL END
+
         if (update_track)
         {
             FOR_NB_SCREENS(i)
@@ -662,11 +703,41 @@
                 exit = true;
             }
             else if (wps_state.id3){
-                FOR_NB_SCREENS(i)
-                    gui_wps_refresh(&gui_wps[i], 0, WPS_REFRESH_NON_STATIC);
+/*                FOR_NB_SCREENS(i)
+                    gui_wps_refresh(&gui_wps[i], 0, WPS_REFRESH_NON_STATIC);*/
             }
         }
 
+// IPOD SIMILARITYWHEEL BEGIN
+#define COLOR_GREY LCD_RGBPACK(178, 185, 192)
+#define COLOR_BLACK LCD_RGBPACK(0, 0, 0)
+#define COLOR_WHITE LCD_RGBPACK(255, 255, 255)
+       lcd_bitmap_part(lcd_get_backdrop(), 0, y, LCD_WIDTH, x, y, LCD_WIDTH-x, 30);
+       lcd_bitmap_part(lcd_get_backdrop(), LCD_WIDTH-x, y, LCD_WIDTH, 0, y, x, 30);
+
+       lcd_bitmap_part(lcd_get_backdrop(), 73, 117, LCD_WIDTH, 73, 117, LCD_WIDTH-73, 30);
+
+       struct playlist_track_info info;
+       if (playlist_get_track_info(&current_playlist, sel, &info) == 0) {
+           lcd_set_foreground(COLOR_BLACK);
+           char line[100];
+           memset(line, 0, 100*sizeof(char));
+           strcpy(line, strchr(info.filename,'-')+1);
+           line[strlen(line)-4] = '\0';
+
+           lcd_putsxy(73, 117, line);
+           lcd_set_foreground(COLOR_WHITE);
+       }
+
+       FOR_NB_SCREENS(i)
+           gui_wps[i].display->update_rect(73, 117, LCD_WIDTH, 30);
+       lcd_set_foreground(COLOR_GREY);
+       lcd_drawline(73, y, 73, y+30);
+       lcd_set_foreground(COLOR_WHITE);
+       FOR_NB_SCREENS(i)
+           gui_wps[i].display->update_rect(0, y, LCD_WIDTH, 30);
+// IPOD SIMILARITYWHEEL END
+
         if (exit) {
 #ifdef HAVE_LCD_CHARCELLS
             status_set_record(false);
Index: rockbox/apps/gui/gwps-common.c
===================================================================
--- rockbox/apps/gui/gwps-common.c	(revision 14749)
+++ rockbox/apps/gui/gwps-common.c	(working copy)
@@ -420,11 +420,13 @@
             gwps->display->stop_scroll();
             if (gui_wps_display())
                 retcode = true;
-            else
+            else {
                 gui_wps_refresh(gwps, 0, WPS_REFRESH_ALL);
+            }
         }
-        else
+        else {
             gui_wps_refresh(gwps, 0, WPS_REFRESH_NON_STATIC);
+        }
     }
 
     gui_wps_statusbar_draw(gwps, false);
@@ -1934,18 +1936,19 @@
                 draw_player_progress(gwps);
         }
 #endif
-
         if (update_line)
         {
             if (flags & WPS_REFRESH_SCROLL)
             {
                 /* if the line is a scrolling one we don't want to update
                    too often, so that it has the time to scroll */
-                if ((refresh_mode & WPS_REFRESH_SCROLL) || new_subline_refresh)
+                if ((refresh_mode & WPS_REFRESH_SCROLL) || new_subline_refresh) {
                     write_line(display, &align, line, true);
+                }
             }
-            else
+            else {
                 write_line(display, &align, line, false);
+            }
         }
     }
 
@@ -1953,9 +1956,8 @@
     data->peak_meter_enabled = enable_pm;
     wps_display_images(gwps);
 #endif
-
-    display->update();
-
+    display->update_rect(0, 0, LCD_WIDTH, 50);
+    display->update_rect(0, 160, LCD_WIDTH, LCD_HEIGHT);
 #ifdef HAVE_BACKLIGHT
     if (global_settings.caption_backlight && state->id3)
     {
Index: rockbox/apps/playlist.c
===================================================================
--- rockbox/apps/playlist.c	(revision 14749)
+++ rockbox/apps/playlist.c	(working copy)
@@ -144,7 +144,7 @@
 
 static bool changing_dir = false;
 
-static struct playlist_info current_playlist;
+struct playlist_info current_playlist;
 static char now_playing[MAX_PATH+1];
 
 static void empty_playlist(struct playlist_info* playlist, bool resume);

