Revision: 2058
          http://gtkpod.svn.sourceforge.net/gtkpod/?rev=2058&view=rev
Author:   jcsjcs
Date:     2008-07-19 14:18:02 +0000 (Sat, 19 Jul 2008)

Log Message:
-----------
        * src/file_itunesdb.c (data_changed): don't mark non-imported
          iPods as changed. Thanks to Andrea.

Modified Paths:
--------------
    gtkpod/trunk/ChangeLog
    gtkpod/trunk/src/file_itunesdb.c

Modified: gtkpod/trunk/ChangeLog
===================================================================
--- gtkpod/trunk/ChangeLog      2008-07-19 14:03:36 UTC (rev 2057)
+++ gtkpod/trunk/ChangeLog      2008-07-19 14:18:02 UTC (rev 2058)
@@ -1,5 +1,10 @@
 2008-07-19 Jorg Schuler <jcsjcs at users.sourceforge.net>
 
+       * src/file_itunesdb.c (data_changed): don't mark non-imported
+          iPods as changed. Thanks to Andrea.
+
+2008-07-19 Jorg Schuler <jcsjcs at users.sourceforge.net>
+
        * src/confirmation.c (gtkpod_confirmation): initialize
           <scrolled> variable. Thanks to Andrea.
 

Modified: gtkpod/trunk/src/file_itunesdb.c
===================================================================
--- gtkpod/trunk/src/file_itunesdb.c    2008-07-19 14:03:36 UTC (rev 2057)
+++ gtkpod/trunk/src/file_itunesdb.c    2008-07-19 14:18:02 UTC (rev 2058)
@@ -2145,9 +2145,19 @@
     eitdb = itdb->userdata;
     g_return_if_fail (eitdb);
 
-    eitdb->data_changed = TRUE;
-    pm_itdb_name_changed (itdb);
-    space_data_update ();
+    if ((itdb->usertype & GP_ITDB_TYPE_IPOD) && !eitdb->itdb_imported)
+    {   /* don't do anything for non-imported iPod
+          repositories. Marking them as "changed" allows the empty
+          repository to be saved back to the iPod, overwriting data
+          there */
+       return;
+    }
+    else
+    {
+       eitdb->data_changed = TRUE;
+       pm_itdb_name_changed (itdb);
+       space_data_update ();
+    }
 }
 
 


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 the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
gtkpod-cvs2 mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gtkpod-cvs2

Reply via email to