Revision: 1590
http://gtkpod.svn.sourceforge.net/gtkpod/?rev=1590&view=rev
Author: phantom_sf
Date: 2007-06-25 13:49:55 -0700 (Mon, 25 Jun 2007)
Log Message:
-----------
2007-06-25 P.G. Richardson <phantom_sf at users.sourceforge.net>
* display_itdb.h: added tartwork_changed flag to ExtraTrackData
* details.c: initialise tartwork_changed flag to FALSE. Use this
flag in details_copy_artwork as additional check if artwork
has changed. Removal of all tilda related cruff.
* fetchcover.c: removal of tilda related cruff with use of the
tartwork_changed flag from ExtraTrackData. Set Prev Button
initially to hidden until images from the net are retrieved.
Modified Paths:
--------------
gtkpod/trunk/ChangeLog_detailed
gtkpod/trunk/src/details.c
gtkpod/trunk/src/display_itdb.h
gtkpod/trunk/src/fetchcover.c
Modified: gtkpod/trunk/ChangeLog_detailed
===================================================================
--- gtkpod/trunk/ChangeLog_detailed 2007-06-25 14:23:59 UTC (rev 1589)
+++ gtkpod/trunk/ChangeLog_detailed 2007-06-25 20:49:55 UTC (rev 1590)
@@ -1,3 +1,15 @@
+2007-06-25 P.G. Richardson <phantom_sf at users.sourceforge.net>
+
+ * display_itdb.h: added tartwork_changed flag to ExtraTrackData
+
+ * details.c: initialise tartwork_changed flag to FALSE. Use this
+ flag in details_copy_artwork as additional check if artwork
+ has changed. Removal of all tilda related cruff.
+
+ * fetchcover.c: removal of tilda related cruff with use of the
+ tartwork_changed flag from ExtraTrackData. Set Prev Button
+ initially to hidden until images from the net are retrieved.
+
2007-06-25 Jorg Schuler <jcsjcs at users.sourceforge.net>
* src/display_playlists.c (pm_drag_motion): don't allow drops
Modified: gtkpod/trunk/src/details.c
===================================================================
--- gtkpod/trunk/src/details.c 2007-06-25 14:23:59 UTC (rev 1589)
+++ gtkpod/trunk/src/details.c 2007-06-25 20:49:55 UTC (rev 1590)
@@ -542,18 +542,9 @@
g_return_val_if_fail (fretr->thumb_path_locale, FALSE);
g_return_val_if_fail (toetr->thumb_path_locale, FALSE);
- if (strcmp (fretr->thumb_path_locale, toetr->thumb_path_locale) != 0)
+ if (strcmp (fretr->thumb_path_locale, toetr->thumb_path_locale) != 0
+ || fretr->tartwork_changed == TRUE)
{
- /* If filename ends with a ~ then remove it as we are preparing to save
*/
- if (g_str_has_suffix(fretr->thumb_path_locale, "~"))
- {
- gchar **basename = g_strsplit(fretr->thumb_path_locale, "~", 0);
- g_rename (fretr->thumb_path_locale, basename[0]);
-
- gp_track_set_thumbnails (frtrack, basename[0]);
- g_strfreev(basename);
- }
-
itdb_artwork_free (totrack->artwork);
totrack->artwork = itdb_artwork_duplicate (frtrack->artwork);
totrack->artwork_size = frtrack->artwork_size;
@@ -1472,6 +1463,7 @@
etr_dup = tr_dup->userdata;
g_return_if_fail (etr_dup);
etr_dup->tchanged = FALSE;
+ etr_dup->tartwork_changed = FALSE;
detail->tracks = g_list_prepend (detail->tracks, tr_dup);
}
Modified: gtkpod/trunk/src/display_itdb.h
===================================================================
--- gtkpod/trunk/src/display_itdb.h 2007-06-25 14:23:59 UTC (rev 1589)
+++ gtkpod/trunk/src/display_itdb.h 2007-06-25 20:49:55 UTC (rev 1590)
@@ -80,6 +80,7 @@
gchar *charset; /* charset used for ID3 tags */
gint32 sortindex; /* used for stable sorting (current order) */
gboolean tchanged; /* temporary use, e.g. in detail.c */
+ gboolean tartwork_changed; /* temporary use for artwork,
eg. in detail.c */
guint64 local_itdb_id; /* when using DND from local to iPod:
original itdb */
guint64 local_track_dbid; /* when using DND from local to iPod:
Modified: gtkpod/trunk/src/fetchcover.c
===================================================================
--- gtkpod/trunk/src/fetchcover.c 2007-06-25 14:23:59 UTC (rev 1589)
+++ gtkpod/trunk/src/fetchcover.c 2007-06-25 20:49:55 UTC (rev 1590)
@@ -67,8 +67,6 @@
static GtkWidget *fetchcover_statusbar;
/* Flag indicating whether a new net search should be initiated */
static gboolean netsearched = FALSE;
-/* Flag indicating whether the tilda should be used for the naming of the new
file */
-static gboolean USE_TILDA = FALSE;
#define IMGSCALE 256
@@ -450,6 +448,7 @@
net_search_track ();
netsearched = TRUE;
gtk_button_set_label (GTK_BUTTON(next_button), "_Next");
+ gtk_widget_show (prev_button);
}
/* Whether net search this time or not, should be another image to
display
@@ -472,7 +471,7 @@
if (displayed_cover_index > 0)
{
- /* stop anymore prev button press if first in the list */
+ /* enable prev button if not first in list */
gtk_widget_set_sensitive (prev_button, TRUE);
}
@@ -566,7 +565,6 @@
gchar *fetchcover_save (GtkWindow *parent)
{
gchar *newname = NULL;
- gchar *tildaname = NULL;
/* The default cover image will have both dir and filename set
* to null because no need to save because it is already saved (!!)
* Thus, this whole process is avoided. Added bonus that pressing
@@ -600,19 +598,9 @@
gchar *oldname = g_build_filename(displayed_cover->dir,
displayed_cover->filename, NULL);
/* Rename the preferred choice, ie. [EMAIL PROTECTED], to the
preferred name,
- * ie. After_Forever.jpg~. The tilda denotes that the file has
changed so provides a
- * signal for the details window to call copy_artwork
+ * ie. After_Forever.jpg.
*/
-
- if (USE_TILDA)
- {
- tildaname = g_strconcat (newname, "~", NULL);
- g_rename (oldname, tildaname);
- }
- else
- {
g_rename (oldname, newname);
- }
/* Tidy up to ensure the path will not get cleaned up
* by fetchcover_clean_up
@@ -624,13 +612,6 @@
displayed_cover->dir = NULL;
displayed_cover->filename = NULL;
}
-
- if (USE_TILDA)
- {
- g_free (newname);
- return tildaname;
- }
-
return newname;
}
#endif /* HAVE_CURL */
@@ -912,6 +893,7 @@
#endif /* HAVE_CURL */
gtk_widget_show_all (fetchcover_dialog);
+ gtk_widget_hide (prev_button);
g_object_unref (fetchcover_xml);
@@ -974,7 +956,6 @@
return;
}
- USE_TILDA = FALSE;
GtkWindow *parent = GTK_WINDOW (gtkpod_xml_get_widget (main_window_xml,
"gtkpod"));
GtkDialog *dialog = fetchcover_display_dialog (track, track->itdb->device,
parent);
g_return_if_fail (dialog);
@@ -1026,9 +1007,7 @@
GtkDialog *dialog = fetchcover_display_dialog (detail->track,
detail->itdb->device, parent);
g_return_if_fail (dialog);
- /* Set the tilda flag for the naming of the new artwork file */
- USE_TILDA = TRUE;
- result = gtk_dialog_run (GTK_DIALOG (dialog));
+ result = gtk_dialog_run (GTK_DIALOG (dialog));
gtk_widget_hide (GTK_WIDGET(dialog));
gtk_widget_destroy (GTK_WIDGET(dialog));
#ifdef HAVE_CURL
@@ -1054,6 +1033,7 @@
etd = track->userdata;
gp_track_set_thumbnails(track, filename);
etd->tchanged = TRUE;
+ etd->tartwork_changed = TRUE;
}
}
else
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