Revision: 1585
          http://gtkpod.svn.sourceforge.net/gtkpod/?rev=1585&view=rev
Author:   jcsjcs
Date:     2007-06-23 03:53:23 -0700 (Sat, 23 Jun 2007)

Log Message:
-----------
        * src/deatils.c (details_button_apply_clicked): write tags
          back to file if option is selected. Change modification time
          of changed tracks.

Modified Paths:
--------------
    gtkpod/trunk/ChangeLog_detailed
    gtkpod/trunk/TODOandBUGS.txt
    gtkpod/trunk/src/details.c

Modified: gtkpod/trunk/ChangeLog_detailed
===================================================================
--- gtkpod/trunk/ChangeLog_detailed     2007-06-23 07:07:12 UTC (rev 1584)
+++ gtkpod/trunk/ChangeLog_detailed     2007-06-23 10:53:23 UTC (rev 1585)
@@ -14,6 +14,10 @@
          thumbnail through libgpod and not from thumbnail filenames
          because these are not always set.
 
+       * src/deatils.c (details_button_apply_clicked): write tags
+          back to file if option is selected. Change modification time
+          of changed tracks.
+
 2007-06-22 Jorg Schuler <jcsjcs at users.sourceforge.net>
 
        * src/mp3file.c:

Modified: gtkpod/trunk/TODOandBUGS.txt
===================================================================
--- gtkpod/trunk/TODOandBUGS.txt        2007-06-23 07:07:12 UTC (rev 1584)
+++ gtkpod/trunk/TODOandBUGS.txt        2007-06-23 10:53:23 UTC (rev 1585)
@@ -9,8 +9,6 @@
 - when creating new repository: make sure backup repository filename isn't
   already used.
 
-- write ID3 tags when editing in details window
-
 - don't keep iTunesDB on iPod when syncing (takes up valuable space)
 
 - fileselection_select_script(): display @additional_text.

Modified: gtkpod/trunk/src/details.c
===================================================================
--- gtkpod/trunk/src/details.c  2007-06-23 07:07:12 UTC (rev 1584)
+++ gtkpod/trunk/src/details.c  2007-06-23 10:53:23 UTC (rev 1585)
@@ -359,6 +359,7 @@
 {
     GList *gl, *gl_orig;
     gboolean changed = FALSE;
+    GList *changed_tracks = NULL;
 
     g_return_if_fail (detail);
 
@@ -391,8 +392,18 @@
 
            if (tr_changed)
            {
+               tr_orig->time_modified = time (NULL);
                pm_track_changed (tr_orig);
            }
+
+           if (prefs_get_int("id3_write"))
+           {
+               /* add tracks to a list because write_tags_to_file()
+                  can remove newly created duplicates which is not a
+                  good idea from within a for() loop over tracks */
+               changed_tracks = g_list_prepend (changed_tracks, tr_orig);
+           }
+
            changed |= tr_changed;
            etr->tchanged = FALSE;
        }
@@ -402,9 +413,24 @@
 
     if (changed)
     {
-                       data_changed (detail->itdb);
+       data_changed (detail->itdb);
     }
     
+    if (prefs_get_int("id3_write"))
+    {
+       if (changed_tracks)
+       {
+           for (gl=changed_tracks; gl; gl=gl->next)
+           {
+               Track *tr = gl->data;
+               write_tags_to_file (tr);
+               /* display possible duplicates that have been removed */
+           }
+           gp_duplicate_remove (NULL, NULL);
+       }
+    }
+    g_list_free (changed_tracks);
+
     details_update_headline (detail);
 
     details_update_buttons (detail);


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 DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
gtkpod-cvs2 mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gtkpod-cvs2

Reply via email to