Update of /cvsroot/gtkpod/gtkpod/src
In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv12994/src
Modified Files:
file_export.c file_itunesdb.c misc_track.c
Log Message:
* src/file_export.c (export_trackglist_when_necessary):
cosmetic change (!a || !b) -> !(a && b)
* src/misc_track.c (add_tracks_to_playlist): bugfix: dragging
tracks between iPods did not work if no local path was
available.
Index: file_export.c
===================================================================
RCS file: /cvsroot/gtkpod/gtkpod/src/file_export.c,v
retrieving revision 1.68
retrieving revision 1.69
diff -u -d -r1.68 -r1.69
--- file_export.c 10 Feb 2007 09:33:33 -0000 1.68
+++ file_export.c 24 Feb 2007 05:48:33 -0000 1.69
@@ -1,4 +1,4 @@
-/* Time-stamp: <2007-02-10 17:46:56 jcs>
+/* Time-stamp: <2007-02-24 13:22:58 jcs>
|
| Copyright (C) 2002 Corey Donohoe <atmos at atmos.org>
| Copyright (C) 2002-2005 Jorg Schuler <jcsjcs at users sourceforge net>
@@ -716,8 +716,8 @@
g_return_val_if_fail (itdb_d, NULL);
g_return_val_if_fail (gtkpod_window, NULL);
- if (!(itdb_s->usertype & GP_ITDB_TYPE_IPOD) ||
- !(itdb_d->usertype & GP_ITDB_TYPE_LOCAL))
+ if (!((itdb_s->usertype & GP_ITDB_TYPE_IPOD) &&
+ (itdb_d->usertype & GP_ITDB_TYPE_LOCAL)))
{ /* drag is not from iPod to local database -> return copy of
* @tracks */
return g_list_copy (tracks);
Index: file_itunesdb.c
===================================================================
RCS file: /cvsroot/gtkpod/gtkpod/src/file_itunesdb.c,v
retrieving revision 1.110
retrieving revision 1.111
diff -u -d -r1.110 -r1.111
--- file_itunesdb.c 22 Feb 2007 23:50:45 -0000 1.110
+++ file_itunesdb.c 24 Feb 2007 05:48:33 -0000 1.111
@@ -1,4 +1,4 @@
-/* Time-stamp: <2007-02-08 00:00:07 jcs>
+/* Time-stamp: <2007-02-23 21:49:12 jcs>
|
| Copyright (C) 2002-2005 Jorg Schuler <jcsjcs at users sourceforge net>
| Part of the gtkpod project.
@@ -2053,7 +2053,7 @@
/* data has been modified so re-initialise the coverart display */
Playlist *plitem = pm_get_selected_playlist ();
- coverart_set_images (plitem->members);
+ coverart_set_images (plitem->members);
}
Index: misc_track.c
===================================================================
RCS file: /cvsroot/gtkpod/gtkpod/src/misc_track.c,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -d -r1.57 -r1.58
--- misc_track.c 4 Feb 2007 12:43:49 -0000 1.57
+++ misc_track.c 24 Feb 2007 05:48:33 -0000 1.58
@@ -1,4 +1,4 @@
-/* Time-stamp: <2006-11-23 00:45:41 jcs>
+/* Time-stamp: <2007-02-24 14:33:56 jcs>
|
| Copyright (C) 2002-2005 Jorg Schuler <jcsjcs at users sourceforge net>
| Part of the gtkpod project.
@@ -1378,8 +1378,42 @@
{ /* DND between different itdbs -- need to duplicate the
track before inserting */
Track *duptr, *addtr;
+ ExtraTrackData *eduptr;
/* duplicate track */
duptr = itdb_track_duplicate (track);
+ eduptr = duptr->userdata;
+ g_return_if_fail (eduptr);
+
+ duptr->transferred = FALSE;
+
+ /* check if adding to iPod and track is on different iPod */
+ if ((from_itdb->usertype & GP_ITDB_TYPE_IPOD) &&
+ (to_itdb->usertype & GP_ITDB_TYPE_IPOD))
+ {
+ /* Check if track exists locally */
+ if (!(eduptr->pc_path_locale &&
+ g_file_test (eduptr->pc_path_locale,
G_FILE_TEST_EXISTS)))
+ { /* No. Use iPod path as source */
+ g_free (eduptr->pc_path_locale);
+ g_free (eduptr->pc_path_utf8);
+ eduptr->pc_path_locale = itdb_filename_on_ipod (track);
+ eduptr->pc_path_utf8 = charset_to_utf8
(eduptr->pc_path_locale);
+ /* Remove old reference to iPod path */
+ g_free (duptr->ipod_path);
+ duptr->ipod_path = g_strdup ("");
+ }
+ }
+
+ if (!eduptr->pc_path_locale)
+ {
+ gchar *buf;
+ buf = get_track_info (track, FALSE);
+ gtkpod_warning (_("Could not find source file for '%s'.
Track not copied."));
+ g_free (buf);
+ itdb_track_free (duptr);
+ return;
+ }
+
/* add to database -- if duplicate detection is on and the
same track already exists in the database, the already
existing track is returned and @duptr is freed */
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
gtkpod-cvs2 mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gtkpod-cvs2