commit dd12532d40fcb2e1741f629aa39650efce3708f2
Author: phantomjinx <p.g.richard...@phantomjinx.co.uk>
Date:   Sat Mar 5 15:23:14 2011 +0000

    Small fixes to coverart display
    
    * cover_display.xml
     * update_policy changed to discontinuous which will only update the cover
       display once the user releases the drag of the slider
    
    * display_coverart.c
     * redraw on changing the sort order
     * fix the slider value when select_cover is called as inaccurate by the
       4 nulls prepended to the album_key_list

 plugins/cover_display/cover_display.xml  |    1 +
 plugins/cover_display/display_coverart.c |   10 ++++++++--
 2 files changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/plugins/cover_display/cover_display.xml 
b/plugins/cover_display/cover_display.xml
index afb6aec..1f47d88 100644
--- a/plugins/cover_display/cover_display.xml
+++ b/plugins/cover_display/cover_display.xml
@@ -116,6 +116,7 @@
               <object class="GtkHScale" id="cover_display_scaler">
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
+                <property name="update_policy">discontinuous</property>
                 <property name="digits">0</property>
                 <property name="draw_value">False</property>
               </object>
diff --git a/plugins/cover_display/display_coverart.c 
b/plugins/cover_display/display_coverart.c
index 3bf17a3..ea9a05a 100644
--- a/plugins/cover_display/display_coverart.c
+++ b/plugins/cover_display/display_coverart.c
@@ -600,6 +600,7 @@ void coverart_display_update(gboolean clear_track_list) {
 void coverart_display_sort(gint order) {
     prefs_set_int("cad_sort", order);
     coverart_display_update(TRUE);
+    redraw(FALSE);
     gtkpod_broadcast_preference_change("cad_sort", order);
 }
 
@@ -1381,7 +1382,12 @@ void coverart_select_cover(Track *track) {
     index = g_list_position(album_key_list, key);
     g_free(trk_key);
 
-    /* Use the index value for the main image index */
+    /*
+     * Use the index value for the main image index.
+     * The index extracted from the album_key_list is
+     * taking into account the 4 nulls at the start of the
+     * list so this removes that inaccuracy.
+     */
     cdwidget->first_imgindex = index - IMG_MAIN;
     if (cdwidget->first_imgindex < 0)
         cdwidget->first_imgindex = 0;
@@ -1392,7 +1398,7 @@ void coverart_select_cover(Track *track) {
      * cover selection by blocking the event
      */
     g_signal_handler_block(cdwidget->cdslider, slide_signal_id);
-    gtk_range_set_value(GTK_RANGE (cdwidget->cdslider), index);
+    gtk_range_set_value(GTK_RANGE (cdwidget->cdslider), 
cdwidget->first_imgindex);
     g_signal_handler_unblock(cdwidget->cdslider, slide_signal_id);
 }
 

------------------------------------------------------------------------------
What You Don't Know About Data Connectivity CAN Hurt You
This paper provides an overview of data connectivity, details
its effect on application quality, and explores various alternative
solutions. http://p.sf.net/sfu/progress-d2d
_______________________________________________
gtkpod-cvs2 mailing list
gtkpod-cvs2@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gtkpod-cvs2

Reply via email to