[easytag] Use consistent naming for File_Tag methods



commit 4db3cfad59ada303745ca1d938daf0fdec92b88d
Author: David King <amigadave amigadave com>
Date:   Sun Jan 4 21:51:44 2015 +0000

    Use consistent naming for File_Tag methods
    
    Use et_file_tag_ as a prefix for functions dealing with File_Tag
    structs.

 src/application_window.c |    2 +-
 src/cddb_dialog.c        |    6 ++--
 src/file.c               |   15 +++++++---
 src/file_list.c          |    4 +-
 src/file_tag.c           |   66 ++++++++++++++++++++++-----------------------
 src/file_tag.h           |    8 +++---
 src/scan_dialog.c        |   24 ++++++++--------
 src/tag_area.c           |   36 ++++++++++++------------
 src/tags/flac_tag.c      |    2 +-
 src/tags/id3_tag.c       |   11 +++++---
 10 files changed, 90 insertions(+), 84 deletions(-)
---
diff --git a/src/application_window.c b/src/application_window.c
index db1318f..ffa7cff 100644
--- a/src/application_window.c
+++ b/src/application_window.c
@@ -877,7 +877,7 @@ on_remove_tags (GSimpleAction *action,
     {
         etfile = et_browser_get_et_file_from_path (ET_BROWSER (priv->browser),
                                                    l->data);
-        FileTag = ET_File_Tag_Item_New ();
+        FileTag = et_file_tag_new ();
         ET_Manage_Changes_Of_File_Data (etfile, NULL, FileTag);
 
         fraction = (++progress_bar_index) / (double) selectcount;
diff --git a/src/cddb_dialog.c b/src/cddb_dialog.c
index 7df3964..996f1bd 100644
--- a/src/cddb_dialog.c
+++ b/src/cddb_dialog.c
@@ -2362,8 +2362,8 @@ Cddb_Set_Track_Infos_To_File_List (EtCDDBDialog *self)
 
             if (set_fields != 0)
             {
-                // Allocation of a new FileTag
-                FileTag = ET_File_Tag_Item_New();
+                /* Allocation of a new FileTag. */
+                FileTag = et_file_tag_new ();
                 ET_Copy_File_Tag_Item (etfile, FileTag);
 
                 if (set_fields & ET_CDDB_SET_FIELD_TITLE)
@@ -2492,7 +2492,7 @@ Cddb_Set_Track_Infos_To_File_List (EtCDDBDialog *self)
             if (set_fields != 0)
             {
                 /* Allocation of a new FileTag. */
-                FileTag = ET_File_Tag_Item_New ();
+                FileTag = et_file_tag_new ();
                 ET_Copy_File_Tag_Item (etfile, FileTag);
 
                 if (set_fields & ET_CDDB_SET_FIELD_TITLE)
diff --git a/src/file.c b/src/file.c
index 57f19ca..dbd56fa 100644
--- a/src/file.c
+++ b/src/file.c
@@ -1109,7 +1109,9 @@ ET_Free_File_Tag_List (GList *FileTagList)
     for (l = FileTagList; l != NULL; l = g_list_next (l))
     {
         if ((File_Tag *)l->data)
-            ET_Free_File_Tag_Item ((File_Tag *)l->data);
+        {
+            et_file_tag_free ((File_Tag *)l->data);
+        }
     }
 
     g_list_free (FileTagList);
@@ -1440,7 +1442,7 @@ void ET_Save_File_Data_From_UI (ET_File *ETFile)
             break;
         case UNKNOWN_TAG:
         default:
-            FileTag = ET_File_Tag_Item_New ();
+            FileTag = et_file_tag_new ();
             Log_Print(LOG_ERROR,"FileTag: Undefined tag type %d for file 
%s.",ETFileDescription->TagType,cur_filename_utf8);
             break;
     }
@@ -1976,13 +1978,16 @@ ET_Manage_Changes_Of_File_Data (ET_File *ETFile,
      */
     if (FileTag)
     {
-        if ( ETFile->FileTag && ET_Detect_Changes_Of_File_Tag( (File_Tag *)(ETFile->FileTag)->data,FileTag 
)==TRUE )
+        if (ETFile->FileTag
+            && et_file_tag_detect_difference ((File_Tag *)(ETFile->FileTag)->data,
+                                              FileTag) == TRUE)
         {
             ET_Add_File_Tag_To_List(ETFile,FileTag);
             undo_added |= TRUE;
-        }else
+        }
+        else
         {
-            ET_Free_File_Tag_Item(FileTag);
+            et_file_tag_free (FileTag);
         }
     }
 
diff --git a/src/file_list.c b/src/file_list.c
index c4d79d8..ab0fd57 100644
--- a/src/file_list.c
+++ b/src/file_list.c
@@ -249,7 +249,7 @@ ET_Add_File_To_File_List (gchar *filename)
     FileName->value_ck   = g_utf8_collate_key_for_filename(filename_utf8, -1);
 
     /* Fill the File_Tag structure for FileTagList */
-    FileTag = ET_File_Tag_Item_New();
+    FileTag = et_file_tag_new ();
     FileTag->saved = TRUE;    /* The file hasn't been changed, so it's saved */
 
     /* Patch from Doruk Fisek and Onur Kucuk: avoid upper/lower conversion bugs
@@ -463,7 +463,7 @@ ET_Add_File_To_File_List (gchar *filename)
     FileName->key = undo_key;
     ET_Save_File_Name_Internal(ETFile,FileName);
 
-    FileTag = ET_File_Tag_Item_New();
+    FileTag = et_file_tag_new ();
     FileTag->key = undo_key;
     ET_Save_File_Tag_Internal(ETFile,FileTag);
 
diff --git a/src/file_tag.c b/src/file_tag.c
index ab2748b..9215ffd 100644
--- a/src/file_tag.c
+++ b/src/file_tag.c
@@ -1,5 +1,5 @@
 /* EasyTAG - tag editor for audio files
- * Copyright (C) 2014  David King <amigadave amigadave com>
+ * Copyright (C) 2014,2015  David King <amigadave amigadave com>
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License as published by the Free
@@ -21,7 +21,7 @@
 #include "et_core.h"
 
 static void
-ET_Initialize_File_Tag_Item (File_Tag *FileTag)
+et_file_tag_init (File_Tag *FileTag)
 {
     if (FileTag)
     {
@@ -51,12 +51,13 @@ ET_Initialize_File_Tag_Item (File_Tag *FileTag)
 /*
  * Create a new File_Tag structure
  */
-File_Tag *ET_File_Tag_Item_New (void)
+File_Tag *
+et_file_tag_new (void)
 {
     File_Tag *FileTag;
 
     FileTag = g_slice_new (File_Tag);
-    ET_Initialize_File_Tag_Item (FileTag);
+    et_file_tag_init (FileTag);
 
     return FileTag;
 }
@@ -64,21 +65,20 @@ File_Tag *ET_File_Tag_Item_New (void)
 /*
  * Frees the list of 'other' field in a File_Tag item (contains attached gchar data).
  */
-static gboolean
-ET_Free_File_Tag_Item_Other_Field (File_Tag *FileTag)
+static void
+et_file_tag_free_other_field (File_Tag *file_tag)
 {
-    g_list_free_full (FileTag->other, g_free);
-
-    return TRUE;
+    g_list_free_full (file_tag->other, g_free);
 }
 
 
 /*
  * Frees a File_Tag item.
  */
-gboolean ET_Free_File_Tag_Item (File_Tag *FileTag)
+void
+et_file_tag_free (File_Tag *FileTag)
 {
-    g_return_val_if_fail (FileTag != NULL, FALSE);
+    g_return_if_fail (FileTag != NULL);
 
     g_free(FileTag->title);
     g_free(FileTag->artist);
@@ -97,11 +97,9 @@ gboolean ET_Free_File_Tag_Item (File_Tag *FileTag)
     g_free(FileTag->url);
     g_free(FileTag->encoded_by);
     et_file_tag_set_picture (FileTag, NULL);
-    // Free list of other fields
-    ET_Free_File_Tag_Item_Other_Field(FileTag);
+    et_file_tag_free_other_field (FileTag);
 
     g_slice_free (File_Tag, FileTag);
-    return TRUE;
 }
 
 /*
@@ -296,7 +294,7 @@ ET_Copy_File_Tag_Item (const ET_File *ETFile, File_Tag *FileTag)
         ET_Copy_File_Tag_Item_Other_Field(ETFile,FileTag);
     }else
     {
-        ET_Free_File_Tag_Item_Other_Field (FileTag);
+        et_file_tag_free_other_field (FileTag);
     }
 
     return TRUE;
@@ -307,8 +305,8 @@ ET_Copy_File_Tag_Item (const ET_File *ETFile, File_Tag *FileTag)
  * Must be used only for the 'gchar *' components
  */
 static void
-ET_Set_Field_File_Tag_Item (gchar **FileTagField,
-                            const gchar *value)
+et_file_tag_set_field (gchar **FileTagField,
+                       const gchar *value)
 {
     g_return_if_fail (FileTagField != NULL);
 
@@ -333,7 +331,7 @@ et_file_tag_set_title (File_Tag *file_tag,
 {
     g_return_if_fail (file_tag != NULL);
 
-    ET_Set_Field_File_Tag_Item (&file_tag->title, title);
+    et_file_tag_set_field (&file_tag->title, title);
 }
 
 void
@@ -342,7 +340,7 @@ et_file_tag_set_artist (File_Tag *file_tag,
 {
     g_return_if_fail (file_tag != NULL);
 
-    ET_Set_Field_File_Tag_Item (&file_tag->artist, artist);
+    et_file_tag_set_field (&file_tag->artist, artist);
 }
 
 void
@@ -351,7 +349,7 @@ et_file_tag_set_album_artist (File_Tag *file_tag,
 {
     g_return_if_fail (file_tag != NULL);
 
-    ET_Set_Field_File_Tag_Item (&file_tag->album_artist, album_artist);
+    et_file_tag_set_field (&file_tag->album_artist, album_artist);
 }
 
 void
@@ -360,7 +358,7 @@ et_file_tag_set_album (File_Tag *file_tag,
 {
     g_return_if_fail (file_tag != NULL);
 
-    ET_Set_Field_File_Tag_Item (&file_tag->album, album);
+    et_file_tag_set_field (&file_tag->album, album);
 }
 
 void
@@ -369,7 +367,7 @@ et_file_tag_set_disc_number (File_Tag *file_tag,
 {
     g_return_if_fail (file_tag != NULL);
 
-    ET_Set_Field_File_Tag_Item (&file_tag->disc_number, disc_number);
+    et_file_tag_set_field (&file_tag->disc_number, disc_number);
 }
 
 void
@@ -378,7 +376,7 @@ et_file_tag_set_disc_total (File_Tag *file_tag,
 {
     g_return_if_fail (file_tag != NULL);
 
-    ET_Set_Field_File_Tag_Item (&file_tag->disc_total, disc_total);
+    et_file_tag_set_field (&file_tag->disc_total, disc_total);
 }
 
 void
@@ -387,7 +385,7 @@ et_file_tag_set_year (File_Tag *file_tag,
 {
     g_return_if_fail (file_tag != NULL);
 
-    ET_Set_Field_File_Tag_Item (&file_tag->year, year);
+    et_file_tag_set_field (&file_tag->year, year);
 }
 
 void
@@ -396,7 +394,7 @@ et_file_tag_set_track_number (File_Tag *file_tag,
 {
     g_return_if_fail (file_tag != NULL);
 
-    ET_Set_Field_File_Tag_Item (&file_tag->track, track_number);
+    et_file_tag_set_field (&file_tag->track, track_number);
 }
 
 void
@@ -405,7 +403,7 @@ et_file_tag_set_track_total (File_Tag *file_tag,
 {
     g_return_if_fail (file_tag != NULL);
 
-    ET_Set_Field_File_Tag_Item (&file_tag->track_total, track_total);
+    et_file_tag_set_field (&file_tag->track_total, track_total);
 }
 
 void
@@ -414,7 +412,7 @@ et_file_tag_set_genre (File_Tag *file_tag,
 {
     g_return_if_fail (file_tag != NULL);
 
-    ET_Set_Field_File_Tag_Item (&file_tag->genre, genre);
+    et_file_tag_set_field (&file_tag->genre, genre);
 }
 
 void
@@ -423,7 +421,7 @@ et_file_tag_set_comment (File_Tag *file_tag,
 {
     g_return_if_fail (file_tag != NULL);
 
-    ET_Set_Field_File_Tag_Item (&file_tag->comment, comment);
+    et_file_tag_set_field (&file_tag->comment, comment);
 }
 
 void
@@ -432,7 +430,7 @@ et_file_tag_set_composer (File_Tag *file_tag,
 {
     g_return_if_fail (file_tag != NULL);
 
-    ET_Set_Field_File_Tag_Item (&file_tag->composer, composer);
+    et_file_tag_set_field (&file_tag->composer, composer);
 }
 
 void
@@ -441,7 +439,7 @@ et_file_tag_set_orig_artist (File_Tag *file_tag,
 {
     g_return_if_fail (file_tag != NULL);
 
-    ET_Set_Field_File_Tag_Item (&file_tag->orig_artist, orig_artist);
+    et_file_tag_set_field (&file_tag->orig_artist, orig_artist);
 }
 
 void
@@ -450,7 +448,7 @@ et_file_tag_set_copyright (File_Tag *file_tag,
 {
     g_return_if_fail (file_tag != NULL);
 
-    ET_Set_Field_File_Tag_Item (&file_tag->copyright, copyright);
+    et_file_tag_set_field (&file_tag->copyright, copyright);
 }
 
 void
@@ -459,7 +457,7 @@ et_file_tag_set_url (File_Tag *file_tag,
 {
     g_return_if_fail (file_tag != NULL);
 
-    ET_Set_Field_File_Tag_Item (&file_tag->url, url);
+    et_file_tag_set_field (&file_tag->url, url);
 }
 
 void
@@ -468,7 +466,7 @@ et_file_tag_set_encoded_by (File_Tag *file_tag,
 {
     g_return_if_fail (file_tag != NULL);
 
-    ET_Set_Field_File_Tag_Item (&file_tag->encoded_by, encoded_by);
+    et_file_tag_set_field (&file_tag->encoded_by, encoded_by);
 }
 
 /*
@@ -503,7 +501,7 @@ et_file_tag_set_picture (File_Tag *file_tag,
  *  - if field is '' or NULL => will be removed
  */
 gboolean
-ET_Detect_Changes_Of_File_Tag (const File_Tag *FileTag1,
+et_file_tag_detect_difference (const File_Tag *FileTag1,
                                const File_Tag *FileTag2)
 {
     const EtPicture *pic1;
diff --git a/src/file_tag.h b/src/file_tag.h
index 9793535..d90d5ba 100644
--- a/src/file_tag.h
+++ b/src/file_tag.h
@@ -1,5 +1,5 @@
 /* EasyTAG - tag editor for audio files
- * Copyright (C) 2014  David King <amigadave amigadave com>
+ * Copyright (C) 2014,2015  David King <amigadave amigadave com>
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License as published by the Free
@@ -75,8 +75,8 @@ typedef struct
     GList *other;
 } File_Tag;
 
-File_Tag * ET_File_Tag_Item_New (void);
-gboolean ET_Free_File_Tag_Item (File_Tag *FileTag);
+File_Tag * et_file_tag_new (void);
+void et_file_tag_free (File_Tag *file_tag);
 
 void et_file_tag_set_title (File_Tag *file_tag, const gchar *title);
 void et_file_tag_set_artist (File_Tag *file_tag, const gchar *artist);
@@ -96,7 +96,7 @@ void et_file_tag_set_url (File_Tag *file_tag, const gchar *url);
 void et_file_tag_set_encoded_by (File_Tag *file_tag, const gchar *encoded_by);
 void et_file_tag_set_picture (File_Tag *file_tag, const EtPicture *pic);
 
-gboolean ET_Detect_Changes_Of_File_Tag (const File_Tag *FileTag1, const File_Tag  *FileTag2);
+gboolean et_file_tag_detect_difference (const File_Tag *FileTag1, const File_Tag  *FileTag2);
 
 G_END_DECLS
 
diff --git a/src/scan_dialog.c b/src/scan_dialog.c
index 0c25813..9a5ef11 100644
--- a/src/scan_dialog.c
+++ b/src/scan_dialog.c
@@ -348,7 +348,7 @@ Scan_Tag_With_Mask (EtScanDialog *self, ET_File *ETFile)
     if (!mask) return;
 
     // Create a new File_Tag item
-    FileTag = ET_File_Tag_Item_New();
+    FileTag = et_file_tag_new ();
     ET_Copy_File_Tag_Item(ETFile,FileTag);
 
     // Process this mask with file
@@ -1356,7 +1356,7 @@ Scan_Process_Fields (EtScanDialog *self, ET_File *ETFile)
         {
             if (!FileTag)
             {
-                FileTag = ET_File_Tag_Item_New();
+                FileTag = et_file_tag_new ();
                 ET_Copy_File_Tag_Item(ETFile,FileTag);
             }
 
@@ -1375,7 +1375,7 @@ Scan_Process_Fields (EtScanDialog *self, ET_File *ETFile)
         {
             if (!FileTag)
             {
-                FileTag = ET_File_Tag_Item_New();
+                FileTag = et_file_tag_new ();
                 ET_Copy_File_Tag_Item(ETFile,FileTag);
             }
 
@@ -1394,7 +1394,7 @@ Scan_Process_Fields (EtScanDialog *self, ET_File *ETFile)
         {
             if (!FileTag)
             {
-                FileTag = ET_File_Tag_Item_New();
+                FileTag = et_file_tag_new ();
                 ET_Copy_File_Tag_Item(ETFile,FileTag);
             }
 
@@ -1413,7 +1413,7 @@ Scan_Process_Fields (EtScanDialog *self, ET_File *ETFile)
         {
             if (!FileTag)
             {
-                FileTag = ET_File_Tag_Item_New();
+                FileTag = et_file_tag_new ();
                 ET_Copy_File_Tag_Item(ETFile,FileTag);
             }
 
@@ -1432,7 +1432,7 @@ Scan_Process_Fields (EtScanDialog *self, ET_File *ETFile)
         {
             if (!FileTag)
             {
-                FileTag = ET_File_Tag_Item_New();
+                FileTag = et_file_tag_new ();
                 ET_Copy_File_Tag_Item(ETFile,FileTag);
             }
 
@@ -1451,7 +1451,7 @@ Scan_Process_Fields (EtScanDialog *self, ET_File *ETFile)
         {
             if (!FileTag)
             {
-                FileTag = ET_File_Tag_Item_New();
+                FileTag = et_file_tag_new ();
                 ET_Copy_File_Tag_Item(ETFile,FileTag);
             }
 
@@ -1470,7 +1470,7 @@ Scan_Process_Fields (EtScanDialog *self, ET_File *ETFile)
         {
             if (!FileTag)
             {
-                FileTag = ET_File_Tag_Item_New();
+                FileTag = et_file_tag_new ();
                 ET_Copy_File_Tag_Item(ETFile,FileTag);
             }
 
@@ -1489,7 +1489,7 @@ Scan_Process_Fields (EtScanDialog *self, ET_File *ETFile)
         {
             if (!FileTag)
             {
-                FileTag = ET_File_Tag_Item_New();
+                FileTag = et_file_tag_new ();
                 ET_Copy_File_Tag_Item(ETFile,FileTag);
             }
 
@@ -1508,7 +1508,7 @@ Scan_Process_Fields (EtScanDialog *self, ET_File *ETFile)
         {
             if (!FileTag)
             {
-                FileTag = ET_File_Tag_Item_New();
+                FileTag = et_file_tag_new ();
                 ET_Copy_File_Tag_Item(ETFile,FileTag);
             }
 
@@ -1527,7 +1527,7 @@ Scan_Process_Fields (EtScanDialog *self, ET_File *ETFile)
         {
             if (!FileTag)
             {
-                FileTag = ET_File_Tag_Item_New();
+                FileTag = et_file_tag_new ();
                 ET_Copy_File_Tag_Item(ETFile,FileTag);
             }
 
@@ -1546,7 +1546,7 @@ Scan_Process_Fields (EtScanDialog *self, ET_File *ETFile)
         {
             if (!FileTag)
             {
-                FileTag = ET_File_Tag_Item_New();
+                FileTag = et_file_tag_new ();
                 ET_Copy_File_Tag_Item(ETFile,FileTag);
             }
 
diff --git a/src/tag_area.c b/src/tag_area.c
index d6ea9ef..13fb7d1 100644
--- a/src/tag_area.c
+++ b/src/tag_area.c
@@ -176,7 +176,7 @@ on_apply_to_selection (GObject *object,
         for (l = etfilelist; l != NULL; l = g_list_next (l))
         {
             etfile = (ET_File *)l->data;
-            FileTag = ET_File_Tag_Item_New();
+            FileTag = et_file_tag_new ();
             ET_Copy_File_Tag_Item(etfile,FileTag);
             et_file_tag_set_title (FileTag, string_to_set);
             ET_Manage_Changes_Of_File_Data(etfile,NULL,FileTag);
@@ -198,7 +198,7 @@ on_apply_to_selection (GObject *object,
         for (l = etfilelist; l != NULL; l = g_list_next (l))
         {
             etfile = (ET_File *)l->data;
-            FileTag = ET_File_Tag_Item_New();
+            FileTag = et_file_tag_new ();
             ET_Copy_File_Tag_Item(etfile,FileTag);
             et_file_tag_set_artist (FileTag, string_to_set);
             ET_Manage_Changes_Of_File_Data(etfile,NULL,FileTag);
@@ -219,7 +219,7 @@ on_apply_to_selection (GObject *object,
         for (l = etfilelist; l != NULL; l = g_list_next (l))
         {
             etfile = (ET_File *)l->data;
-            FileTag = ET_File_Tag_Item_New();
+            FileTag = et_file_tag_new ();
             ET_Copy_File_Tag_Item(etfile,FileTag);
             et_file_tag_set_album_artist (FileTag, string_to_set);
             ET_Manage_Changes_Of_File_Data(etfile,NULL,FileTag);
@@ -241,7 +241,7 @@ on_apply_to_selection (GObject *object,
         for (l = etfilelist; l != NULL; l = g_list_next (l))
         {
             etfile = (ET_File *)l->data;
-            FileTag = ET_File_Tag_Item_New();
+            FileTag = et_file_tag_new ();
             ET_Copy_File_Tag_Item(etfile,FileTag);
             et_file_tag_set_album (FileTag, string_to_set);
             ET_Manage_Changes_Of_File_Data(etfile,NULL,FileTag);
@@ -279,7 +279,7 @@ on_apply_to_selection (GObject *object,
         for (l = etfilelist; l != NULL; l = g_list_next (l))
         {
             etfile = (ET_File *)l->data;
-            FileTag = ET_File_Tag_Item_New();
+            FileTag = et_file_tag_new ();
             ET_Copy_File_Tag_Item(etfile,FileTag);
             et_file_tag_set_disc_number (FileTag, string_to_set);
             et_file_tag_set_disc_total (FileTag, string_to_set1);
@@ -311,7 +311,7 @@ on_apply_to_selection (GObject *object,
         for (l = etfilelist; l != NULL; l = g_list_next (l))
         {
             etfile = (ET_File *)l->data;
-            FileTag = ET_File_Tag_Item_New();
+            FileTag = et_file_tag_new ();
             ET_Copy_File_Tag_Item(etfile,FileTag);
             et_file_tag_set_year (FileTag, string_to_set);
             ET_Manage_Changes_Of_File_Data(etfile,NULL,FileTag);
@@ -335,7 +335,7 @@ on_apply_to_selection (GObject *object,
         for (l = etfilelist; l != NULL; l = g_list_next (l))
         {
             etfile = (ET_File *)l->data;
-            FileTag = ET_File_Tag_Item_New();
+            FileTag = et_file_tag_new ();
             ET_Copy_File_Tag_Item(etfile,FileTag);
 
             // We apply the TrackEntry field to all others files only if it is to delete
@@ -402,7 +402,7 @@ on_apply_to_selection (GObject *object,
             // The file is in the selection?
             if ( (ET_File *)etfilelistfull->data == etfile )
             {
-                FileTag = ET_File_Tag_Item_New();
+                FileTag = et_file_tag_new ();
                 ET_Copy_File_Tag_Item(etfile,FileTag);
                 et_file_tag_set_track_number (FileTag, string_to_set);
                 ET_Manage_Changes_Of_File_Data(etfile,NULL,FileTag);
@@ -439,7 +439,7 @@ on_apply_to_selection (GObject *object,
             if (!string_to_set1)
                 string_to_set1 = g_strdup(string_to_set); // Just for the message below...
 
-            FileTag = ET_File_Tag_Item_New();
+            FileTag = et_file_tag_new ();
             ET_Copy_File_Tag_Item(etfile,FileTag);
             et_file_tag_set_track_total (FileTag, string_to_set);
             ET_Manage_Changes_Of_File_Data(etfile,NULL,FileTag);
@@ -462,7 +462,7 @@ on_apply_to_selection (GObject *object,
         for (l = etfilelist; l != NULL; l = g_list_next (l))
         {
             etfile = (ET_File *)l->data;
-            FileTag = ET_File_Tag_Item_New();
+            FileTag = et_file_tag_new ();
             ET_Copy_File_Tag_Item(etfile,FileTag);
             et_file_tag_set_genre (FileTag, string_to_set);
             ET_Manage_Changes_Of_File_Data(etfile,NULL,FileTag);
@@ -491,7 +491,7 @@ on_apply_to_selection (GObject *object,
         for (l = etfilelist; l != NULL; l = g_list_next (l))
         {
             etfile = (ET_File *)l->data;
-            FileTag = ET_File_Tag_Item_New();
+            FileTag = et_file_tag_new ();
             ET_Copy_File_Tag_Item(etfile,FileTag);
             et_file_tag_set_comment (FileTag, string_to_set);
             ET_Manage_Changes_Of_File_Data(etfile,NULL,FileTag);
@@ -512,7 +512,7 @@ on_apply_to_selection (GObject *object,
         for (l = etfilelist; l != NULL; l = g_list_next (l))
         {
             etfile = (ET_File *)l->data;
-            FileTag = ET_File_Tag_Item_New();
+            FileTag = et_file_tag_new ();
             ET_Copy_File_Tag_Item(etfile,FileTag);
             et_file_tag_set_composer (FileTag, string_to_set);
             ET_Manage_Changes_Of_File_Data(etfile,NULL,FileTag);
@@ -534,7 +534,7 @@ on_apply_to_selection (GObject *object,
         for (l = etfilelist; l != NULL; l = g_list_next (l))
         {
             etfile = (ET_File *)l->data;
-            FileTag = ET_File_Tag_Item_New();
+            FileTag = et_file_tag_new ();
             ET_Copy_File_Tag_Item(etfile,FileTag);
             et_file_tag_set_orig_artist (FileTag, string_to_set);
             ET_Manage_Changes_Of_File_Data(etfile,NULL,FileTag);
@@ -556,7 +556,7 @@ on_apply_to_selection (GObject *object,
         for (l = etfilelist; l != NULL; l = g_list_next (l))
         {
             etfile = (ET_File *)l->data;
-            FileTag = ET_File_Tag_Item_New();
+            FileTag = et_file_tag_new ();
             ET_Copy_File_Tag_Item(etfile,FileTag);
             et_file_tag_set_copyright (FileTag, string_to_set);
             ET_Manage_Changes_Of_File_Data(etfile,NULL,FileTag);
@@ -578,7 +578,7 @@ on_apply_to_selection (GObject *object,
         for (l = etfilelist; l != NULL; l = g_list_next (l))
         {
             etfile = (ET_File *)l->data;
-            FileTag = ET_File_Tag_Item_New();
+            FileTag = et_file_tag_new ();
             ET_Copy_File_Tag_Item(etfile,FileTag);
             et_file_tag_set_url (FileTag, string_to_set);
             ET_Manage_Changes_Of_File_Data(etfile,NULL,FileTag);
@@ -600,7 +600,7 @@ on_apply_to_selection (GObject *object,
         for (l = etfilelist; l != NULL; l = g_list_next (l))
         {
             etfile = (ET_File *)l->data;
-            FileTag = ET_File_Tag_Item_New();
+            FileTag = et_file_tag_new ();
             ET_Copy_File_Tag_Item(etfile,FileTag);
             et_file_tag_set_encoded_by (FileTag, string_to_set);
             ET_Manage_Changes_Of_File_Data(etfile,NULL,FileTag);
@@ -640,7 +640,7 @@ on_apply_to_selection (GObject *object,
         for (l = etfilelist; l != NULL; l = g_list_next (l))
         {
             etfile = (ET_File *)l->data;
-            FileTag = ET_File_Tag_Item_New();
+            FileTag = et_file_tag_new ();
             ET_Copy_File_Tag_Item(etfile,FileTag);
             et_file_tag_set_picture (FileTag, res);
             ET_Manage_Changes_Of_File_Data(etfile,NULL,FileTag);
@@ -2702,7 +2702,7 @@ et_tag_area_create_file_tag (EtTagArea *self)
     priv = et_tag_area_get_instance_private (self);
 
     /* Save tag data and generate undo for tag. */
-    FileTag = ET_File_Tag_Item_New ();
+    FileTag = et_file_tag_new ();
 
     /* Title */
     buffer = g_strdup (gtk_entry_get_text (GTK_ENTRY (priv->title_entry)));
diff --git a/src/tags/flac_tag.c b/src/tags/flac_tag.c
index f4a42f3..1e65b38 100644
--- a/src/tags/flac_tag.c
+++ b/src/tags/flac_tag.c
@@ -1225,7 +1225,7 @@ flac_tag_write_file_tag (const ET_File *ETFile,
         // Delete the ID3 tags (create a dummy ETFile for the Id3tag_... function)
         ET_File   *ETFile_tmp    = ET_File_Item_New();
         File_Name *FileName_tmp  = ET_File_Name_Item_New();
-        File_Tag  *FileTag_tmp   = ET_File_Tag_Item_New();
+        File_Tag  *FileTag_tmp = et_file_tag_new ();
         // Same file...
         FileName_tmp->value      = g_strdup(filename);
         FileName_tmp->value_utf8 = g_strdup(filename_utf8); // Not necessary to fill 'value_ck'
diff --git a/src/tags/id3_tag.c b/src/tags/id3_tag.c
index 1489722..b86220c 100644
--- a/src/tags/id3_tag.c
+++ b/src/tags/id3_tag.c
@@ -559,7 +559,7 @@ id3tag_write_file_v23tag (const ET_File *ETFile,
         // Delete the APE tag (create a dummy ETFile for the Ape_Tag_... function)
         ET_File   *ETFile_tmp    = ET_File_Item_New();
         File_Name *FileName_tmp  = ET_File_Name_Item_New();
-        File_Tag  *FileTag_tmp   = ET_File_Tag_Item_New();
+        File_Tag  *FileTag_tmp = et_file_tag_new();
         // Same file...
         FileName_tmp->value      = g_strdup(filename);
         FileName_tmp->value_utf8 = g_strdup(filename_utf8);  // Not necessary to fill 'value_ck'
@@ -654,9 +654,11 @@ id3tag_write_file_v23tag (const ET_File *ETFile,
                     && g_settings_get_boolean (MainSettings,
                                                "id3v2-enable-unicode"))
                 {
-                    File_Tag  *FileTag_tmp = ET_File_Tag_Item_New();
+                    File_Tag  *FileTag_tmp = et_file_tag_new ();
+
                     if (id3tag_read_file_tag (file, FileTag_tmp, NULL) == TRUE
-                    &&  ET_Detect_Changes_Of_File_Tag(FileTag,FileTag_tmp) == TRUE)
+                        && et_file_tag_detect_difference (FileTag,
+                                                          FileTag_tmp) == TRUE)
                     {
                         GtkWidget *msgdialog;
 
@@ -679,7 +681,8 @@ id3tag_write_file_v23tag (const ET_File *ETFile,
                         gtk_widget_destroy(msgdialog);
                         flag_id3lib_bugged = FALSE; // To display the message only one time
                     }
-                    ET_Free_File_Tag_Item(FileTag_tmp);
+
+                    et_file_tag_free (FileTag_tmp);
                 }
 
             }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]