Revision: 1917
          http://gtkpod.svn.sourceforge.net/gtkpod/?rev=1917&view=rev
Author:   Sikon
Date:     2008-01-05 10:46:46 -0800 (Sat, 05 Jan 2008)

Log Message:
-----------
Fixed rating regression

Modified Paths:
--------------
    gtkpod/trunk/src/display_tracks.c

Modified: gtkpod/trunk/src/display_tracks.c
===================================================================
--- gtkpod/trunk/src/display_tracks.c   2008-01-05 15:53:46 UTC (rev 1916)
+++ gtkpod/trunk/src/display_tracks.c   2008-01-05 18:46:46 UTC (rev 1917)
@@ -58,6 +58,8 @@
 /* column in which track pointer is stored */
 static const gint READOUT_COL = 0;
 
+static const gint RATING_STEP = 20;
+
 /* compare function to be used for string comparisons */
 static gint (*string_compare_func) (const gchar *str1, const gchar *str2) = 
compare_string;
 
@@ -865,9 +867,9 @@
        gtk_tree_path_free (path);
        gtk_tree_model_get(model, &iter, READOUT_COL, &track, -1);
        
-       if ((int) rating != track->rating)
+       if ((int) rating * RATING_STEP != track->rating)
        {
-               track->rating = (int) rating;           
+               track->rating = (int) rating * RATING_STEP;             
                track->time_modified = time (NULL);
         pm_track_changed (track);
         data_changed (track->itdb);
@@ -1082,7 +1084,7 @@
        {
        case TM_COLUMN_RATING:
                g_object_set (G_OBJECT (renderer),
-                                         "rating", (double)track->rating,
+                                         "rating", (double)(track->rating / 
RATING_STEP),
                                          NULL);
                break;
        case TM_COLUMN_TITLE:


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
gtkpod-cvs2 mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gtkpod-cvs2

Reply via email to