[easytag] Add const to variables and parameters in et_core.c
- From: David King <davidk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [easytag] Add const to variables and parameters in et_core.c
- Date: Tue, 30 Sep 2014 18:58:45 +0000 (UTC)
commit f6348498dd88eb7718ea8500efcfbf86b09873ee
Author: David King <amigadave amigadave com>
Date: Mon Sep 29 23:15:37 2014 +0100
Add const to variables and parameters in et_core.c
src/application_window.c | 6 +-
src/application_window.h | 6 +-
src/et_core.c | 320 +++++++++++++++++++++++++++--------------
src/et_core.h | 108 +++++++-------
src/file_area.c | 2 +-
src/file_area.h | 2 +-
src/tag_area.c | 4 +-
src/tag_area.h | 4 +-
src/tags/ape_tag.c | 3 +-
src/tags/ape_tag.h | 2 +-
src/tags/flac_header.c | 2 +-
src/tags/flac_header.h | 2 +-
src/tags/flac_tag.c | 36 +++---
src/tags/flac_tag.h | 3 +-
src/tags/id3_tag.c | 5 +-
src/tags/id3_tag.h | 4 +-
src/tags/id3v24_tag.c | 3 +-
src/tags/monkeyaudio_header.c | 2 +-
src/tags/monkeyaudio_header.h | 2 +-
src/tags/mp4_header.cc | 2 +-
src/tags/mp4_header.h | 2 +-
src/tags/mp4_tag.cc | 2 +-
src/tags/mp4_tag.h | 2 +-
src/tags/mpeg_header.c | 2 +-
src/tags/mpeg_header.h | 2 +-
src/tags/musepack_header.c | 2 +-
src/tags/musepack_header.h | 2 +-
src/tags/ogg_header.c | 3 +-
src/tags/ogg_header.h | 2 +-
src/tags/ogg_tag.c | 3 +-
src/tags/ogg_tag.h | 48 +++----
src/tags/opus_header.c | 2 +-
src/tags/opus_header.h | 2 +-
src/tags/wavpack_header.c | 2 +-
src/tags/wavpack_header.h | 2 +-
src/tags/wavpack_tag.c | 2 +-
src/tags/wavpack_tag.h | 2 +-
37 files changed, 349 insertions(+), 251 deletions(-)
---
diff --git a/src/application_window.c b/src/application_window.c
index 6347366..700bff4 100644
--- a/src/application_window.c
+++ b/src/application_window.c
@@ -236,7 +236,7 @@ et_application_window_tag_area_create_file_tag (EtApplicationWindow *self)
gboolean
et_application_window_tag_area_display_et_file (EtApplicationWindow *self,
- ET_File *ETFile)
+ const ET_File *ETFile)
{
EtApplicationWindowPrivate *priv;
@@ -2054,7 +2054,7 @@ et_application_window_file_area_get_filename (EtApplicationWindow *self)
void
et_application_window_file_area_set_file_fields (EtApplicationWindow *self,
- ET_File *ETFile)
+ const ET_File *ETFile)
{
EtApplicationWindowPrivate *priv;
@@ -2369,7 +2369,7 @@ et_application_window_update_actions (EtApplicationWindow *self)
*/
void
et_application_window_tag_area_display_controls (EtApplicationWindow *self,
- ET_File *ETFile)
+ const ET_File *ETFile)
{
EtApplicationWindowPrivate *priv;
diff --git a/src/application_window.h b/src/application_window.h
index 64ddcde..41005b3 100644
--- a/src/application_window.h
+++ b/src/application_window.h
@@ -48,17 +48,17 @@ struct _EtApplicationWindowClass
GType et_application_window_get_type (void);
EtApplicationWindow *et_application_window_new (GtkApplication *application);
File_Tag * et_application_window_tag_area_create_file_tag (EtApplicationWindow *self);
-gboolean et_application_window_tag_area_display_et_file (EtApplicationWindow *self, ET_File *ETFile);
+gboolean et_application_window_tag_area_display_et_file (EtApplicationWindow *self, const ET_File *ETFile);
void et_application_window_tag_area_clear (EtApplicationWindow *self);
void et_application_window_tag_area_set_sensitive (EtApplicationWindow *self, gboolean sensitive);
const gchar * et_application_window_file_area_get_filename (EtApplicationWindow *self);
-void et_application_window_file_area_set_file_fields (EtApplicationWindow *self, ET_File *ETFile);
+void et_application_window_file_area_set_file_fields (EtApplicationWindow *self, const ET_File *ETFile);
void et_application_window_file_area_set_header_fields (EtApplicationWindow *self, EtFileHeaderFields
*fields);
void et_application_window_file_area_clear (EtApplicationWindow *self);
void et_application_window_file_area_set_sensitive (EtApplicationWindow *self, gboolean sensitive);
void et_application_window_disable_command_actions (EtApplicationWindow *self);
void et_application_window_update_actions (EtApplicationWindow *self);
-void et_application_window_tag_area_display_controls (EtApplicationWindow *self, ET_File *ETFile);
+void et_application_window_tag_area_display_controls (EtApplicationWindow *self, const ET_File *ETFile);
GtkWidget * et_application_window_get_log_area (EtApplicationWindow *self);
void et_application_window_show_preferences_dialog_scanner (EtApplicationWindow *self);
void et_application_window_browser_toggle_display_mode (EtApplicationWindow *self);
diff --git a/src/et_core.c b/src/et_core.c
index 88fa248..6c054d6 100644
--- a/src/et_core.c
+++ b/src/et_core.c
@@ -1,5 +1,5 @@
/* EasyTAG - Tag editor for audio files
- * Copyright (C) 2000-2003 David King <amigadave amigadave com>
+ * Copyright (C) 2014 David King <amigadave amigadave com>
* Copyright (C) 2000-2003 Jerome Couderc <easytag gmail com>
*
* This program is free software; you can redistribute it and/or modify
@@ -29,7 +29,7 @@
#include <utime.h>
#include <ctype.h>
#include <locale.h>
-#include "errno.h"
+#include <errno.h>
#include "application_window.h"
#include "easytag.h"
@@ -129,7 +129,6 @@ GdkRGBA RED = {1.0, 0.0, 0.0, 1.0 };
**************/
//gboolean ET_File_Is_Supported (gchar *filename);
-static gchar *ET_Get_File_Extension (const gchar *filename);
static const ET_File_Description *ET_Get_File_Description (const gchar *filename);
static const ET_File_Description *ET_Get_File_Description_From_Extension (const gchar *extension);
@@ -148,8 +147,6 @@ static void ET_Initialize_File_Tag_Item (File_Tag *FileTag);
static void ET_Initialize_File_Name_Item (File_Name *FileName);
static void ET_Initialize_File_Info_Item (ET_File_Info *ETFileInfo);
-//gboolean ET_Copy_File_Tag_Item (ET_File *ETFile, File_Tag *FileTag);
-static gboolean ET_Copy_File_Tag_Item_Other_Field (ET_File *ETFile, File_Tag *FileTag);
//gboolean ET_Set_Field_File_Tag_Picture (gchar **FileTagField, Picture *pic);
static guint ET_File_Key_New (void);
@@ -157,18 +154,18 @@ static guint ET_Undo_Key_New (void);
static gboolean ET_Remove_File_From_Artist_Album_List (ET_File *ETFile);
-static void ET_Display_Filename_To_UI (ET_File *ETFile);
-static EtFileHeaderFields * ET_Display_File_Info_To_UI (ET_File *ETFile);
+static void ET_Display_Filename_To_UI (const ET_File *ETFile);
+static EtFileHeaderFields * ET_Display_File_Info_To_UI (const ET_File *ETFile);
-static gboolean ET_Save_File_Name_From_UI (ET_File *ETFile,
+static gboolean ET_Save_File_Name_From_UI (const ET_File *ETFile,
File_Name *FileName);
-static gboolean ET_Save_File_Name_Internal (ET_File *ETFile, File_Name *FileName);
+static gboolean ET_Save_File_Name_Internal (const ET_File *ETFile, File_Name *FileName);
static gboolean ET_Save_File_Tag_Internal (ET_File *ETFile, File_Tag *FileTag);
static void ET_Mark_File_Tag_As_Saved (ET_File *ETFile);
-static gboolean ET_Detect_Changes_Of_File_Name (File_Name *FileName1,
- File_Name *FileName2);
+static gboolean ET_Detect_Changes_Of_File_Name (const File_Name *FileName1,
+ const File_Name *FileName2);
static gboolean ET_Add_File_Name_To_List (ET_File *ETFile,
File_Name *FileName);
static gboolean ET_Add_File_Tag_To_List (ET_File *ETFile, File_Tag *FileTag);
@@ -182,13 +179,13 @@ static gboolean et_core_read_file_info (const gchar *filename,
ET_File_Info *ETFileInfo,
GError **error);
-static gint ET_Comp_Func_Sort_Artist_Item_By_Ascending_Artist (GList *AlbumList1,
- GList *AlbumList2);
-static gint ET_Comp_Func_Sort_Album_Item_By_Ascending_Album (GList *etfilelist1,
- GList *etfilelist2);
-static gint ET_Comp_Func_Sort_Etfile_Item_By_Ascending_Filename (ET_File *ETFile1,
- ET_File *ETFile2);
-static gchar *ET_File_Name_Format_Extension (ET_File *ETFile);
+static gint ET_Comp_Func_Sort_Artist_Item_By_Ascending_Artist (const GList *AlbumList1,
+ const GList *AlbumList2);
+static gint ET_Comp_Func_Sort_Album_Item_By_Ascending_Album (const GList *etfilelist1,
+ const GList *etfilelist2);
+static gint ET_Comp_Func_Sort_Etfile_Item_By_Ascending_Filename (const ET_File *ETFile1,
+ const ET_File *ETFile2);
+static gchar *ET_File_Name_Format_Extension (const ET_File *ETFile);
static void set_sort_order_for_column_id (gint column_id,
GtkTreeViewColumn *column,
@@ -202,7 +199,7 @@ static void set_sort_order_for_column_id (gint column_id,
/*
* Returns the extension of the file
*/
-static gchar *
+static const gchar *
ET_Get_File_Extension (const gchar *filename)
{
if (filename)
@@ -782,8 +779,8 @@ ET_Add_File_To_Artist_Album_File_List (ET_File *ETFile)
{
const gchar *ETFile_Artist;
const gchar *ETFile_Album;
- gchar *etfile_artist = NULL;
- gchar *etfile_album = NULL;
+ const gchar *etfile_artist;
+ const gchar *etfile_album;
GList *ArtistList;
GList *AlbumList = NULL;
GList *etfilelist = NULL;
@@ -1226,10 +1223,12 @@ ET_Sort_Displayed_File_List_And_Update_UI (EtSortMode Sorting_Type)
/*
* Comparison function for sorting by ascending filename.
*/
-gint ET_Comp_Func_Sort_File_By_Ascending_Filename (ET_File *ETFile1, ET_File *ETFile2)
+gint
+ET_Comp_Func_Sort_File_By_Ascending_Filename (const ET_File *ETFile1,
+ const ET_File *ETFile2)
{
- gchar *file1_ck = ((File_Name *)((GList *)ETFile1->FileNameCur)->data)->value_ck;
- gchar *file2_ck = ((File_Name *)((GList *)ETFile2->FileNameCur)->data)->value_ck;
+ const gchar *file1_ck = ((File_Name *)((GList *)ETFile1->FileNameCur)->data)->value_ck;
+ const gchar *file2_ck = ((File_Name *)((GList *)ETFile2->FileNameCur)->data)->value_ck;
// !!!! : Must be the same rules as "Cddb_Track_List_Sort_Func" to be
// able to sort in the same order files in cddb and in the file list.
return g_settings_get_boolean (MainSettings,
@@ -1240,7 +1239,9 @@ gint ET_Comp_Func_Sort_File_By_Ascending_Filename (ET_File *ETFile1, ET_File *ET
/*
* Comparison function for sorting by descending filename.
*/
-gint ET_Comp_Func_Sort_File_By_Descending_Filename (ET_File *ETFile1, ET_File *ETFile2)
+gint
+ET_Comp_Func_Sort_File_By_Descending_Filename (const ET_File *ETFile1,
+ const ET_File *ETFile2)
{
return ET_Comp_Func_Sort_File_By_Ascending_Filename(ETFile2,ETFile1);
}
@@ -1250,8 +1251,8 @@ gint ET_Comp_Func_Sort_File_By_Descending_Filename (ET_File *ETFile1, ET_File *E
* Comparison function for sorting by ascending disc number.
*/
gint
-et_comp_func_sort_file_by_ascending_disc_number (ET_File *ETFile1,
- ET_File *ETFile2)
+et_comp_func_sort_file_by_ascending_disc_number (const ET_File *ETFile1,
+ const ET_File *ETFile2)
{
gint track1, track2;
@@ -1289,8 +1290,8 @@ et_comp_func_sort_file_by_ascending_disc_number (ET_File *ETFile1,
* Comparison function for sorting by descending disc number.
*/
gint
-et_comp_func_sort_file_by_descending_disc_number (ET_File *ETFile1,
- ET_File *ETFile2)
+et_comp_func_sort_file_by_descending_disc_number (const ET_File *ETFile1,
+ const ET_File *ETFile2)
{
return et_comp_func_sort_file_by_ascending_disc_number (ETFile2, ETFile1);
}
@@ -1299,7 +1300,9 @@ et_comp_func_sort_file_by_descending_disc_number (ET_File *ETFile1,
/*
* Comparison function for sorting by ascending track number.
*/
-gint ET_Comp_Func_Sort_File_By_Ascending_Track_Number (ET_File *ETFile1, ET_File *ETFile2)
+gint
+ET_Comp_Func_Sort_File_By_Ascending_Track_Number (const ET_File *ETFile1,
+ const ET_File *ETFile2)
{
gint track1, track2;
@@ -1324,7 +1327,9 @@ gint ET_Comp_Func_Sort_File_By_Ascending_Track_Number (ET_File *ETFile1, ET_File
/*
* Comparison function for sorting by descending track number.
*/
-gint ET_Comp_Func_Sort_File_By_Descending_Track_Number (ET_File *ETFile1, ET_File *ETFile2)
+gint
+ET_Comp_Func_Sort_File_By_Descending_Track_Number (const ET_File *ETFile1,
+ const ET_File *ETFile2)
{
return ET_Comp_Func_Sort_File_By_Ascending_Track_Number(ETFile2,ETFile1);
}
@@ -1333,7 +1338,9 @@ gint ET_Comp_Func_Sort_File_By_Descending_Track_Number (ET_File *ETFile1, ET_Fil
/*
* Comparison function for sorting by ascending creation date.
*/
-gint ET_Comp_Func_Sort_File_By_Ascending_Creation_Date (ET_File *ETFile1, ET_File *ETFile2)
+gint
+ET_Comp_Func_Sort_File_By_Ascending_Creation_Date (const ET_File *ETFile1,
+ const ET_File *ETFile2)
{
GFile *file;
GFileInfo *info;
@@ -1380,7 +1387,9 @@ gint ET_Comp_Func_Sort_File_By_Ascending_Creation_Date (ET_File *ETFile1, ET_Fil
/*
* Comparison function for sorting by descending creation date.
*/
-gint ET_Comp_Func_Sort_File_By_Descending_Creation_Date (ET_File *ETFile1, ET_File *ETFile2)
+gint
+ET_Comp_Func_Sort_File_By_Descending_Creation_Date (const ET_File *ETFile1,
+ const ET_File *ETFile2)
{
return ET_Comp_Func_Sort_File_By_Ascending_Creation_Date(ETFile2,ETFile1);
}
@@ -1389,7 +1398,9 @@ gint ET_Comp_Func_Sort_File_By_Descending_Creation_Date (ET_File *ETFile1, ET_Fi
/*
* Comparison function for sorting by ascending title.
*/
-gint ET_Comp_Func_Sort_File_By_Ascending_Title (ET_File *ETFile1, ET_File *ETFile2)
+gint
+ET_Comp_Func_Sort_File_By_Ascending_Title (const ET_File *ETFile1,
+ const ET_File *ETFile2)
{
// Compare pointers just in case they are the same (e.g. both are NULL)
if ((ETFile1->FileTag->data == ETFile2->FileTag->data)
@@ -1423,7 +1434,9 @@ gint ET_Comp_Func_Sort_File_By_Ascending_Title (ET_File *ETFile1, ET_File *ETFil
/*
* Comparison function for sorting by descending title.
*/
-gint ET_Comp_Func_Sort_File_By_Descending_Title (ET_File *ETFile1, ET_File *ETFile2)
+gint
+ET_Comp_Func_Sort_File_By_Descending_Title (const ET_File *ETFile1,
+ const ET_File *ETFile2)
{
return ET_Comp_Func_Sort_File_By_Ascending_Title(ETFile2,ETFile1);
}
@@ -1432,7 +1445,9 @@ gint ET_Comp_Func_Sort_File_By_Descending_Title (ET_File *ETFile1, ET_File *ETFi
/*
* Comparison function for sorting by ascending artist.
*/
-gint ET_Comp_Func_Sort_File_By_Ascending_Artist (ET_File *ETFile1, ET_File *ETFile2)
+gint
+ET_Comp_Func_Sort_File_By_Ascending_Artist (const ET_File *ETFile1,
+ const ET_File *ETFile2)
{
// Compare pointers just in case they are the same (e.g. both are NULL)
if ((ETFile1->FileTag->data == ETFile2->FileTag->data)
@@ -1466,7 +1481,9 @@ gint ET_Comp_Func_Sort_File_By_Ascending_Artist (ET_File *ETFile1, ET_File *ETFi
/*
* Comparison function for sorting by descending artist.
*/
-gint ET_Comp_Func_Sort_File_By_Descending_Artist (ET_File *ETFile1, ET_File *ETFile2)
+gint
+ET_Comp_Func_Sort_File_By_Descending_Artist (const ET_File *ETFile1,
+ const ET_File *ETFile2)
{
return ET_Comp_Func_Sort_File_By_Ascending_Artist(ETFile2,ETFile1);
}
@@ -1474,7 +1491,9 @@ gint ET_Comp_Func_Sort_File_By_Descending_Artist (ET_File *ETFile1, ET_File *ETF
/*
* Comparison function for sorting by ascending album artist.
*/
-gint ET_Comp_Func_Sort_File_By_Ascending_Album_Artist (ET_File *ETFile1, ET_File *ETFile2)
+gint
+ET_Comp_Func_Sort_File_By_Ascending_Album_Artist (const ET_File *ETFile1,
+ const ET_File *ETFile2)
{
// Compare pointers just in case they are the same (e.g. both are NULL)
if ((ETFile1->FileTag->data == ETFile2->FileTag->data)
@@ -1508,7 +1527,9 @@ gint ET_Comp_Func_Sort_File_By_Ascending_Album_Artist (ET_File *ETFile1, ET_File
/*
* Comparison function for sorting by descending album artist.
*/
-gint ET_Comp_Func_Sort_File_By_Descending_Album_Artist (ET_File *ETFile1, ET_File *ETFile2)
+gint
+ET_Comp_Func_Sort_File_By_Descending_Album_Artist (const ET_File *ETFile1,
+ const ET_File *ETFile2)
{
return ET_Comp_Func_Sort_File_By_Ascending_Album_Artist(ETFile2,ETFile1);
}
@@ -1516,7 +1537,9 @@ gint ET_Comp_Func_Sort_File_By_Descending_Album_Artist (ET_File *ETFile1, ET_Fil
/*
* Comparison function for sorting by ascending album.
*/
-gint ET_Comp_Func_Sort_File_By_Ascending_Album (ET_File *ETFile1, ET_File *ETFile2)
+gint
+ET_Comp_Func_Sort_File_By_Ascending_Album (const ET_File *ETFile1,
+ const ET_File *ETFile2)
{
// Compare pointers just in case they are the same (e.g. both are NULL)
if ((ETFile1->FileTag->data == ETFile2->FileTag->data)
@@ -1550,7 +1573,9 @@ gint ET_Comp_Func_Sort_File_By_Ascending_Album (ET_File *ETFile1, ET_File *ETFil
/*
* Comparison function for sorting by descending album.
*/
-gint ET_Comp_Func_Sort_File_By_Descending_Album (ET_File *ETFile1, ET_File *ETFile2)
+gint
+ET_Comp_Func_Sort_File_By_Descending_Album (const ET_File *ETFile1,
+ const ET_File *ETFile2)
{
return ET_Comp_Func_Sort_File_By_Ascending_Album(ETFile2,ETFile1);
}
@@ -1559,7 +1584,9 @@ gint ET_Comp_Func_Sort_File_By_Descending_Album (ET_File *ETFile1, ET_File *ETFi
/*
* Comparison function for sorting by ascending year.
*/
-gint ET_Comp_Func_Sort_File_By_Ascending_Year (ET_File *ETFile1, ET_File *ETFile2)
+gint
+ET_Comp_Func_Sort_File_By_Ascending_Year (const ET_File *ETFile1,
+ const ET_File *ETFile2)
{
gint year1, year2;
@@ -1584,7 +1611,9 @@ gint ET_Comp_Func_Sort_File_By_Ascending_Year (ET_File *ETFile1, ET_File *ETFile
/*
* Comparison function for sorting by descending year.
*/
-gint ET_Comp_Func_Sort_File_By_Descending_Year (ET_File *ETFile1, ET_File *ETFile2)
+gint
+ET_Comp_Func_Sort_File_By_Descending_Year (const ET_File *ETFile1,
+ const ET_File *ETFile2)
{
return ET_Comp_Func_Sort_File_By_Ascending_Year(ETFile2,ETFile1);
}
@@ -1593,7 +1622,9 @@ gint ET_Comp_Func_Sort_File_By_Descending_Year (ET_File *ETFile1, ET_File *ETFil
/*
* Comparison function for sorting by ascending genre.
*/
-gint ET_Comp_Func_Sort_File_By_Ascending_Genre (ET_File *ETFile1, ET_File *ETFile2)
+gint
+ET_Comp_Func_Sort_File_By_Ascending_Genre (const ET_File *ETFile1,
+ const ET_File *ETFile2)
{
// Compare pointers just in case they are the same (e.g. both are NULL)
if ((ETFile1->FileTag->data == ETFile2->FileTag->data)
@@ -1625,7 +1656,9 @@ gint ET_Comp_Func_Sort_File_By_Ascending_Genre (ET_File *ETFile1, ET_File *ETFil
/*
* Comparison function for sorting by descending genre.
*/
-gint ET_Comp_Func_Sort_File_By_Descending_Genre (ET_File *ETFile1, ET_File *ETFile2)
+gint
+ET_Comp_Func_Sort_File_By_Descending_Genre (const ET_File *ETFile1,
+ const ET_File *ETFile2)
{
return ET_Comp_Func_Sort_File_By_Ascending_Genre(ETFile2,ETFile1);
}
@@ -1634,7 +1667,9 @@ gint ET_Comp_Func_Sort_File_By_Descending_Genre (ET_File *ETFile1, ET_File *ETFi
/*
* Comparison function for sorting by ascending comment.
*/
-gint ET_Comp_Func_Sort_File_By_Ascending_Comment (ET_File *ETFile1, ET_File *ETFile2)
+gint
+ET_Comp_Func_Sort_File_By_Ascending_Comment (const ET_File *ETFile1,
+ const ET_File *ETFile2)
{
// Compare pointers just in case they are the same (e.g. both are NULL)
if ((ETFile1->FileTag->data == ETFile2->FileTag->data)
@@ -1668,7 +1703,9 @@ gint ET_Comp_Func_Sort_File_By_Ascending_Comment (ET_File *ETFile1, ET_File *ETF
/*
* Comparison function for sorting by descending comment.
*/
-gint ET_Comp_Func_Sort_File_By_Descending_Comment (ET_File *ETFile1, ET_File *ETFile2)
+gint
+ET_Comp_Func_Sort_File_By_Descending_Comment (const ET_File *ETFile1,
+ const ET_File *ETFile2)
{
return ET_Comp_Func_Sort_File_By_Ascending_Comment(ETFile2,ETFile1);
}
@@ -1677,7 +1714,9 @@ gint ET_Comp_Func_Sort_File_By_Descending_Comment (ET_File *ETFile1, ET_File *ET
/*
* Comparison function for sorting by ascending composer.
*/
-gint ET_Comp_Func_Sort_File_By_Ascending_Composer (ET_File *ETFile1, ET_File *ETFile2)
+gint
+ET_Comp_Func_Sort_File_By_Ascending_Composer (const ET_File *ETFile1,
+ const ET_File *ETFile2)
{
// Compare pointers just in case they are the same (e.g. both are NULL)
if ((ETFile1->FileTag->data == ETFile2->FileTag->data)
@@ -1711,7 +1750,9 @@ gint ET_Comp_Func_Sort_File_By_Ascending_Composer (ET_File *ETFile1, ET_File *ET
/*
* Comparison function for sorting by descending composer.
*/
-gint ET_Comp_Func_Sort_File_By_Descending_Composer (ET_File *ETFile1, ET_File *ETFile2)
+gint
+ET_Comp_Func_Sort_File_By_Descending_Composer (const ET_File *ETFile1,
+ const ET_File *ETFile2)
{
return ET_Comp_Func_Sort_File_By_Ascending_Composer(ETFile2,ETFile1);
}
@@ -1720,7 +1761,9 @@ gint ET_Comp_Func_Sort_File_By_Descending_Composer (ET_File *ETFile1, ET_File *E
/*
* Comparison function for sorting by ascending original artist.
*/
-gint ET_Comp_Func_Sort_File_By_Ascending_Orig_Artist (ET_File *ETFile1, ET_File *ETFile2)
+gint
+ET_Comp_Func_Sort_File_By_Ascending_Orig_Artist (const ET_File *ETFile1,
+ const ET_File *ETFile2)
{
// Compare pointers just in case they are the same (e.g. both are NULL)
if ((ETFile1->FileTag->data == ETFile2->FileTag->data)
@@ -1754,7 +1797,9 @@ gint ET_Comp_Func_Sort_File_By_Ascending_Orig_Artist (ET_File *ETFile1, ET_File
/*
* Comparison function for sorting by descending original artist.
*/
-gint ET_Comp_Func_Sort_File_By_Descending_Orig_Artist (ET_File *ETFile1, ET_File *ETFile2)
+gint
+ET_Comp_Func_Sort_File_By_Descending_Orig_Artist (const ET_File *ETFile1,
+ const ET_File *ETFile2)
{
return ET_Comp_Func_Sort_File_By_Ascending_Orig_Artist(ETFile2,ETFile1);
}
@@ -1763,7 +1808,9 @@ gint ET_Comp_Func_Sort_File_By_Descending_Orig_Artist (ET_File *ETFile1, ET_File
/*
* Comparison function for sorting by ascending copyright.
*/
-gint ET_Comp_Func_Sort_File_By_Ascending_Copyright (ET_File *ETFile1, ET_File *ETFile2)
+gint
+ET_Comp_Func_Sort_File_By_Ascending_Copyright (const ET_File *ETFile1,
+ const ET_File *ETFile2)
{
// Compare pointers just in case they are the same (e.g. both are NULL)
if ((ETFile1->FileTag->data == ETFile2->FileTag->data)
@@ -1797,7 +1844,9 @@ gint ET_Comp_Func_Sort_File_By_Ascending_Copyright (ET_File *ETFile1, ET_File *E
/*
* Comparison function for sorting by descending copyright.
*/
-gint ET_Comp_Func_Sort_File_By_Descending_Copyright (ET_File *ETFile1, ET_File *ETFile2)
+gint
+ET_Comp_Func_Sort_File_By_Descending_Copyright (const ET_File *ETFile1,
+ const ET_File *ETFile2)
{
return ET_Comp_Func_Sort_File_By_Ascending_Copyright(ETFile2,ETFile1);
}
@@ -1806,7 +1855,9 @@ gint ET_Comp_Func_Sort_File_By_Descending_Copyright (ET_File *ETFile1, ET_File *
/*
* Comparison function for sorting by ascending URL.
*/
-gint ET_Comp_Func_Sort_File_By_Ascending_Url (ET_File *ETFile1, ET_File *ETFile2)
+gint
+ET_Comp_Func_Sort_File_By_Ascending_Url (const ET_File *ETFile1,
+ const ET_File *ETFile2)
{
// Compare pointers just in case they are the same (e.g. both are NULL)
if ((ETFile1->FileTag->data == ETFile2->FileTag->data)
@@ -1840,7 +1891,9 @@ gint ET_Comp_Func_Sort_File_By_Ascending_Url (ET_File *ETFile1, ET_File *ETFile2
/*
* Comparison function for sorting by descending URL.
*/
-gint ET_Comp_Func_Sort_File_By_Descending_Url (ET_File *ETFile1, ET_File *ETFile2)
+gint
+ET_Comp_Func_Sort_File_By_Descending_Url (const ET_File *ETFile1,
+ const ET_File *ETFile2)
{
return ET_Comp_Func_Sort_File_By_Ascending_Url(ETFile2,ETFile1);
}
@@ -1849,7 +1902,9 @@ gint ET_Comp_Func_Sort_File_By_Descending_Url (ET_File *ETFile1, ET_File *ETFile
/*
* Comparison function for sorting by ascending encoded by.
*/
-gint ET_Comp_Func_Sort_File_By_Ascending_Encoded_By (ET_File *ETFile1, ET_File *ETFile2)
+gint
+ET_Comp_Func_Sort_File_By_Ascending_Encoded_By (const ET_File *ETFile1,
+ const ET_File *ETFile2)
{
// Compare pointers just in case they are the same (e.g. both are NULL)
if ((ETFile1->FileTag->data == ETFile2->FileTag->data)
@@ -1883,7 +1938,9 @@ gint ET_Comp_Func_Sort_File_By_Ascending_Encoded_By (ET_File *ETFile1, ET_File *
/*
* Comparison function for sorting by descendingencoded by.
*/
-gint ET_Comp_Func_Sort_File_By_Descending_Encoded_By (ET_File *ETFile1, ET_File *ETFile2)
+gint
+ET_Comp_Func_Sort_File_By_Descending_Encoded_By (const ET_File *ETFile1,
+ const ET_File *ETFile2)
{
return ET_Comp_Func_Sort_File_By_Ascending_Encoded_By(ETFile2,ETFile1);
}
@@ -1892,7 +1949,9 @@ gint ET_Comp_Func_Sort_File_By_Descending_Encoded_By (ET_File *ETFile1, ET_File
/*
* Comparison function for sorting by ascending file type (mp3, ogg, ...).
*/
-gint ET_Comp_Func_Sort_File_By_Ascending_File_Type (ET_File *ETFile1, ET_File *ETFile2)
+gint
+ET_Comp_Func_Sort_File_By_Ascending_File_Type (const ET_File *ETFile1,
+ const ET_File *ETFile2)
{
if ( !ETFile1->ETFileDescription ) return -1;
if ( !ETFile2->ETFileDescription ) return 1;
@@ -1908,7 +1967,9 @@ gint ET_Comp_Func_Sort_File_By_Ascending_File_Type (ET_File *ETFile1, ET_File *E
/*
* Comparison function for sorting by descending file type (mp3, ogg, ...).
*/
-gint ET_Comp_Func_Sort_File_By_Descending_File_Type (ET_File *ETFile1, ET_File *ETFile2)
+gint
+ET_Comp_Func_Sort_File_By_Descending_File_Type (const ET_File *ETFile1,
+ const ET_File *ETFile2)
{
return ET_Comp_Func_Sort_File_By_Ascending_File_Type(ETFile2,ETFile1);
}
@@ -1917,7 +1978,9 @@ gint ET_Comp_Func_Sort_File_By_Descending_File_Type (ET_File *ETFile1, ET_File *
/*
* Comparison function for sorting by ascending file size.
*/
-gint ET_Comp_Func_Sort_File_By_Ascending_File_Size (ET_File *ETFile1, ET_File *ETFile2)
+gint
+ET_Comp_Func_Sort_File_By_Ascending_File_Size (const ET_File *ETFile1,
+ const ET_File *ETFile2)
{
if ( !ETFile1->ETFileInfo ) return -1;
if ( !ETFile2->ETFileInfo ) return 1;
@@ -1933,7 +1996,9 @@ gint ET_Comp_Func_Sort_File_By_Ascending_File_Size (ET_File *ETFile1, ET_File *E
/*
* Comparison function for sorting by descending file size.
*/
-gint ET_Comp_Func_Sort_File_By_Descending_File_Size (ET_File *ETFile1, ET_File *ETFile2)
+gint
+ET_Comp_Func_Sort_File_By_Descending_File_Size (const ET_File *ETFile1,
+ const ET_File *ETFile2)
{
return ET_Comp_Func_Sort_File_By_Ascending_File_Size(ETFile2,ETFile1);
}
@@ -1942,7 +2007,9 @@ gint ET_Comp_Func_Sort_File_By_Descending_File_Size (ET_File *ETFile1, ET_File *
/*
* Comparison function for sorting by ascending file duration.
*/
-gint ET_Comp_Func_Sort_File_By_Ascending_File_Duration (ET_File *ETFile1, ET_File *ETFile2)
+gint
+ET_Comp_Func_Sort_File_By_Ascending_File_Duration (const ET_File *ETFile1,
+ const ET_File *ETFile2)
{
if ( !ETFile1->ETFileInfo ) return -1;
if ( !ETFile2->ETFileInfo ) return 1;
@@ -1958,7 +2025,9 @@ gint ET_Comp_Func_Sort_File_By_Ascending_File_Duration (ET_File *ETFile1, ET_Fil
/*
* Comparison function for sorting by descending file duration.
*/
-gint ET_Comp_Func_Sort_File_By_Descending_File_Duration (ET_File *ETFile1, ET_File *ETFile2)
+gint
+ET_Comp_Func_Sort_File_By_Descending_File_Duration (const ET_File *ETFile1,
+ const ET_File *ETFile2)
{
return ET_Comp_Func_Sort_File_By_Ascending_File_Duration(ETFile2,ETFile1);
}
@@ -1967,7 +2036,9 @@ gint ET_Comp_Func_Sort_File_By_Descending_File_Duration (ET_File *ETFile1, ET_Fi
/*
* Comparison function for sorting by ascending file bitrate.
*/
-gint ET_Comp_Func_Sort_File_By_Ascending_File_Bitrate (ET_File *ETFile1, ET_File *ETFile2)
+gint
+ET_Comp_Func_Sort_File_By_Ascending_File_Bitrate (const ET_File *ETFile1,
+ const ET_File *ETFile2)
{
if ( !ETFile1->ETFileInfo ) return -1;
if ( !ETFile2->ETFileInfo ) return 1;
@@ -1983,7 +2054,9 @@ gint ET_Comp_Func_Sort_File_By_Ascending_File_Bitrate (ET_File *ETFile1, ET_File
/*
* Comparison function for sorting by descending file bitrate.
*/
-gint ET_Comp_Func_Sort_File_By_Descending_File_Bitrate (ET_File *ETFile1, ET_File *ETFile2)
+gint
+ET_Comp_Func_Sort_File_By_Descending_File_Bitrate (const ET_File *ETFile1,
+ const ET_File *ETFile2)
{
return ET_Comp_Func_Sort_File_By_Ascending_File_Bitrate(ETFile2,ETFile1);
}
@@ -1992,7 +2065,9 @@ gint ET_Comp_Func_Sort_File_By_Descending_File_Bitrate (ET_File *ETFile1, ET_Fil
/*
* Comparison function for sorting by ascending file samplerate.
*/
-gint ET_Comp_Func_Sort_File_By_Ascending_File_Samplerate (ET_File *ETFile1, ET_File *ETFile2)
+gint
+ET_Comp_Func_Sort_File_By_Ascending_File_Samplerate (const ET_File *ETFile1,
+ const ET_File *ETFile2)
{
if ( !ETFile1->ETFileInfo ) return -1;
if ( !ETFile2->ETFileInfo ) return 1;
@@ -2008,7 +2083,9 @@ gint ET_Comp_Func_Sort_File_By_Ascending_File_Samplerate (ET_File *ETFile1, ET_F
/*
* Comparison function for sorting by descending file samplerate.
*/
-gint ET_Comp_Func_Sort_File_By_Descending_File_Samplerate (ET_File *ETFile1, ET_File *ETFile2)
+gint
+ET_Comp_Func_Sort_File_By_Descending_File_Samplerate (const ET_File *ETFile1,
+ const ET_File *ETFile2)
{
return ET_Comp_Func_Sort_File_By_Ascending_File_Samplerate(ETFile2,ETFile1);
}
@@ -2017,12 +2094,16 @@ gint ET_Comp_Func_Sort_File_By_Descending_File_Samplerate (ET_File *ETFile1, ET_
/*
* Comparison function for sorting by ascending artist in the ArtistAlbumList.
*/
-static gint ET_Comp_Func_Sort_Artist_Item_By_Ascending_Artist (GList *AlbumList1,
- GList *AlbumList2)
+static gint
+ET_Comp_Func_Sort_Artist_Item_By_Ascending_Artist (const GList *AlbumList1,
+ const GList *AlbumList2)
{
- GList *etfilelist1 = NULL, *etfilelist2 = NULL;
- ET_File *etfile1 = NULL, *etfile2 = NULL;
- gchar *etfile1_artist, *etfile2_artist;
+ const GList *etfilelist1 = NULL;
+ const GList *etfilelist2 = NULL;
+ const ET_File *etfile1 = NULL;
+ const ET_File *etfile2 = NULL;
+ const gchar *etfile1_artist;
+ const gchar *etfile2_artist;
if (!AlbumList1
|| !(etfilelist1 = (GList *)AlbumList1->data)
@@ -2046,11 +2127,13 @@ static gint ET_Comp_Func_Sort_Artist_Item_By_Ascending_Artist (GList *AlbumList1
* Comparison function for sorting by ascending album in the ArtistAlbumList.
*/
static gint
-ET_Comp_Func_Sort_Album_Item_By_Ascending_Album (GList *etfilelist1,
- GList *etfilelist2)
+ET_Comp_Func_Sort_Album_Item_By_Ascending_Album (const GList *etfilelist1,
+ const GList *etfilelist2)
{
- ET_File *etfile1, *etfile2;
- gchar *etfile1_album, *etfile2_album;
+ const ET_File *etfile1;
+ const ET_File *etfile2;
+ const gchar *etfile1_album;
+ const gchar *etfile2_album;
if (!etfilelist1
|| !(etfile1 = (ET_File *)etfilelist1->data)
@@ -2073,8 +2156,8 @@ ET_Comp_Func_Sort_Album_Item_By_Ascending_Album (GList *etfilelist1,
* FIX ME : should use the default sorting!
*/
static gint
-ET_Comp_Func_Sort_Etfile_Item_By_Ascending_Filename (ET_File *ETFile1,
- ET_File *ETFile2)
+ET_Comp_Func_Sort_Etfile_Item_By_Ascending_Filename (const ET_File *ETFile1,
+ const ET_File *ETFile2)
{
if (!ETFile1) return -1;
@@ -2134,7 +2217,8 @@ GList *ET_Displayed_File_List_Last (void)
/*
* Returns the item of the "displayed list" which correspond to the given 'ETFile' (used into browser list).
*/
-GList *ET_Displayed_File_List_By_Etfile (ET_File *ETFile)
+GList *
+ET_Displayed_File_List_By_Etfile (const ET_File *ETFile)
{
GList *etfilelist;
@@ -2479,9 +2563,10 @@ ET_Free_Artist_Album_File_List (void)
* Duplicate the 'other' list
*/
static gboolean
-ET_Copy_File_Tag_Item_Other_Field (ET_File *ETFile, File_Tag *FileTag)
+ET_Copy_File_Tag_Item_Other_Field (const ET_File *ETFile,
+ File_Tag *FileTag)
{
- File_Tag *FileTagCur;
+ const File_Tag *FileTagCur;
GList *l;
FileTagCur = (File_Tag *)(ETFile->FileTag)->data;
@@ -2500,9 +2585,10 @@ ET_Copy_File_Tag_Item_Other_Field (ET_File *ETFile, File_Tag *FileTag)
* Copy data of the File_Tag structure (of ETFile) to the FileTag item.
* Reallocate data if not null.
*/
-gboolean ET_Copy_File_Tag_Item (ET_File *ETFile, File_Tag *FileTag)
+gboolean
+ET_Copy_File_Tag_Item (const ET_File *ETFile, File_Tag *FileTag)
{
- File_Tag *FileTagCur;
+ const File_Tag *FileTagCur;
g_return_val_if_fail (ETFile != NULL && ETFile->FileTag != NULL &&
(File_Tag *)(ETFile->FileTag)->data != NULL, FALSE);
@@ -2686,7 +2772,10 @@ gboolean ET_Copy_File_Tag_Item (ET_File *ETFile, File_Tag *FileTag)
* Calculate also the collate key.
* It treats numbers intelligently so that "file1" "file10" "file5" is sorted as "file1" "file5" "file10"
*/
-gboolean ET_Set_Filename_File_Name_Item (File_Name *FileName, gchar *filename_utf8, gchar *filename)
+gboolean
+ET_Set_Filename_File_Name_Item (File_Name *FileName,
+ const gchar *filename_utf8,
+ const gchar *filename)
{
g_return_val_if_fail (FileName != NULL, FALSE);
@@ -2743,7 +2832,8 @@ gboolean ET_Set_Field_File_Tag_Item (gchar **FileTagField, const gchar *value)
/*
* Set the value of a field of a FileTag Picture item.
*/
-gboolean ET_Set_Field_File_Tag_Picture (Picture **FileTagField, Picture *pic)
+gboolean
+ET_Set_Field_File_Tag_Picture (Picture **FileTagField, const Picture *pic)
{
g_return_val_if_fail (FileTagField != NULL, FALSE);
@@ -2780,12 +2870,13 @@ et_file_header_fields_free (EtFileHeaderFields *fields)
* Display information of the file (Position + Header + Tag) to the user interface.
* Before doing it, it saves data of the file currently displayed
*/
-void ET_Display_File_Data_To_UI (ET_File *ETFile)
+void
+ET_Display_File_Data_To_UI (ET_File *ETFile)
{
EtApplicationWindow *window;
const ET_File_Description *ETFileDescription;
- gchar *cur_filename;
- gchar *cur_filename_utf8;
+ const gchar *cur_filename;
+ const gchar *cur_filename_utf8;
gchar *msg;
EtFileHeaderFields *fields;
#ifdef ENABLE_OPUS
@@ -2904,9 +2995,9 @@ void ET_Display_File_Data_To_UI (ET_File *ETFile)
}
static void
-ET_Display_Filename_To_UI (ET_File *ETFile)
+ET_Display_Filename_To_UI (const ET_File *ETFile)
{
- gchar *new_filename_utf8;
+ const gchar *new_filename_utf8;
gchar *dirname_utf8;
gchar *text;
@@ -2934,7 +3025,7 @@ ET_Display_Filename_To_UI (ET_File *ETFile)
* "Default" way to display File Info to the user interface.
*/
static EtFileHeaderFields *
-ET_Display_File_Info_To_UI (ET_File *ETFile)
+ET_Display_File_Info_To_UI (const ET_File *ETFile)
{
EtFileHeaderFields *fields;
ET_File_Info *info;
@@ -2993,12 +3084,10 @@ void ET_Save_File_Data_From_UI (ET_File *ETFile)
File_Name *FileName;
File_Tag *FileTag;
guint undo_key;
- gchar *cur_filename_utf8;
+ const gchar *cur_filename_utf8;
- if (!ETFile ||
- !ETFile->FileNameCur ||
- !ETFile->FileNameCur->data)
- return;
+ g_return_if_fail (ETFile != NULL && ETFile->FileNameCur != NULL
+ && ETFile->FileNameCur->data != NULL);
cur_filename_utf8 = ((File_Name *)((GList *)ETFile->FileNameCur)->data)->value_utf8;
ETFileDescription = ETFile->ETFileDescription;
@@ -3065,7 +3154,7 @@ void ET_Save_File_Data_From_UI (ET_File *ETFile)
* encoding, not UTF-8 (it preserves file system encoding of parent directories).
*/
static gboolean
-ET_Save_File_Name_From_UI (ET_File *ETFile, File_Name *FileName)
+ET_Save_File_Name_From_UI (const ET_File *ETFile, File_Name *FileName)
{
gchar *filename_new = NULL;
gchar *dirname = NULL;
@@ -3153,7 +3242,8 @@ ET_Save_File_Name_From_UI (ET_File *ETFile, File_Name *FileName)
* data from the UI.
*/
static gboolean
-ET_Save_File_Name_Internal (ET_File *ETFile, File_Name *FileName)
+ET_Save_File_Name_Internal (const ET_File *ETFile,
+ File_Name *FileName)
{
gchar *filename_new = NULL;
gchar *dirname = NULL;
@@ -3432,8 +3522,8 @@ gboolean
ET_Save_File_Tag_To_HD (ET_File *ETFile, GError **error)
{
const ET_File_Description *ETFileDescription;
- gchar *cur_filename;
- gchar *cur_filename_utf8;
+ const gchar *cur_filename;
+ const gchar *cur_filename_utf8;
gboolean state;
GFile *file;
GFileInfo *fileinfo;
@@ -3441,7 +3531,7 @@ ET_Save_File_Tag_To_HD (ET_File *ETFile, GError **error)
g_return_val_if_fail (ETFile != NULL, FALSE);
g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
- cur_filename = ((File_Name *)(ETFile->FileNameCur)->data)->value;
+ cur_filename = ((File_Name *)(ETFile->FileNameCur)->data)->value;
cur_filename_utf8 = ((File_Name *)(ETFile->FileNameCur)->data)->value_utf8;
ETFileDescription = ETFile->ETFileDescription;
@@ -3554,7 +3644,9 @@ ET_Save_File_Tag_To_HD (ET_File *ETFile, GError **error)
* Function used to update path of filenames into list after renaming a parent directory
* (for ex: "/mp3/old_path/file.mp3" to "/mp3/new_path/file.mp3"
*/
-void ET_Update_Directory_Name_Into_File_List (gchar* last_path, gchar *new_path)
+void
+ET_Update_Directory_Name_Into_File_List (const gchar *last_path,
+ const gchar *new_path)
{
GList *filelist;
ET_File *file;
@@ -3675,7 +3767,8 @@ gboolean ET_Manage_Changes_Of_File_Data (ET_File *ETFile, File_Name *FileName, F
* - else returns FALSE
*/
static gboolean
-ET_Detect_Changes_Of_File_Name (File_Name *FileName1, File_Name *FileName2)
+ET_Detect_Changes_Of_File_Name (const File_Name *FileName1,
+ const File_Name *FileName2)
{
const gchar *filename1_ck;
const gchar *filename2_ck;
@@ -3714,8 +3807,8 @@ gboolean
ET_Detect_Changes_Of_File_Tag (const File_Tag *FileTag1,
const File_Tag *FileTag2)
{
- Picture *pic1;
- Picture *pic2;
+ const Picture *pic1;
+ const Picture *pic2;
g_return_val_if_fail (FileTag1 != NULL && FileTag2 != NULL, FALSE);
@@ -3986,7 +4079,8 @@ gboolean ET_Undo_File_Data (ET_File *ETFile)
/*
* Returns TRUE if file contains undo data (filename or tag)
*/
-gboolean ET_File_Data_Has_Undo_Data (ET_File *ETFile)
+gboolean
+ET_File_Data_Has_Undo_Data (const ET_File *ETFile)
{
gboolean has_filename_undo_data = FALSE;
gboolean has_filetag_undo_data = FALSE;
@@ -4046,7 +4140,8 @@ gboolean ET_Redo_File_Data (ET_File *ETFile)
/*
* Returns TRUE if file contains redo data (filename or tag)
*/
-gboolean ET_File_Data_Has_Redo_Data (ET_File *ETFile)
+gboolean
+ET_File_Data_Has_Redo_Data (const ET_File *ETFile)
{
gboolean has_filename_redo_data = FALSE;
gboolean has_filetag_redo_data = FALSE;
@@ -4067,7 +4162,7 @@ gboolean ET_File_Data_Has_Redo_Data (ET_File *ETFile)
ET_File *ET_Undo_History_File_Data (void)
{
ET_File *ETFile;
- ET_History_File *ETHistoryFile;
+ const ET_History_File *ETHistoryFile;
g_return_val_if_fail (ETCore->ETHistoryFileList != NULL ||
ET_History_File_List_Has_Undo_Data (), NULL);
@@ -4140,7 +4235,8 @@ gboolean ET_History_File_List_Has_Redo_Data (void)
* Returns TRUE if the file has been saved.
* Returns FALSE if some changes haven't been saved.
*/
-gboolean ET_Check_If_File_Is_Saved (ET_File *ETFile)
+gboolean
+ET_Check_If_File_Is_Saved (const ET_File *ETFile)
{
File_Tag *FileTag = NULL;
File_Name *FileNameNew = NULL;
@@ -4288,7 +4384,9 @@ et_core_read_file_info (const gchar *filename, ET_File_Info *ETFileInfo,
* - ogg filename musn't exceed 255-6 characters as we use mkstemp
*/
#if 1
-gchar *ET_File_Name_Generate (ET_File *ETFile, gchar *new_file_name_utf8)
+gchar *
+ET_File_Name_Generate (const ET_File *ETFile,
+ const gchar *new_file_name_utf8)
{
gchar *dirname_utf8;
@@ -4376,7 +4474,7 @@ gchar *ET_File_Name_Generate (ET_File *ETFile, gchar *new_file_name_utf8)
/* Convert filename extension (lower/upper/no change). */
static gchar *
-ET_File_Name_Format_Extension (ET_File *ETFile)
+ET_File_Name_Format_Extension (const ET_File *ETFile)
{
EtFilenameExtensionMode mode;
diff --git a/src/et_core.h b/src/et_core.h
index 5338091..3feaecb 100644
--- a/src/et_core.h
+++ b/src/et_core.h
@@ -288,7 +288,7 @@ gboolean ET_Remove_File_From_File_List (ET_File *ETFile);
gboolean ET_Create_Artist_Album_File_List (void);
gboolean ET_Remove_File_From_File_List (ET_File *ETFile);
-gboolean ET_Check_If_File_Is_Saved (ET_File *ETFile);
+gboolean ET_Check_If_File_Is_Saved (const ET_File *ETFile);
gboolean ET_Check_If_All_Files_Are_Saved (void);
ET_File *ET_File_Item_New (void);
@@ -297,17 +297,17 @@ File_Tag *ET_File_Tag_Item_New (void);
gboolean ET_Free_File_Tag_Item (File_Tag *FileTag);
void ET_Free_File_List_Item (ET_File *ETFile);
-gboolean ET_Copy_File_Tag_Item (ET_File *ETFile, File_Tag *FileTag);
+gboolean ET_Copy_File_Tag_Item (const ET_File *ETFile, File_Tag *FileTag);
gboolean ET_Set_Field_File_Name_Item (gchar **FileNameField, gchar *value);
-gboolean ET_Set_Filename_File_Name_Item (File_Name *FileName, gchar *filename_utf8, gchar *filename);
+gboolean ET_Set_Filename_File_Name_Item (File_Name *FileName, const gchar *filename_utf8, const gchar
*filename);
gboolean ET_Set_Field_File_Tag_Item (gchar **FileTagField, const gchar *value);
-gboolean ET_Set_Field_File_Tag_Picture (Picture **FileTagField, Picture *pic);
+gboolean ET_Set_Field_File_Tag_Picture (Picture **FileTagField, const Picture *pic);
GList *ET_Displayed_File_List_First (void);
GList *ET_Displayed_File_List_Previous (void);
GList *ET_Displayed_File_List_Next (void);
GList *ET_Displayed_File_List_Last (void);
-GList *ET_Displayed_File_List_By_Etfile (ET_File *ETFile);
+GList *ET_Displayed_File_List_By_Etfile (const ET_File *ETFile);
gboolean ET_Set_Displayed_File_List (GList *ETFileList);
@@ -317,8 +317,8 @@ gboolean ET_Save_File_Tag_To_HD (ET_File *ETFile, GError **error);
gboolean ET_Undo_File_Data (ET_File *ETFile);
gboolean ET_Redo_File_Data (ET_File *ETFile);
-gboolean ET_File_Data_Has_Undo_Data (ET_File *ETFile);
-gboolean ET_File_Data_Has_Redo_Data (ET_File *ETFile);
+gboolean ET_File_Data_Has_Undo_Data (const ET_File *ETFile);
+gboolean ET_File_Data_Has_Redo_Data (const ET_File *ETFile);
ET_File *ET_Undo_History_File_Data (void);
ET_File *ET_Redo_History_File_Data (void);
@@ -327,60 +327,60 @@ gboolean ET_History_File_List_Has_Redo_Data (void);
gboolean ET_Manage_Changes_Of_File_Data (ET_File *ETFile, File_Name *FileName, File_Tag *FileTag);
void ET_Mark_File_Name_As_Saved (ET_File *ETFile);
-void ET_Update_Directory_Name_Into_File_List (gchar* last_path, gchar *new_path);
+void ET_Update_Directory_Name_Into_File_List (const gchar *last_path, const gchar *new_path);
gboolean ET_File_Name_Convert_Character (gchar *filename_utf8);
-gchar *ET_File_Name_Generate (ET_File *ETFile, gchar *new_file_name);
+gchar *ET_File_Name_Generate (const ET_File *ETFile, const gchar *new_file_name);
guint ET_Get_Number_Of_Files_In_Directory (const gchar *path_utf8);
gboolean ET_Detect_Changes_Of_File_Tag (const File_Tag *FileTag1, const File_Tag *FileTag2);
GList *ET_Sort_File_List (GList *ETFileList, EtSortMode Sorting_Type);
void ET_Sort_Displayed_File_List_And_Update_UI (EtSortMode Sorting_Type);
-gint ET_Comp_Func_Sort_File_By_Ascending_Filename (ET_File *ETFile1, ET_File *ETFile2);
-gint ET_Comp_Func_Sort_File_By_Descending_Filename (ET_File *ETFile1, ET_File *ETFile2);
-gint ET_Comp_Func_Sort_File_By_Ascending_Creation_Date (ET_File *ETFile1, ET_File *ETFile2);
-gint ET_Comp_Func_Sort_File_By_Descending_Creation_Date (ET_File *ETFile1, ET_File *ETFile2);
-gint et_comp_func_sort_file_by_ascending_disc_number (ET_File *ETFile1,
- ET_File *ETFile2);
-gint et_comp_func_sort_file_by_descending_disc_number (ET_File *ETFile1,
- ET_File *ETFile2);
-gint ET_Comp_Func_Sort_File_By_Ascending_Track_Number (ET_File *ETFile1, ET_File *ETFile2);
-gint ET_Comp_Func_Sort_File_By_Descending_Track_Number (ET_File *ETFile1, ET_File *ETFile2);
-gint ET_Comp_Func_Sort_File_By_Ascending_Title (ET_File *ETFile1, ET_File *ETFile2);
-gint ET_Comp_Func_Sort_File_By_Descending_Title (ET_File *ETFile1, ET_File *ETFile2);
-gint ET_Comp_Func_Sort_File_By_Ascending_Artist (ET_File *ETFile1, ET_File *ETFile2);
-gint ET_Comp_Func_Sort_File_By_Descending_Artist (ET_File *ETFile1, ET_File *ETFile2);
-gint ET_Comp_Func_Sort_File_By_Ascending_Album_Artist (ET_File *ETFile1, ET_File *ETFile2);
-gint ET_Comp_Func_Sort_File_By_Descending_Album_Artist (ET_File *ETFile1, ET_File *ETFile2);
-gint ET_Comp_Func_Sort_File_By_Ascending_Album (ET_File *ETFile1, ET_File *ETFile2);
-gint ET_Comp_Func_Sort_File_By_Descending_Album (ET_File *ETFile1, ET_File *ETFile2);
-gint ET_Comp_Func_Sort_File_By_Ascending_Year (ET_File *ETFile1, ET_File *ETFile2);
-gint ET_Comp_Func_Sort_File_By_Descending_Year (ET_File *ETFile1, ET_File *ETFile2);
-gint ET_Comp_Func_Sort_File_By_Ascending_Genre (ET_File *ETFile1, ET_File *ETFile2);
-gint ET_Comp_Func_Sort_File_By_Descending_Genre (ET_File *ETFile1, ET_File *ETFile2);
-gint ET_Comp_Func_Sort_File_By_Ascending_Comment (ET_File *ETFile1, ET_File *ETFile2);
-gint ET_Comp_Func_Sort_File_By_Descending_Comment (ET_File *ETFile1, ET_File *ETFile2);
-gint ET_Comp_Func_Sort_File_By_Ascending_Composer (ET_File *ETFile1, ET_File *ETFile2);
-gint ET_Comp_Func_Sort_File_By_Descending_Composer (ET_File *ETFile1, ET_File *ETFile2);
-gint ET_Comp_Func_Sort_File_By_Ascending_Orig_Artist (ET_File *ETFile1, ET_File *ETFile2);
-gint ET_Comp_Func_Sort_File_By_Descending_Orig_Artist (ET_File *ETFile1, ET_File *ETFile2);
-gint ET_Comp_Func_Sort_File_By_Ascending_Copyright (ET_File *ETFile1, ET_File *ETFile2);
-gint ET_Comp_Func_Sort_File_By_Descending_Copyright (ET_File *ETFile1, ET_File *ETFile2);
-gint ET_Comp_Func_Sort_File_By_Ascending_Url (ET_File *ETFile1, ET_File *ETFile2);
-gint ET_Comp_Func_Sort_File_By_Descending_Url (ET_File *ETFile1, ET_File *ETFile2);
-gint ET_Comp_Func_Sort_File_By_Ascending_Encoded_By (ET_File *ETFile1, ET_File *ETFile2);
-gint ET_Comp_Func_Sort_File_By_Descending_Encoded_By (ET_File *ETFile1, ET_File *ETFile2);
-
-gint ET_Comp_Func_Sort_File_By_Ascending_File_Type (ET_File *ETFile1, ET_File *ETFile2);
-gint ET_Comp_Func_Sort_File_By_Descending_File_Type (ET_File *ETFile1, ET_File *ETFile2);
-gint ET_Comp_Func_Sort_File_By_Ascending_File_Size (ET_File *ETFile1, ET_File *ETFile2);
-gint ET_Comp_Func_Sort_File_By_Descending_File_Size (ET_File *ETFile1, ET_File *ETFile2);
-gint ET_Comp_Func_Sort_File_By_Ascending_File_Duration (ET_File *ETFile1, ET_File *ETFile2);
-gint ET_Comp_Func_Sort_File_By_Descending_File_Duration (ET_File *ETFile1, ET_File *ETFile2);
-gint ET_Comp_Func_Sort_File_By_Ascending_File_Bitrate (ET_File *ETFile1, ET_File *ETFile2);
-gint ET_Comp_Func_Sort_File_By_Descending_File_Bitrate (ET_File *ETFile1, ET_File *ETFile2);
-gint ET_Comp_Func_Sort_File_By_Ascending_File_Samplerate (ET_File *ETFile1, ET_File *ETFile2);
-gint ET_Comp_Func_Sort_File_By_Descending_File_Samplerate (ET_File *ETFile1, ET_File *ETFile2);
+gint ET_Comp_Func_Sort_File_By_Ascending_Filename (const ET_File *ETFile1, const ET_File *ETFile2);
+gint ET_Comp_Func_Sort_File_By_Descending_Filename (const ET_File *ETFile1, const ET_File *ETFile2);
+gint ET_Comp_Func_Sort_File_By_Ascending_Creation_Date (const ET_File *ETFile1, const ET_File *ETFile2);
+gint ET_Comp_Func_Sort_File_By_Descending_Creation_Date (const ET_File *ETFile1, const ET_File *ETFile2);
+gint et_comp_func_sort_file_by_ascending_disc_number (const ET_File *ETFile1,
+ const ET_File *ETFile2);
+gint et_comp_func_sort_file_by_descending_disc_number (const ET_File *ETFile1,
+ const ET_File *ETFile2);
+gint ET_Comp_Func_Sort_File_By_Ascending_Track_Number (const ET_File *ETFile1, const ET_File *ETFile2);
+gint ET_Comp_Func_Sort_File_By_Descending_Track_Number (const ET_File *ETFile1, const ET_File *ETFile2);
+gint ET_Comp_Func_Sort_File_By_Ascending_Title (const ET_File *ETFile1, const ET_File *ETFile2);
+gint ET_Comp_Func_Sort_File_By_Descending_Title (const ET_File *ETFile1, const ET_File *ETFile2);
+gint ET_Comp_Func_Sort_File_By_Ascending_Artist (const ET_File *ETFile1, const ET_File *ETFile2);
+gint ET_Comp_Func_Sort_File_By_Descending_Artist (const ET_File *ETFile1, const ET_File *ETFile2);
+gint ET_Comp_Func_Sort_File_By_Ascending_Album_Artist (const ET_File *ETFile1, const ET_File *ETFile2);
+gint ET_Comp_Func_Sort_File_By_Descending_Album_Artist (const ET_File *ETFile1, const ET_File *ETFile2);
+gint ET_Comp_Func_Sort_File_By_Ascending_Album (const ET_File *ETFile1, const ET_File *ETFile2);
+gint ET_Comp_Func_Sort_File_By_Descending_Album (const ET_File *ETFile1, const ET_File *ETFile2);
+gint ET_Comp_Func_Sort_File_By_Ascending_Year (const ET_File *ETFile1, const ET_File *ETFile2);
+gint ET_Comp_Func_Sort_File_By_Descending_Year (const ET_File *ETFile1, const ET_File *ETFile2);
+gint ET_Comp_Func_Sort_File_By_Ascending_Genre (const ET_File *ETFile1, const ET_File *ETFile2);
+gint ET_Comp_Func_Sort_File_By_Descending_Genre (const ET_File *ETFile1, const ET_File *ETFile2);
+gint ET_Comp_Func_Sort_File_By_Ascending_Comment (const ET_File *ETFile1, const ET_File *ETFile2);
+gint ET_Comp_Func_Sort_File_By_Descending_Comment (const ET_File *ETFile1, const ET_File *ETFile2);
+gint ET_Comp_Func_Sort_File_By_Ascending_Composer (const ET_File *ETFile1, const ET_File *ETFile2);
+gint ET_Comp_Func_Sort_File_By_Descending_Composer (const ET_File *ETFile1, const ET_File *ETFile2);
+gint ET_Comp_Func_Sort_File_By_Ascending_Orig_Artist (const ET_File *ETFile1, const ET_File *ETFile2);
+gint ET_Comp_Func_Sort_File_By_Descending_Orig_Artist (const ET_File *ETFile1, const ET_File *ETFile2);
+gint ET_Comp_Func_Sort_File_By_Ascending_Copyright (const ET_File *ETFile1, const ET_File *ETFile2);
+gint ET_Comp_Func_Sort_File_By_Descending_Copyright (const ET_File *ETFile1, const ET_File *ETFile2);
+gint ET_Comp_Func_Sort_File_By_Ascending_Url (const ET_File *ETFile1, const ET_File *ETFile2);
+gint ET_Comp_Func_Sort_File_By_Descending_Url (const ET_File *ETFile1, const ET_File *ETFile2);
+gint ET_Comp_Func_Sort_File_By_Ascending_Encoded_By (const ET_File *ETFile1, const ET_File *ETFile2);
+gint ET_Comp_Func_Sort_File_By_Descending_Encoded_By (const ET_File *ETFile1, const ET_File *ETFile2);
+
+gint ET_Comp_Func_Sort_File_By_Ascending_File_Type (const ET_File *ETFile1, const ET_File *ETFile2);
+gint ET_Comp_Func_Sort_File_By_Descending_File_Type (const ET_File *ETFile1, const ET_File *ETFile2);
+gint ET_Comp_Func_Sort_File_By_Ascending_File_Size (const ET_File *ETFile1, const ET_File *ETFile2);
+gint ET_Comp_Func_Sort_File_By_Descending_File_Size (const ET_File *ETFile1, const ET_File *ETFile2);
+gint ET_Comp_Func_Sort_File_By_Ascending_File_Duration (const ET_File *ETFile1, const ET_File *ETFile2);
+gint ET_Comp_Func_Sort_File_By_Descending_File_Duration (const ET_File *ETFile1, const ET_File *ETFile2);
+gint ET_Comp_Func_Sort_File_By_Ascending_File_Bitrate (const ET_File *ETFile1, const ET_File *ETFile2);
+gint ET_Comp_Func_Sort_File_By_Descending_File_Bitrate (const ET_File *ETFile1, const ET_File *ETFile2);
+gint ET_Comp_Func_Sort_File_By_Ascending_File_Samplerate (const ET_File *ETFile1, const ET_File *ETFile2);
+gint ET_Comp_Func_Sort_File_By_Descending_File_Samplerate (const ET_File *ETFile1, const ET_File *ETFile2);
G_END_DECLS
diff --git a/src/file_area.c b/src/file_area.c
index eedb715..67c2ba4 100644
--- a/src/file_area.c
+++ b/src/file_area.c
@@ -237,7 +237,7 @@ et_file_area_set_header_fields (EtFileArea *self,
* and list length. */
void
et_file_area_set_file_fields (EtFileArea *self,
- ET_File *ETFile)
+ const ET_File *ETFile)
{
EtFileAreaPrivate *priv;
GFile *file;
diff --git a/src/file_area.h b/src/file_area.h
index fd670f6..df70a56 100644
--- a/src/file_area.h
+++ b/src/file_area.h
@@ -49,7 +49,7 @@ GType et_file_area_get_type (void);
GtkWidget * et_file_area_new (void);
void et_file_area_clear (EtFileArea *self);
void et_file_area_set_header_fields (EtFileArea *self, EtFileHeaderFields *fields);
-void et_file_area_set_file_fields (EtFileArea *self, ET_File *ETFile);
+void et_file_area_set_file_fields (EtFileArea *self, const ET_File *ETFile);
const gchar * et_file_area_get_filename (EtFileArea *self);
G_END_DECLS
diff --git a/src/tag_area.c b/src/tag_area.c
index 612f483..83fb517 100644
--- a/src/tag_area.c
+++ b/src/tag_area.c
@@ -2444,7 +2444,7 @@ et_tag_area_show_images_tab (EtTagArea *self)
*/
void
et_tag_area_update_controls (EtTagArea *self,
- ET_File *ETFile)
+ const ET_File *ETFile)
{
EtTagAreaPrivate *priv;
@@ -2965,7 +2965,7 @@ et_tag_area_create_file_tag (EtTagArea *self)
gboolean
et_tag_area_display_et_file (EtTagArea *self,
- ET_File *ETFile)
+ const ET_File *ETFile)
{
EtTagAreaPrivate *priv;
File_Tag *FileTag = NULL;
diff --git a/src/tag_area.h b/src/tag_area.h
index 78160da..249125d 100644
--- a/src/tag_area.h
+++ b/src/tag_area.h
@@ -47,11 +47,11 @@ struct _EtTagAreaClass
GType et_tag_area_get_type (void);
GtkWidget * et_tag_area_new (void);
-void et_tag_area_update_controls (EtTagArea *self, ET_File *ETFile);
+void et_tag_area_update_controls (EtTagArea *self, const ET_File *ETFile);
void et_tag_area_clear (EtTagArea *self);
void et_tag_area_title_grab_focus (EtTagArea *self);
File_Tag * et_tag_area_create_file_tag (EtTagArea *self);
-gboolean et_tag_area_display_et_file (EtTagArea *self, ET_File *ETFile);
+gboolean et_tag_area_display_et_file (EtTagArea *self, const ET_File *ETFile);
gboolean et_tag_area_select_all_if_focused (EtTagArea *self, GtkWidget *focused);
gboolean et_tag_area_unselect_all_if_focused (EtTagArea *self, GtkWidget *focused);
diff --git a/src/tags/ape_tag.c b/src/tags/ape_tag.c
index 34d72b3..04ef8b2 100644
--- a/src/tags/ape_tag.c
+++ b/src/tags/ape_tag.c
@@ -204,10 +204,9 @@ ape_tag_read_file_tag (const gchar *filename,
}
gboolean
-ape_tag_write_file_tag (ET_File *ETFile,
+ape_tag_write_file_tag (const ET_File *ETFile,
GError **error)
{
-
const File_Tag *FileTag;
const gchar *filename_in;
//FILE *file_in;
diff --git a/src/tags/ape_tag.h b/src/tags/ape_tag.h
index f09a178..428218d 100644
--- a/src/tags/ape_tag.h
+++ b/src/tags/ape_tag.h
@@ -26,7 +26,7 @@
G_BEGIN_DECLS
gboolean ape_tag_read_file_tag (const gchar *filename, File_Tag *FileTag, GError **error);
-gboolean ape_tag_write_file_tag (ET_File *ETFile, GError **error);
+gboolean ape_tag_write_file_tag (const ET_File *ETFile, GError **error);
G_END_DECLS
diff --git a/src/tags/flac_header.c b/src/tags/flac_header.c
index 2149b62..11c731f 100644
--- a/src/tags/flac_header.c
+++ b/src/tags/flac_header.c
@@ -207,7 +207,7 @@ void error_callback_(const FLAC__StreamDecoder *decoder, FLAC__StreamDecoderErro
EtFileHeaderFields *
Flac_Header_Display_File_Info_To_UI (const gchar *filename_utf8,
- ET_File *ETFile)
+ const ET_File *ETFile)
{
EtFileHeaderFields *fields;
ET_File_Info *info;
diff --git a/src/tags/flac_header.h b/src/tags/flac_header.h
index b6872d4..75cbb15 100644
--- a/src/tags/flac_header.h
+++ b/src/tags/flac_header.h
@@ -25,7 +25,7 @@
G_BEGIN_DECLS
gboolean flac_header_read_file_info (const gchar *filename, ET_File_Info *ETFileInfo, GError **error);
-EtFileHeaderFields * Flac_Header_Display_File_Info_To_UI (const gchar *filename, ET_File *ETFile);
+EtFileHeaderFields * Flac_Header_Display_File_Info_To_UI (const gchar *filename, const ET_File *ETFile);
void et_flac_file_header_fields_free (EtFileHeaderFields *fields);
G_END_DECLS
diff --git a/src/tags/flac_tag.c b/src/tags/flac_tag.c
index 837aea2..acb5ea8 100644
--- a/src/tags/flac_tag.c
+++ b/src/tags/flac_tag.c
@@ -1,25 +1,24 @@
-/* flac_tag.c - 2003/12/27 */
-/*
- * EasyTAG - Tag editor for MP3 and Ogg Vorbis files
- * Copyright (C) 2001-2003 Jerome Couderc <easytag gmail com>
- * Copyright (C) 2003 Pavel Minayev <thalion front ru>
+/* EasyTAG - Tag editor for audio files
+ * Copyright (C) 2014 David King <amigadave amigadave com>
+ * Copyright (C) 2001-2003 Jerome Couderc <easytag gmail com>
+ * Copyright (C) 2003 Pavel Minayev <thalion front ru>
*
- * 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 Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+ * 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 Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <config.h>
+#include "config.h"
#ifdef ENABLE_FLAC
@@ -819,7 +818,8 @@ static gboolean Flac_Set_Tag (FLAC__StreamMetadata *vc_block, const gchar *tag_n
* Write Flac tag, using the level 2 flac interface
*/
gboolean
-flac_tag_write_file_tag (ET_File *ETFile, GError **error)
+flac_tag_write_file_tag (const ET_File *ETFile,
+ GError **error)
{
const File_Tag *FileTag;
const gchar *filename;
diff --git a/src/tags/flac_tag.h b/src/tags/flac_tag.h
index 2ac8e57..2b0e20e 100644
--- a/src/tags/flac_tag.h
+++ b/src/tags/flac_tag.h
@@ -18,7 +18,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-
#ifndef ET_FLAC_TAG_H_
#define ET_FLAC_TAG_H_
@@ -28,7 +27,7 @@
G_BEGIN_DECLS
gboolean flac_tag_read_file_tag (const gchar *filename, File_Tag *FileTag, GError **error);
-gboolean flac_tag_write_file_tag (ET_File *ETFile, GError **error);
+gboolean flac_tag_write_file_tag (const ET_File *ETFile, GError **error);
G_END_DECLS
diff --git a/src/tags/id3_tag.c b/src/tags/id3_tag.c
index 059f7b5..6c92bb5 100644
--- a/src/tags/id3_tag.c
+++ b/src/tags/id3_tag.c
@@ -135,7 +135,8 @@ et_id3tag_get_tpos_from_file_tag (const File_Tag *FileTag)
* Write the ID3 tags to the file. Returns TRUE on success, else 0.
*/
static gboolean
-id3tag_write_file_v23tag (ET_File *ETFile, GError **error)
+id3tag_write_file_v23tag (const ET_File *ETFile,
+ GError **error)
{
const File_Tag *FileTag;
const gchar *filename;
@@ -1536,7 +1537,7 @@ id3tag_check_if_id3lib_is_buggy (GError **error)
* Write tag according the version selected by the user
*/
gboolean
-id3tag_write_file_tag (ET_File *ETFile,
+id3tag_write_file_tag (const ET_File *ETFile,
GError **error)
{
#ifdef ENABLE_ID3LIB
diff --git a/src/tags/id3_tag.h b/src/tags/id3_tag.h
index e8ec743..dd9ec06 100644
--- a/src/tags/id3_tag.h
+++ b/src/tags/id3_tag.h
@@ -28,8 +28,8 @@ G_BEGIN_DECLS
#define ID3_INVALID_GENRE 255
gboolean id3tag_read_file_tag (const gchar *filename, File_Tag *FileTag, GError **error);
-gboolean id3tag_write_file_v24tag (ET_File *ETFile, GError **error);
-gboolean id3tag_write_file_tag (ET_File *ETFile, GError **error);
+gboolean id3tag_write_file_v24tag (const ET_File *ETFile, GError **error);
+gboolean id3tag_write_file_tag (const ET_File *ETFile, GError **error);
const gchar * Id3tag_Genre_To_String (unsigned char genre_code);
guchar Id3tag_String_To_Genre (const gchar *genre);
diff --git a/src/tags/id3v24_tag.c b/src/tags/id3v24_tag.c
index 776da6f..4922349 100644
--- a/src/tags/id3v24_tag.c
+++ b/src/tags/id3v24_tag.c
@@ -872,7 +872,8 @@ libid3tag_Get_Frame_Str (const struct id3_frame *frame,
* Write the ID3 tags to the file. Returns TRUE on success, else 0.
*/
gboolean
-id3tag_write_file_v24tag (ET_File *ETFile, GError **error)
+id3tag_write_file_v24tag (const ET_File *ETFile,
+ GError **error)
{
const File_Tag *FileTag;
const gchar *filename;
diff --git a/src/tags/monkeyaudio_header.c b/src/tags/monkeyaudio_header.c
index 1d90fd5..7bb2b50 100644
--- a/src/tags/monkeyaudio_header.c
+++ b/src/tags/monkeyaudio_header.c
@@ -71,7 +71,7 @@ mac_header_read_file_info (const gchar *filename,
EtFileHeaderFields *
Mac_Header_Display_File_Info_To_UI (const gchar *filename_utf8,
- ET_File *ETFile)
+ const ET_File *ETFile)
{
EtFileHeaderFields *fields;
ET_File_Info *info;
diff --git a/src/tags/monkeyaudio_header.h b/src/tags/monkeyaudio_header.h
index d0b95d2..2755a08 100644
--- a/src/tags/monkeyaudio_header.h
+++ b/src/tags/monkeyaudio_header.h
@@ -26,7 +26,7 @@
G_BEGIN_DECLS
gboolean mac_header_read_file_info (const gchar *filename, ET_File_Info *ETFileInfo, GError **error);
-EtFileHeaderFields * Mac_Header_Display_File_Info_To_UI (const gchar *filename, ET_File *ETFile);
+EtFileHeaderFields * Mac_Header_Display_File_Info_To_UI (const gchar *filename, const ET_File *ETFile);
void et_mac_file_header_fields_free (EtFileHeaderFields *fields);
G_END_DECLS
diff --git a/src/tags/mp4_header.cc b/src/tags/mp4_header.cc
index 088702e..4921eb0 100644
--- a/src/tags/mp4_header.cc
+++ b/src/tags/mp4_header.cc
@@ -117,7 +117,7 @@ mp4_header_read_file_info (const gchar *filename,
*/
EtFileHeaderFields *
Mp4_Header_Display_File_Info_To_UI (const gchar *filename,
- ET_File *ETFile)
+ const ET_File *ETFile)
{
EtFileHeaderFields *fields;
ET_File_Info *info;
diff --git a/src/tags/mp4_header.h b/src/tags/mp4_header.h
index ca04cde..891e3dd 100644
--- a/src/tags/mp4_header.h
+++ b/src/tags/mp4_header.h
@@ -26,7 +26,7 @@
G_BEGIN_DECLS
gboolean mp4_header_read_file_info (const gchar *filename, ET_File_Info *ETFileInfo, GError **error);
-EtFileHeaderFields * Mp4_Header_Display_File_Info_To_UI (const gchar *filename, ET_File *ETFile);
+EtFileHeaderFields * Mp4_Header_Display_File_Info_To_UI (const gchar *filename, const ET_File *ETFile);
void et_mp4_file_header_fields_free (EtFileHeaderFields *fields);
G_END_DECLS
diff --git a/src/tags/mp4_tag.cc b/src/tags/mp4_tag.cc
index 02be3b6..d900713 100644
--- a/src/tags/mp4_tag.cc
+++ b/src/tags/mp4_tag.cc
@@ -244,7 +244,7 @@ mp4tag_read_file_tag (const gchar *filename,
* Write tag data into an Mp4 file.
*/
gboolean
-mp4tag_write_file_tag (ET_File *ETFile,
+mp4tag_write_file_tag (const ET_File *ETFile,
GError **error)
{
const File_Tag *FileTag;
diff --git a/src/tags/mp4_tag.h b/src/tags/mp4_tag.h
index 74a5195..9dcbea2 100644
--- a/src/tags/mp4_tag.h
+++ b/src/tags/mp4_tag.h
@@ -26,7 +26,7 @@
G_BEGIN_DECLS
gboolean mp4tag_read_file_tag (const gchar *filename, File_Tag *FileTag, GError **error);
-gboolean mp4tag_write_file_tag (ET_File *ETFile, GError **error);
+gboolean mp4tag_write_file_tag (const ET_File *ETFile, GError **error);
G_END_DECLS
diff --git a/src/tags/mpeg_header.c b/src/tags/mpeg_header.c
index c88cef2..beed5ca 100644
--- a/src/tags/mpeg_header.c
+++ b/src/tags/mpeg_header.c
@@ -175,7 +175,7 @@ mpeg_header_read_file_info (const gchar *filename,
/* For displaying header information in the main window. */
EtFileHeaderFields *
Mpeg_Header_Display_File_Info_To_UI (const gchar *filename_utf8,
- ET_File *ETFile)
+ const ET_File *ETFile)
{
EtFileHeaderFields *fields;
ET_File_Info *info;
diff --git a/src/tags/mpeg_header.h b/src/tags/mpeg_header.h
index e726a8e..14fa00f 100644
--- a/src/tags/mpeg_header.h
+++ b/src/tags/mpeg_header.h
@@ -25,7 +25,7 @@
G_BEGIN_DECLS
gboolean mpeg_header_read_file_info (const gchar *filename, ET_File_Info *ETFileInfo, GError **error);
-EtFileHeaderFields * Mpeg_Header_Display_File_Info_To_UI (const gchar *filename, ET_File *ETFile);
+EtFileHeaderFields * Mpeg_Header_Display_File_Info_To_UI (const gchar *filename, const ET_File *ETFile);
void et_mpeg_file_header_fields_free (EtFileHeaderFields *fields);
G_END_DECLS
diff --git a/src/tags/musepack_header.c b/src/tags/musepack_header.c
index 0ee84b7..3c20d9c 100644
--- a/src/tags/musepack_header.c
+++ b/src/tags/musepack_header.c
@@ -72,7 +72,7 @@ mpc_header_read_file_info (const gchar *filename,
EtFileHeaderFields *
Mpc_Header_Display_File_Info_To_UI (const gchar *filename_utf8,
- ET_File *ETFile)
+ const ET_File *ETFile)
{
EtFileHeaderFields *fields;
ET_File_Info *info;
diff --git a/src/tags/musepack_header.h b/src/tags/musepack_header.h
index 05d3c7d..c0c2fcd 100644
--- a/src/tags/musepack_header.h
+++ b/src/tags/musepack_header.h
@@ -26,7 +26,7 @@
G_BEGIN_DECLS
gboolean mpc_header_read_file_info (const gchar *filename, ET_File_Info *ETFileInfo, GError **error);
-EtFileHeaderFields * Mpc_Header_Display_File_Info_To_UI (const gchar *filename, ET_File *ETFile);
+EtFileHeaderFields * Mpc_Header_Display_File_Info_To_UI (const gchar *filename, const ET_File *ETFile);
void et_mpc_file_header_fields_free (EtFileHeaderFields *fields);
G_END_DECLS
diff --git a/src/tags/ogg_header.c b/src/tags/ogg_header.c
index 2d3512e..2475f41 100644
--- a/src/tags/ogg_header.c
+++ b/src/tags/ogg_header.c
@@ -377,7 +377,8 @@ speex_header_read_file_info (const gchar *filename,
#endif
EtFileHeaderFields *
-Ogg_Header_Display_File_Info_To_UI (const gchar *filename, ET_File *ETFile)
+Ogg_Header_Display_File_Info_To_UI (const gchar *filename,
+ const ET_File *ETFile)
{
EtFileHeaderFields *fields;
ET_File_Info *info;
diff --git a/src/tags/ogg_header.h b/src/tags/ogg_header.h
index 28a5f53..1a11486 100644
--- a/src/tags/ogg_header.h
+++ b/src/tags/ogg_header.h
@@ -72,7 +72,7 @@ typedef enum
gboolean ogg_header_read_file_info (const gchar *filename,
ET_File_Info *ETFileInfo,
GError **error);
-EtFileHeaderFields * Ogg_Header_Display_File_Info_To_UI (const gchar *filename, ET_File *ETFile);
+EtFileHeaderFields * Ogg_Header_Display_File_Info_To_UI (const gchar *filename, const ET_File *ETFile);
void et_ogg_file_header_fields_free (EtFileHeaderFields *fields);
gboolean speex_header_read_file_info (const gchar *filename, ET_File_Info *ETFileInfo, GError **error);
diff --git a/src/tags/ogg_tag.c b/src/tags/ogg_tag.c
index 63b5318..5b0e55e 100644
--- a/src/tags/ogg_tag.c
+++ b/src/tags/ogg_tag.c
@@ -816,7 +816,8 @@ static void Ogg_Set_Tag (vorbis_comment *vc, const gchar *tag_name, gchar *value
}
gboolean
-ogg_tag_write_file_tag (ET_File *ETFile, GError **error)
+ogg_tag_write_file_tag (const ET_File *ETFile,
+ GError **error)
{
const File_Tag *FileTag;
const gchar *filename;
diff --git a/src/tags/ogg_tag.h b/src/tags/ogg_tag.h
index 055d852..eaf8051 100644
--- a/src/tags/ogg_tag.h
+++ b/src/tags/ogg_tag.h
@@ -1,47 +1,45 @@
-/* ogg_tag.h - 2001/11/08 */
-/*
- * EasyTAG - Tag editor for MP3 and Ogg Vorbis files
- * Copyright (C) 2001-2003 Jerome Couderc <easytag gmail com>
+/* EasyTAG - Tag editor for MP3 and Ogg Vorbis files
+ * Copyright (C) 2014 David King <amigadave amigadave com>
+ * Copyright (C) 2001-2003 Jerome Couderc <easytag gmail 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 Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
+ * 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 Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
+#ifndef ET_OGG_TAG_H_
+#define ET_OGG_TAG_H_
-#ifndef __OGG_TAG_H__
-#define __OGG_TAG_H__
-
+#include "config.h"
#include <glib.h>
-#include "config.h"
-
#ifdef ENABLE_OGG
#include "vcedit.h"
#include "et_core.h"
-/**************
- * Prototypes *
- **************/
+G_BEGIN_DECLS
+
gboolean ogg_tag_read_file_tag (const gchar *filename, File_Tag *FileTag,
GError **error);
-gboolean ogg_tag_write_file_tag (ET_File *ETFile, GError **error);
+gboolean ogg_tag_write_file_tag (const ET_File *ETFile, GError **error);
void et_add_file_tags_from_vorbis_comments (vorbis_comment *vc, File_Tag *FileTag, const gchar
*filename_utf8);
void et_add_vorbis_comments_from_file_tags (vorbis_comment *vc, File_Tag *FileTag);
+G_END_DECLS
+
#endif /* ENABLE_OGG */
-#endif /* __OGG_TAG_H__ */
+#endif /* ET_OGG_TAG_H_ */
diff --git a/src/tags/opus_header.c b/src/tags/opus_header.c
index 31791f6..4bd8ef4 100644
--- a/src/tags/opus_header.c
+++ b/src/tags/opus_header.c
@@ -210,7 +210,7 @@ et_opus_read_file_info (GFile *gfile, ET_File_Info *ETFileInfo,
*/
EtFileHeaderFields *
et_opus_header_display_file_info_to_ui (GFile *file,
- ET_File *ETFile)
+ const ET_File *ETFile)
{
EtFileHeaderFields *fields;
ET_File_Info *info;
diff --git a/src/tags/opus_header.h b/src/tags/opus_header.h
index 604d2d2..4d34415 100644
--- a/src/tags/opus_header.h
+++ b/src/tags/opus_header.h
@@ -60,7 +60,7 @@ typedef enum
gboolean et_opus_read_file_info (GFile *gfile, ET_File_Info *ETFileInfo, GError **error);
OggOpusFile * et_opus_open_file (GFile *gfile, GError **error);
-EtFileHeaderFields * et_opus_header_display_file_info_to_ui (GFile *gfile, ET_File *ETFile);
+EtFileHeaderFields * et_opus_header_display_file_info_to_ui (GFile *gfile, const ET_File *ETFile);
void et_opus_file_header_fields_free (EtFileHeaderFields *fields);
#endif /* ET_OPUS_HEADER_H_ */
diff --git a/src/tags/wavpack_header.c b/src/tags/wavpack_header.c
index 94f65e2..87e1f3b 100644
--- a/src/tags/wavpack_header.c
+++ b/src/tags/wavpack_header.c
@@ -70,7 +70,7 @@ wavpack_header_read_file_info (const gchar *filename,
EtFileHeaderFields *
Wavpack_Header_Display_File_Info_To_UI (const gchar *filename_utf8,
- ET_File *ETFile)
+ const ET_File *ETFile)
{
EtFileHeaderFields *fields;
ET_File_Info *info;
diff --git a/src/tags/wavpack_header.h b/src/tags/wavpack_header.h
index ae603e7..b323f5d 100644
--- a/src/tags/wavpack_header.h
+++ b/src/tags/wavpack_header.h
@@ -25,7 +25,7 @@
G_BEGIN_DECLS
gboolean wavpack_header_read_file_info (const gchar *filename, ET_File_Info *ETFileInfo, GError **error);
-EtFileHeaderFields * Wavpack_Header_Display_File_Info_To_UI (const gchar *filename_utf8, ET_File *ETFile);
+EtFileHeaderFields * Wavpack_Header_Display_File_Info_To_UI (const gchar *filename_utf8, const ET_File
*ETFile);
void et_wavpack_file_header_fields_free (EtFileHeaderFields *fields);
G_END_DECLS
diff --git a/src/tags/wavpack_tag.c b/src/tags/wavpack_tag.c
index f26eb2b..faa2092 100644
--- a/src/tags/wavpack_tag.c
+++ b/src/tags/wavpack_tag.c
@@ -275,7 +275,7 @@ wavpack_tag_read_file_tag (const gchar *filename,
}
gboolean
-wavpack_tag_write_file_tag (ET_File *ETFile,
+wavpack_tag_write_file_tag (const ET_File *ETFile,
GError **error)
{
const gchar *filename;
diff --git a/src/tags/wavpack_tag.h b/src/tags/wavpack_tag.h
index 0cd8607..63c66d6 100644
--- a/src/tags/wavpack_tag.h
+++ b/src/tags/wavpack_tag.h
@@ -26,7 +26,7 @@
G_BEGIN_DECLS
gboolean wavpack_tag_read_file_tag (const gchar *filename, File_Tag *FileTag, GError **error);
-gboolean wavpack_tag_write_file_tag (ET_File *ETFile, GError **error);
+gboolean wavpack_tag_write_file_tag (const ET_File *ETFile, GError **error);
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]