[easytag] Use new et_file_tag_set_picture()
- From: David King <davidk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [easytag] Use new et_file_tag_set_picture()
- Date: Sun, 28 Dec 2014 14:32:57 +0000 (UTC)
commit 411b45ede2bc9c46668cb0be90d72b5147b4e5c6
Author: David King <amigadave amigadave com>
Date: Sun Dec 28 10:06:57 2014 +0000
Use new et_file_tag_set_picture()
src/et_core.c | 32 +++-----------------------------
src/tag_area.c | 6 +-----
src/tags/mp4_tag.cc | 2 +-
3 files changed, 5 insertions(+), 35 deletions(-)
---
diff --git a/src/et_core.c b/src/et_core.c
index c221212..f1ca3fa 100644
--- a/src/et_core.c
+++ b/src/et_core.c
@@ -2422,7 +2422,7 @@ gboolean ET_Free_File_Tag_Item (File_Tag *FileTag)
g_free(FileTag->copyright);
g_free(FileTag->url);
g_free(FileTag->encoded_by);
- et_picture_free (FileTag->picture);
+ et_file_tag_set_picture (FileTag, NULL);
// Free list of other fields
ET_Free_File_Tag_Item_Other_Field(FileTag);
@@ -2718,20 +2718,7 @@ ET_Copy_File_Tag_Item (const ET_File *ETFile, File_Tag *FileTag)
FileTag->encoded_by = NULL;
}
- if (FileTagCur->picture)
- {
- if (FileTag->picture)
- {
- et_picture_free (FileTag->picture);
- }
-
- FileTag->picture = et_picture_copy_all (FileTagCur->picture);
- }
- else if (FileTag->picture)
- {
- et_picture_free (FileTag->picture);
- FileTag->picture = NULL;
- }
+ et_file_tag_set_picture (FileTag, FileTagCur->picture);
if (FileTagCur->other)
{
@@ -3473,20 +3460,7 @@ ET_Save_File_Tag_Internal (ET_File *ETFile, File_Tag *FileTag)
/* Picture */
- if(FileTagCur->picture)
- {
- if (FileTag->picture)
- {
- et_picture_free (FileTag->picture);
- }
-
- FileTag->picture = et_picture_copy_all (FileTagCur->picture);
- }
- else if (FileTag->picture)
- {
- et_picture_free (FileTag->picture);
- FileTag->picture = NULL;
- }
+ et_file_tag_set_picture (FileTag, FileTagCur->picture);
return TRUE;
}
diff --git a/src/tag_area.c b/src/tag_area.c
index 75bd70d..6cc3626 100644
--- a/src/tag_area.c
+++ b/src/tag_area.c
@@ -2928,11 +2928,7 @@ et_tag_area_create_file_tag (EtTagArea *self)
GtkTreeModel *model;
GtkTreeIter iter;
- if (FileTag->picture)
- {
- et_picture_free (FileTag->picture);
- FileTag->picture = NULL;
- }
+ et_file_tag_set_picture (FileTag, NULL);
model = gtk_tree_view_get_model (GTK_TREE_VIEW (priv->picture_entry_view));
diff --git a/src/tags/mp4_tag.cc b/src/tags/mp4_tag.cc
index 1a2ed64..382e745 100644
--- a/src/tags/mp4_tag.cc
+++ b/src/tags/mp4_tag.cc
@@ -217,7 +217,7 @@ mp4tag_read_file_tag (GFile *file,
}
else
{
- FileTag->picture = NULL;
+ et_file_tag_set_picture (FileTag, NULL);
}
return TRUE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]