[easytag/wip/unstable: 22/22] Remove XMMS Vorbis comment compatibility
- From: David King <davidk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [easytag/wip/unstable: 22/22] Remove XMMS Vorbis comment compatibility
- Date: Mon, 11 Feb 2013 19:48:55 +0000 (UTC)
commit 1dd334885ce75f5ac00d94df091baa320ff4e2d1
Author: David King <amigadave amigadave com>
Date: Sat Jan 12 16:16:57 2013 +0000
Remove XMMS Vorbis comment compatibility
TODO | 1 -
src/ogg_tag.c | 45 +++------------------------------------------
src/prefs.c | 8 --------
src/setting.c | 3 ---
src/setting.h | 1 -
5 files changed, 3 insertions(+), 55 deletions(-)
---
diff --git a/TODO b/TODO
index a0ff403..ef97ba6 100644
--- a/TODO
+++ b/TODO
@@ -17,7 +17,6 @@ General tidying
* Use g_spawn_async() or g_app_info_launch() to spawn processes
* Check usage and casting away of const
* Check C-style casts for errors
-* Remove XMMS Vorbis comment compatibility
After GTK+ 3
------------
diff --git a/src/ogg_tag.c b/src/ogg_tag.c
index 0289d83..6bbb244 100644
--- a/src/ogg_tag.c
+++ b/src/ogg_tag.c
@@ -353,51 +353,19 @@ gboolean Ogg_Tag_Read_File_Tag (gchar *filename, File_Tag *FileTag)
* Comment *
***********/
field_num = 0;
- string1 = NULL; // Cause it may be not updated into the 'while' condition
- while ( ((string2 = vorbis_comment_query(vc,"DESCRIPTION",field_num)) != NULL ) // New specifications
- || ((string1 = vorbis_comment_query(vc,"", field_num)) != NULL ) ) // Old : Xmms format (for EasyTAG 1.99.11 and older)
+ while ((string = vorbis_comment_query (vc, "DESCRIPTION", field_num++)) != NULL)
{
string = Try_To_Validate_Utf8_String(string);
- string1 = Try_To_Validate_Utf8_String(string1);
- string2 = Try_To_Validate_Utf8_String(string2);
- if ( string2 && g_utf8_strlen(string2, -1) > 0 ) // Contains comment to new specifications format and we prefer this format (field name defined)
+ if (g_utf8_strlen (string, -1) > 0)
{
if (FileTag->comment==NULL)
FileTag->comment = g_strdup(string2);
else
FileTag->comment = g_strconcat(FileTag->comment,MULTIFIELD_SEPARATOR,string2,NULL);
-
- // Frees allocated data
- if (string && g_utf8_strlen(string, -1) > 0)
- g_free(string);
- if (string1 && g_utf8_strlen(string1, -1) > 0)
- g_free(string1);
- }else if ( string && g_utf8_strlen(string, -1) > 0 ) // Contains comment to Winamp format and we prefer this format (field name defined)
- {
- if (FileTag->comment==NULL)
- FileTag->comment = g_strdup(string);
- else
- FileTag->comment = g_strconcat(FileTag->comment,MULTIFIELD_SEPARATOR,string,NULL);
-
- // Frees allocated data
- if (string1 && g_utf8_strlen(string1, -1) > 0)
- g_free(string1);
- }else if ( string1 && g_utf8_strlen(string1, -1) > 0 ) // Contains comment to Xmms format only
- {
- if (FileTag->comment==NULL)
- FileTag->comment = g_strdup(string1);
- else
- FileTag->comment = g_strconcat(FileTag->comment,MULTIFIELD_SEPARATOR,string1,NULL);
}
- g_free(string);
- g_free(string1);
- g_free(string2);
-
- string = NULL;
- string1 = NULL;
- field_num++;
+ g_free (string);
}
/************
@@ -744,13 +712,6 @@ gboolean Ogg_Tag_Write_File_Tag (ET_File *ETFile)
/* Format of new specification. */
Ogg_Set_Tag(vc,"DESCRIPTION=",FileTag->comment,VORBIS_SPLIT_FIELD_COMMENT);
- if (OGG_TAG_WRITE_XMMS_COMMENT)
- {
- /* Format used with xmms-1.2.5. */
- Ogg_Set_Tag(vc,"=",FileTag->comment,VORBIS_SPLIT_FIELD_COMMENT);
- }
-
-
/************
* Composer *
************/
diff --git a/src/prefs.c b/src/prefs.c
index 8f12323..1086e3b 100644
--- a/src/prefs.c
+++ b/src/prefs.c
@@ -612,14 +612,6 @@ void Open_OptionsWindow (void)
g_signal_connect_swapped(G_OBJECT(NumberTrackFormatedSpinButton),"changed",G_CALLBACK(Number_Track_Formatted_Spin_Button_Changed),G_OBJECT(Label));
g_signal_emit_by_name(G_OBJECT(NumberTrackFormatedSpinButton),"changed",NULL);
- OggTagWriteXmmsComment = gtk_check_button_new_with_label(_("Ogg Vorbis Files: write also the comment in the XMMS format"));
- gtk_box_pack_start(GTK_BOX(vbox),OggTagWriteXmmsComment,FALSE,FALSE,0);
- gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(OggTagWriteXmmsComment),OGG_TAG_WRITE_XMMS_COMMENT);
- gtk_widget_set_tooltip_text(OggTagWriteXmmsComment,_("XMMS doesn't make use of the right way to "
- "identify a comment in Ogg Vorbis files as other apps do. In fact, this field is usually labeled "
- "with 'comment=', whereas XMMS uses only `='. Please, uncheck this option if you don't want "
- "other apps to complain about an unknown field. Comments won't be shown in XMMS, though."));
-
// Separator line
Separator = gtk_separator_new(GTK_ORIENTATION_HORIZONTAL);
gtk_box_pack_start(GTK_BOX(vbox),Separator,FALSE,FALSE,0);
diff --git a/src/setting.c b/src/setting.c
index e67d856..a129e7a 100644
--- a/src/setting.c
+++ b/src/setting.c
@@ -133,7 +133,6 @@ tConfigVariable Config_Variables[] =
{"date_auto_completion", CV_TYPE_BOOL, &DATE_AUTO_COMPLETION },
{"number_track_formated", CV_TYPE_BOOL, &NUMBER_TRACK_FORMATED },
{"number_track_formated_spin_button", CV_TYPE_INT, &NUMBER_TRACK_FORMATED_SPIN_BUTTON },
- {"ogg_tag_write_xmms_comment", CV_TYPE_BOOL, &OGG_TAG_WRITE_XMMS_COMMENT },
{"set_focus_to_same_tag_field", CV_TYPE_BOOL, &SET_FOCUS_TO_SAME_TAG_FIELD },
{"set_focus_to_first_tag_field", CV_TYPE_BOOL, &SET_FOCUS_TO_FIRST_TAG_FIELD },
{"sorting_file_mode", CV_TYPE_INT, &SORTING_FILE_MODE },
@@ -388,7 +387,6 @@ void Init_Config_Variables (void)
DATE_AUTO_COMPLETION = 1;
NUMBER_TRACK_FORMATED = 1;
NUMBER_TRACK_FORMATED_SPIN_BUTTON = 2;
- OGG_TAG_WRITE_XMMS_COMMENT = 1;
SET_FOCUS_TO_SAME_TAG_FIELD = 1;
SET_FOCUS_TO_FIRST_TAG_FIELD = 0;
SORTING_FILE_MODE = SORTING_BY_ASCENDING_FILENAME;
@@ -687,7 +685,6 @@ Apply_Changes_Of_Preferences_Window (void)
DATE_AUTO_COMPLETION = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(DateAutoCompletion));
NUMBER_TRACK_FORMATED = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(NumberTrackFormated));
NUMBER_TRACK_FORMATED_SPIN_BUTTON = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(NumberTrackFormatedSpinButton));
- OGG_TAG_WRITE_XMMS_COMMENT = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(OggTagWriteXmmsComment));
SORTING_FILE_CASE_SENSITIVE = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(SortingFileCaseSensitive));
SET_FOCUS_TO_SAME_TAG_FIELD = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(SetFocusToSameTagField));
SET_FOCUS_TO_FIRST_TAG_FIELD = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(SetFocusToFirstTagField));
diff --git a/src/setting.h b/src/setting.h
index 59d606a..635314c 100644
--- a/src/setting.h
+++ b/src/setting.h
@@ -132,7 +132,6 @@ gint VORBIS_SPLIT_FIELD_ORIG_ARTIST;
gint DATE_AUTO_COMPLETION;
gint NUMBER_TRACK_FORMATED;
gint NUMBER_TRACK_FORMATED_SPIN_BUTTON;
-gint OGG_TAG_WRITE_XMMS_COMMENT;
gint SET_FOCUS_TO_SAME_TAG_FIELD;
gint SET_FOCUS_TO_FIRST_TAG_FIELD;
gint LOG_MAX_LINES;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]