commit 31df41432eddeb5b3649d7200a0a96a1eeaa3663
Author: phantomjinx <p.g.richard...@phantomjinx.co.uk>
Date:   Mon Dec 12 13:27:29 2011 +0000

    Fix for display of progress while converting tracks
    
    * When converting tracks on writing itdb, the progress bar must be reset
      to the number of tracks to be transferred. Otherwise, no progress and lots
      of warning messages on the cmd line.

 libgtkpod/file_itunesdb.c |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/libgtkpod/file_itunesdb.c b/libgtkpod/file_itunesdb.c
index 28cc997..96dc179 100644
--- a/libgtkpod/file_itunesdb.c
+++ b/libgtkpod/file_itunesdb.c
@@ -1504,7 +1504,11 @@ static gboolean transfer_tracks(iTunesDB *itdb, 
TransferData *td) {
     file_transfer_reschedule(itdb);
 
     /* find out how many tracks have already been processed */
-    file_transfer_get_status(itdb, NULL, NULL, NULL, &transferred_num, 
&failed_num);
+    file_transfer_get_status(itdb, &to_convert_num, &converting_num, 
&to_transfer_num, &transferred_num, &failed_num);
+
+    /* Reset the progress bar to the total number of tracks to be transferred 
*/
+    gtkpod_statusbar_reset_progress(to_convert_num + converting_num + 
to_transfer_num + failed_num + transferred_num);
+
     transferred_init = transferred_num + failed_num;
 
     start = time(NULL);
@@ -1663,6 +1667,12 @@ static gboolean gp_write_itdb(iTunesDB *itdb) {
         }
         if (success) {
             /* write tracks to iPod */
+            /*
+             * Note:
+             * this resets and increments the progress bar
+             * so the reset_progress_status must be called after
+             * this has finished.
+             */
             success = transfer_tracks(itdb, transferdata);
         }
     }

------------------------------------------------------------------------------
Learn Windows Azure Live!  Tuesday, Dec 13, 2011
Microsoft is holding a special Learn Windows Azure training event for 
developers. It will provide a great way to learn Windows Azure and what it 
provides. You can attend the event by watching it streamed LIVE online.  
Learn more at http://p.sf.net/sfu/ms-windowsazure
_______________________________________________
gtkpod-cvs2 mailing list
gtkpod-cvs2@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gtkpod-cvs2

Reply via email to