Re: [Easytag-mailing] Adding a new tag field (2)
- From: Random Mister <random mister gmail com>
- To: easytag-mailing lists sourceforge net
- Subject: Re: [Easytag-mailing] Adding a new tag field (2)
- Date: Fri, 25 Mar 2011 00:02:51 +0100
Hey,
I've added a album artist tag field to the interface some time ago. As
Casey said, it's not that hard; it mostly involves copy-pasting code
from the other fields. I've added the patch file as an attachment so you
can look at what you have to change in the code to add a field yourself.
Cheers,
Daniel
On 23-3-2011 22:22, Casey McGinty wrote:
Well,
I've been digging in the code lately to fix a few bugs. I can't say
how exactly how much work it would be to add new tag fields. If you
pick a field that is already there, it shouldn't be hard to find all
locations in the code that have to change.
Basically the steps would be:
1. Update the GUI and connect to the main processing functions. Not
too hard. I think there is a global structure that holds all the tag
strings internally. You probably will have to add another entry for
you new tag, and make sure it gets populated by the GUI logic.
2. Update all the tag writers/readers for various file types. Involves
copying code that is already there mostly, but you'll have to figure
out the best way to describe the new field for each tagging method.
On Wed, Mar 23, 2011 at 4:00 AM, brainvision<brainvision slacky it> wrote:
Hi..
sorry for double posting but I sent the first one as html message.. :(
I'm a big fan of EasyTag, which I'm using since I'm passed to Slackware
Linux and I'm very unhappy that the development of this software is
actually stopped 'cause it is the only GTK tag editor that I can
consider complete -or quite.. In fact I don't know if it is possible and
how to do to add a completely new tag field from scratch.. I mean,
sometimes I have to add a tag field which is not between the EasyTag
one's, tag such as Performer, Conductor, Orchestra.. and so on.. Is
there a way to add tags field from scratch?
Thank you very much for your help..
------------------------------------------------------------------------------
Enable your software for Intel(R) Active Management Technology to meet the
growing manageability and security demands of your customers. Businesses
are taking advantage of Intel(R) vPro (TM) technology - will your software
be a part of the solution? Download the Intel(R) Manageability Checker
today! http://p.sf.net/sfu/intel-dev2devmar
_______________________________________________
Easytag-mailing mailing list
Easytag-mailing lists sourceforge net
https://lists.sourceforge.net/lists/listinfo/easytag-mailing
------------------------------------------------------------------------------
Enable your software for Intel(R) Active Management Technology to meet the
growing manageability and security demands of your customers. Businesses
are taking advantage of Intel(R) vPro (TM) technology - will your software
be a part of the solution? Download the Intel(R) Manageability Checker
today! http://p.sf.net/sfu/intel-dev2devmar
_______________________________________________
Easytag-mailing mailing list
Easytag-mailing lists sourceforge net
https://lists.sourceforge.net/lists/listinfo/easytag-mailing
diff -r easytag-2.1.6/src/bar.c easytag-2.1.6_album_artist/src/bar.c
86c86,88
< QCASE_DATA(AM_SORT_ASCENDING_ALBUM, ET_Sort_Displayed_File_List_And_Update_UI, SORTING_BY_ASCENDING_ALBUM);
---
> QCASE_DATA(AM_SORT_ASCENDING_ALBUM_ARTIST, ET_Sort_Displayed_File_List_And_Update_UI, SORTING_BY_ASCENDING_ALBUM_ARTIST);
> QCASE_DATA(AM_SORT_DESCENDING_ALBUM_ARTIST, ET_Sort_Displayed_File_List_And_Update_UI, SORTING_BY_DESCENDING_ALBUM_ARTIST);
> QCASE_DATA(AM_SORT_ASCENDING_ALBUM, ET_Sort_Displayed_File_List_And_Update_UI, SORTING_BY_ASCENDING_ALBUM);
159c161,163
< { AM_SORT_ASCENDING_ALBUM, GTK_STOCK_SORT_ASCENDING, _("Ascending by album"), NULL, _("Ascending by album"), G_CALLBACK(Menu_Sort_Action) },
---
> { AM_SORT_ASCENDING_ALBUM_ARTIST, GTK_STOCK_SORT_ASCENDING, _("Ascending by album artist"), NULL, _("Ascending by album artist"), G_CALLBACK(Menu_Sort_Action) },
> { AM_SORT_DESCENDING_ALBUM_ARTIST, GTK_STOCK_SORT_DESCENDING, _("Descending by album artist"), NULL, _("Descending by album artist"), G_CALLBACK(Menu_Sort_Action) },
> { AM_SORT_ASCENDING_ALBUM, GTK_STOCK_SORT_ASCENDING, _("Ascending by album"), NULL, _("Ascending by album"), G_CALLBACK(Menu_Sort_Action) },
diff -r easytag-2.1.6/src/bar.h easytag-2.1.6_album_artist/src/bar.h
119a120,121
> #define AM_SORT_ASCENDING_ALBUM_ARTIST "SortAlbumArtistAsc"
> #define AM_SORT_DESCENDING_ALBUM_ARTIST "SortAlbumArtistDesc"
diff -r easytag-2.1.6/src/browser.c easytag-2.1.6_album_artist/src/browser.c
1053,1054c1053,1054
<
< gtk_list_store_set(fileListModel, &rowIter,
---
>
> gtk_list_store_set(fileListModel, &rowIter,
1061c1061,1062
< LIST_FILE_ALBUM, FileTag->album,
---
> LIST_FILE_ALBUM_ARTIST, FileTag->album_artist,
> LIST_FILE_ALBUM, FileTag->album,
1139c1140,1141
< LIST_FILE_ALBUM, FileTag->album,
---
> LIST_FILE_ALBUM_ARTIST, FileTag->album_artist,
> LIST_FILE_ALBUM, FileTag->album,
1294c1296,1297
< LIST_FILE_ALBUM, FileTag->album,
---
> LIST_FILE_ALBUM_ARTIST, FileTag->album_artist,
> LIST_FILE_ALBUM, FileTag->album,
1438c1441,1442
< LIST_FILE_ALBUM, FileTag->album,
---
> LIST_FILE_ALBUM_ARTIST, FileTag->album_artist,
> LIST_FILE_ALBUM, FileTag->album,
1834c1838,1844
< case SORTING_BY_ASCENDING_ALBUM:
---
> case SORTING_BY_ASCENDING_ALBUM_ARTIST:
> result = ET_Comp_Func_Sort_File_By_Ascending_Album_Artist(ETFile1, ETFile2);
> break;
> case SORTING_BY_DESCENDING_ALBUM_ARTIST:
> result = ET_Comp_Func_Sort_File_By_Descending_Album_Artist(ETFile1, ETFile2);
> break;
> case SORTING_BY_ASCENDING_ALBUM:
3028c3038
< gchar *BrowserList_Titles[] = {N_("File Name"),N_("Title"),N_("Artist"),N_("Album"),
---
> gchar *BrowserList_Titles[] = {N_("File Name"),N_("Title"),N_("Artist"),N_("Album Artist"),N_("Album"),
3378a3389
> G_TYPE_STRING,
3436c3447
< // Column for Album
---
> // Column for Album Artist
3442a3454,3467
> "text", LIST_FILE_ALBUM_ARTIST,
> "weight", LIST_FONT_WEIGHT,
> "background-gdk", LIST_ROW_BACKGROUND,
> "foreground-gdk", LIST_ROW_FOREGROUND,
> NULL);
> gtk_tree_view_append_column(GTK_TREE_VIEW(BrowserList), column);
>
> // Column for Album
> column = gtk_tree_view_column_new();
> renderer = gtk_cell_renderer_text_new();
> gtk_tree_view_column_pack_start(column, renderer, FALSE);
> gtk_tree_view_column_set_sizing(column, GTK_TREE_VIEW_COLUMN_AUTOSIZE);
> gtk_tree_view_column_set_title(column, _(BrowserList_Titles[4]));
> gtk_tree_view_column_set_attributes(column, renderer,
3455c3480
< gtk_tree_view_column_set_title(column, _(BrowserList_Titles[4]));
---
> gtk_tree_view_column_set_title(column, _(BrowserList_Titles[5]));
3469c3494
< gtk_tree_view_column_set_title(column, _(BrowserList_Titles[5]));
---
> gtk_tree_view_column_set_title(column, _(BrowserList_Titles[6]));
3483c3508
< gtk_tree_view_column_set_title(column, _(BrowserList_Titles[6]));
---
> gtk_tree_view_column_set_title(column, _(BrowserList_Titles[7]));
3497c3522
< gtk_tree_view_column_set_title(column, _(BrowserList_Titles[7]));
---
> gtk_tree_view_column_set_title(column, _(BrowserList_Titles[8]));
3511c3536
< gtk_tree_view_column_set_title(column, _(BrowserList_Titles[8]));
---
> gtk_tree_view_column_set_title(column, _(BrowserList_Titles[9]));
3525c3550
< gtk_tree_view_column_set_title(column, _(BrowserList_Titles[9]));
---
> gtk_tree_view_column_set_title(column, _(BrowserList_Titles[10]));
3539c3564
< gtk_tree_view_column_set_title(column, _(BrowserList_Titles[10]));
---
> gtk_tree_view_column_set_title(column, _(BrowserList_Titles[11]));
3553c3578
< gtk_tree_view_column_set_title(column, _(BrowserList_Titles[11]));
---
> gtk_tree_view_column_set_title(column, _(BrowserList_Titles[12]));
3567c3592
< gtk_tree_view_column_set_title(column, _(BrowserList_Titles[12]));
---
> gtk_tree_view_column_set_title(column, _(BrowserList_Titles[13]));
diff -r easytag-2.1.6/src/browser.h easytag-2.1.6_album_artist/src/browser.h
86c86,87
< LIST_FILE_ALBUM,
---
> LIST_FILE_ALBUM_ARTIST,
> LIST_FILE_ALBUM,
diff -r easytag-2.1.6/src/easytag.c easytag-2.1.6_album_artist/src/easytag.c
655c655
< gtk_table_attach(GTK_TABLE(Table),AlbumArtistLabel,0,1,11,12,GTK_FILL,GTK_FILL,TablePadding,TablePadding);
---
> gtk_table_attach(GTK_TABLE(Table),AlbumArtistLabel,0,1,2,3,GTK_FILL,GTK_FILL,TablePadding,TablePadding);
659c659
< gtk_table_attach(GTK_TABLE(Table),AlbumArtistEntry,1,10,11,12,
---
> gtk_table_attach(GTK_TABLE(Table),AlbumArtistEntry,1,10,2,3,
664c664
< gtk_table_attach(GTK_TABLE(Table),AlbumArtistMButton,10,11,11,12,0,0,TablePadding,TablePadding);
---
> gtk_table_attach(GTK_TABLE(Table),AlbumArtistMButton,10,11,2,3,0,0,TablePadding,TablePadding);
673c673
< gtk_table_attach(GTK_TABLE(Table),AlbumLabel,0,1,2,3,GTK_FILL,GTK_FILL,TablePadding,TablePadding);
---
> gtk_table_attach(GTK_TABLE(Table),AlbumLabel,0,1,3,4,GTK_FILL,GTK_FILL,TablePadding,TablePadding);
677c677
< gtk_table_attach(GTK_TABLE(Table),AlbumEntry,1,7,2,3,
---
> gtk_table_attach(GTK_TABLE(Table),AlbumEntry,1,7,3,4,
683c683
< gtk_table_attach(GTK_TABLE(Table),AlbumMButton,7,8,2,3,0,0,TablePadding,TablePadding);
---
> gtk_table_attach(GTK_TABLE(Table),AlbumMButton,7,8,3,4,0,0,TablePadding,TablePadding);
692c692
< gtk_table_attach(GTK_TABLE(Table),DiscNumberLabel,8,9,2,3,GTK_FILL,GTK_FILL,TablePadding,TablePadding);
---
> gtk_table_attach(GTK_TABLE(Table),DiscNumberLabel,8,9,3,4,GTK_FILL,GTK_FILL,TablePadding,TablePadding);
696c696
< gtk_table_attach(GTK_TABLE(Table),DiscNumberEntry,9,10,2,3,
---
> gtk_table_attach(GTK_TABLE(Table),DiscNumberEntry,9,10,3,4,
705c705
< gtk_table_attach(GTK_TABLE(Table),DiscNumberMButton,10,11,2,3,0,0,TablePadding,TablePadding);
---
> gtk_table_attach(GTK_TABLE(Table),DiscNumberMButton,10,11,3,4,0,0,TablePadding,TablePadding);
714c714
< gtk_table_attach(GTK_TABLE(Table),YearLabel,0,1,3,4,GTK_FILL,GTK_FILL,TablePadding,TablePadding);
---
> gtk_table_attach(GTK_TABLE(Table),YearLabel,0,1,4,5,GTK_FILL,GTK_FILL,TablePadding,TablePadding);
719c719
< gtk_table_attach(GTK_TABLE(Table),YearEntry,1,2,3,4,
---
> gtk_table_attach(GTK_TABLE(Table),YearEntry,1,2,4,5,
728c728
< gtk_table_attach(GTK_TABLE(Table),YearMButton,2,3,3,4,0,0,TablePadding,TablePadding);
---
> gtk_table_attach(GTK_TABLE(Table),YearMButton,2,3,4,5,0,0,TablePadding,TablePadding);
734c734
< gtk_table_attach(GTK_TABLE(Table),Separator,3,4,3,4,GTK_FILL,GTK_FILL,TablePadding,TablePadding);
---
> gtk_table_attach(GTK_TABLE(Table),Separator,3,4,4,5,GTK_FILL,GTK_FILL,TablePadding,TablePadding);
740c740
< gtk_table_attach(GTK_TABLE(Table),TrackMButtonSequence,4,5,3,4,0,0,TablePadding,TablePadding);
---
> gtk_table_attach(GTK_TABLE(Table),TrackMButtonSequence,4,5,4,5,0,0,TablePadding,TablePadding);
752c752
< gtk_table_attach(GTK_TABLE(Table),TrackLabel,5,6,3,4,GTK_FILL,GTK_FILL,TablePadding,TablePadding);
---
> gtk_table_attach(GTK_TABLE(Table),TrackLabel,5,6,4,5,GTK_FILL,GTK_FILL,TablePadding,TablePadding);
761c761
< gtk_table_attach(GTK_TABLE(Table),TrackEntryCombo,6,7,3,4,
---
> gtk_table_attach(GTK_TABLE(Table),TrackEntryCombo,6,7,4,5,
770c770
< gtk_table_attach(GTK_TABLE(Table),Label,7,8,3,4,GTK_FILL,GTK_FILL,TablePadding,TablePadding);
---
> gtk_table_attach(GTK_TABLE(Table),Label,7,8,4,5,GTK_FILL,GTK_FILL,TablePadding,TablePadding);
775c775
< gtk_table_attach(GTK_TABLE(Table),TrackMButtonNbrFiles,8,9,3,4,0,0,TablePadding,TablePadding);
---
> gtk_table_attach(GTK_TABLE(Table),TrackMButtonNbrFiles,8,9,4,5,0,0,TablePadding,TablePadding);
786c786
< gtk_table_attach(GTK_TABLE(Table),TrackTotalEntry,9,10,3,4,
---
> gtk_table_attach(GTK_TABLE(Table),TrackTotalEntry,9,10,4,5,
794c794
< gtk_table_attach(GTK_TABLE(Table),TrackMButton,10,11,3,4,0,0,TablePadding,TablePadding);
---
> gtk_table_attach(GTK_TABLE(Table),TrackMButton,10,11,4,5,0,0,TablePadding,TablePadding);
803c803
< gtk_table_attach(GTK_TABLE(Table),GenreLabel,0,1,4,5,GTK_FILL,GTK_FILL,TablePadding,TablePadding);
---
> gtk_table_attach(GTK_TABLE(Table),GenreLabel,0,1,5,6,GTK_FILL,GTK_FILL,TablePadding,TablePadding);
818c818
< gtk_table_attach(GTK_TABLE(Table),GenreCombo,1,10,4,5,
---
> gtk_table_attach(GTK_TABLE(Table),GenreCombo,1,10,5,6,
825c825
< gtk_table_attach(GTK_TABLE(Table),GenreMButton,10,11,4,5,0,0,TablePadding,TablePadding);
---
> gtk_table_attach(GTK_TABLE(Table),GenreMButton,10,11,5,6,0,0,TablePadding,TablePadding);
834c834
< gtk_table_attach(GTK_TABLE(Table),CommentLabel,0,1,5,6,GTK_FILL,GTK_FILL,TablePadding,TablePadding);
---
> gtk_table_attach(GTK_TABLE(Table),CommentLabel,0,1,6,7,GTK_FILL,GTK_FILL,TablePadding,TablePadding);
838c838
< gtk_table_attach(GTK_TABLE(Table),CommentEntry,1,10,5,6,
---
> gtk_table_attach(GTK_TABLE(Table),CommentEntry,1,10,6,7,
856c856
< gtk_table_attach(GTK_TABLE(Table),CommentMButton,10,11,5,6,0,0,TablePadding,TablePadding);
---
> gtk_table_attach(GTK_TABLE(Table),CommentMButton,10,11,6,7,0,0,TablePadding,TablePadding);
868c868
< gtk_table_attach(GTK_TABLE(Table),ComposerLabel,0,1,6,7,GTK_FILL,GTK_FILL,TablePadding,TablePadding);
---
> gtk_table_attach(GTK_TABLE(Table),ComposerLabel,0,1,7,8,GTK_FILL,GTK_FILL,TablePadding,TablePadding);
872c872
< gtk_table_attach(GTK_TABLE(Table),ComposerEntry,1,10,6,7,
---
> gtk_table_attach(GTK_TABLE(Table),ComposerEntry,1,10,7,8,
877c877
< gtk_table_attach(GTK_TABLE(Table),ComposerMButton,10,11,6,7,0,0,TablePadding,TablePadding);
---
> gtk_table_attach(GTK_TABLE(Table),ComposerMButton,10,11,7,8,0,0,TablePadding,TablePadding);
887c887
< gtk_table_attach(GTK_TABLE(Table),OrigArtistLabel,0,1,7,8,GTK_FILL,GTK_FILL,TablePadding,TablePadding);
---
> gtk_table_attach(GTK_TABLE(Table),OrigArtistLabel,0,1,8,9,GTK_FILL,GTK_FILL,TablePadding,TablePadding);
891c891
< gtk_table_attach(GTK_TABLE(Table),OrigArtistEntry,1,10,7,8,
---
> gtk_table_attach(GTK_TABLE(Table),OrigArtistEntry,1,10,8,9,
896c896
< gtk_table_attach(GTK_TABLE(Table),OrigArtistMButton,10,11,7,8,0,0,TablePadding,TablePadding);
---
> gtk_table_attach(GTK_TABLE(Table),OrigArtistMButton,10,11,8,9,0,0,TablePadding,TablePadding);
906c906
< gtk_table_attach(GTK_TABLE(Table),CopyrightLabel,0,1,8,9,GTK_FILL,GTK_FILL,TablePadding,TablePadding);
---
> gtk_table_attach(GTK_TABLE(Table),CopyrightLabel,0,1,9,10,GTK_FILL,GTK_FILL,TablePadding,TablePadding);
910c910
< gtk_table_attach(GTK_TABLE(Table),CopyrightEntry,1,10,8,9,
---
> gtk_table_attach(GTK_TABLE(Table),CopyrightEntry,1,10,9,10,
915c915
< gtk_table_attach(GTK_TABLE(Table),CopyrightMButton,10,11,8,9,0,0,TablePadding,TablePadding);
---
> gtk_table_attach(GTK_TABLE(Table),CopyrightMButton,10,11,9,10,0,0,TablePadding,TablePadding);
925c925
< gtk_table_attach(GTK_TABLE(Table),URLLabel,0,1,9,10,GTK_FILL,GTK_FILL,TablePadding,TablePadding);
---
> gtk_table_attach(GTK_TABLE(Table),URLLabel,0,1,10,11,GTK_FILL,GTK_FILL,TablePadding,TablePadding);
929c929
< gtk_table_attach(GTK_TABLE(Table),URLEntry,1,10,9,10,
---
> gtk_table_attach(GTK_TABLE(Table),URLEntry,1,10,10,11,
934c934
< gtk_table_attach(GTK_TABLE(Table),URLMButton,10,11,9,10,0,0,TablePadding,TablePadding);
---
> gtk_table_attach(GTK_TABLE(Table),URLMButton,10,11,10,11,0,0,TablePadding,TablePadding);
944c944
< gtk_table_attach(GTK_TABLE(Table),EncodedByLabel,0,1,10,11,GTK_FILL,GTK_FILL,TablePadding,TablePadding);
---
> gtk_table_attach(GTK_TABLE(Table),EncodedByLabel,0,1,11,12,GTK_FILL,GTK_FILL,TablePadding,TablePadding);
948c948
< gtk_table_attach(GTK_TABLE(Table),EncodedByEntry,1,10,10,11,
---
> gtk_table_attach(GTK_TABLE(Table),EncodedByEntry,1,10,11,12,
953c953
< gtk_table_attach(GTK_TABLE(Table),EncodedByMButton,10,11,10,11,0,0,TablePadding,TablePadding);
---
> gtk_table_attach(GTK_TABLE(Table),EncodedByMButton,10,11,11,12,0,0,TablePadding,TablePadding);
diff -r easytag-2.1.6/src/et_core.c easytag-2.1.6_album_artist/src/et_core.c
949c949,955
< case SORTING_BY_ASCENDING_ALBUM:
---
> case SORTING_BY_ASCENDING_ALBUM_ARTIST:
> etfilelist = g_list_sort(etfilelist,(GCompareFunc)ET_Comp_Func_Sort_File_By_Ascending_Album_Artist);
> break;
> case SORTING_BY_DESCENDING_ALBUM_ARTIST:
> etfilelist = g_list_sort(etfilelist,(GCompareFunc)ET_Comp_Func_Sort_File_By_Descending_Album_Artist);
> break;
> case SORTING_BY_ASCENDING_ALBUM:
1232c1238,1272
< return ET_Comp_Func_Sort_File_By_Ascending_Album(ETFile2,ETFile1);
---
> return ET_Comp_Func_Sort_File_By_Ascending_Artist(ETFile2,ETFile1);
> }
>
> /*
> * Comparison function for sorting by ascending album artist.
> */
> gint ET_Comp_Func_Sort_File_By_Ascending_Album_Artist (ET_File *ETFile1, ET_File *ETFile2)
> {
> // Compare pointers just in case they are the same (e.g. both are NULL)
> if ((ETFile1->FileTag->data == ETFile2->FileTag->data)
> || (((File_Tag *)ETFile1->FileTag->data)->album_artist == ((File_Tag *)ETFile2->FileTag->data)->album_artist))
> return 0;
>
> if ( !ETFile1->FileTag->data || !((File_Tag *)ETFile1->FileTag->data)->album_artist )
> return -1;
> if ( !ETFile2->FileTag->data || !((File_Tag *)ETFile2->FileTag->data)->album_artist )
> return 1;
>
> if (SORTING_FILE_CASE_SENSITIVE)
> {
> if ( strcmp(((File_Tag *)ETFile1->FileTag->data)->album_artist,((File_Tag *)ETFile2->FileTag->data)->album_artist) == 0 )
> // Second criterion
> return ET_Comp_Func_Sort_File_By_Ascending_Artist(ETFile1,ETFile2);
> else
> // First criterion
> return strcmp(((File_Tag *)ETFile1->FileTag->data)->album_artist,((File_Tag *)ETFile2->FileTag->data)->album_artist);
> }else
> {
> if ( strcasecmp(((File_Tag *)ETFile1->FileTag->data)->album_artist,((File_Tag *)ETFile2->FileTag->data)->album_artist) == 0 )
> // Second criterion
> return ET_Comp_Func_Sort_File_By_Ascending_Artist(ETFile1,ETFile2);
> else
> // First criterion
> return strcasecmp(((File_Tag *)ETFile1->FileTag->data)->album_artist,((File_Tag *)ETFile2->FileTag->data)->album_artist);
> }
1234a1275,1281
> /*
> * Comparison function for sorting by descending album artist.
> */
> gint ET_Comp_Func_Sort_File_By_Descending_Album_Artist (ET_File *ETFile1, ET_File *ETFile2)
> {
> return ET_Comp_Func_Sort_File_By_Ascending_Album_Artist(ETFile2,ETFile1);
> }
diff -r easytag-2.1.6/src/et_core.h easytag-2.1.6_album_artist/src/et_core.h
77c77,79
< SORTING_BY_ASCENDING_ALBUM,
---
> SORTING_BY_ASCENDING_ALBUM_ARTIST,
> SORTING_BY_DESCENDING_ALBUM_ARTIST,
> SORTING_BY_ASCENDING_ALBUM,
433a436,437
> 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);
diff -r easytag-2.1.6/src/id3_tag.c easytag-2.1.6_album_artist/src/id3_tag.c
103c103,104
< gboolean has_album = FALSE;
---
> gboolean has_album_artist= FALSE;
> gboolean has_album = FALSE;
196a198,209
> /****************
> * Album Artist *
> ***************/
> while ( (id3_frame = ID3Tag_FindFrameWithID(id3_tag,ID3FID_BAND)) )
> ID3Tag_RemoveFrame(id3_tag,id3_frame);
> if (FileTag->album_artist && g_utf8_strlen(FileTag->album_artist, -1) > 0)
> {
> id3_frame = ID3Frame_NewID(ID3FID_BAND);
> ID3Tag_AttachFrame(id3_tag,id3_frame);
> Id3tag_Set_Field(id3_frame, ID3FN_TEXT, FileTag->album_artist);
> has_album_artist = TRUE;
> }
479c492
< && !has_title && !has_artist && !has_album && !has_year && !has_track
---
> && !has_title && !has_artist && !has_album_artist && !has_album && !has_year && !has_track
1095c1108,1109
< && frameid != ID3FID_ALBUM
---
> && frameid != ID3FID_BAND
> && frameid != ID3FID_ALBUM
diff -r easytag-2.1.6/src/misc.c easytag-2.1.6_album_artist/src/misc.c
85c85,86
< SEARCH_RESULT_ALBUM,
---
> SEARCH_RESULT_ALBUM_ARTIST,
> SEARCH_RESULT_ALBUM,
101c102,103
< SEARCH_RESULT_ALBUM_WEIGHT,
---
> SEARCH_RESULT_ALBUM_ARTIST_WEIGHT,
> SEARCH_RESULT_ALBUM_WEIGHT,
117c119,120
< SEARCH_RESULT_ALBUM_FOREGROUND,
---
> SEARCH_RESULT_ALBUM_ARTIST_FOREGROUND,
> SEARCH_RESULT_ALBUM_FOREGROUND,
1912c1915,1916
< N_("Album"),
---
> N_("Album Artist"),
> N_("Album"),
2008c2012,2013
< G_TYPE_STRING, /* Album */
---
> G_TYPE_STRING, /* Album Artist */
> G_TYPE_STRING, /* Album */
2023c2028,2029
< G_TYPE_INT, /* Font Weight for Album */
---
> G_TYPE_INT, /* Font Weight for Album Artist */
> G_TYPE_INT, /* Font Weight for Album */
2038c2044,2045
< GDK_TYPE_COLOR, /* Color Weight for Album */
---
> GDK_TYPE_COLOR, /* Color Weight for Album Artist */
> GDK_TYPE_COLOR, /* Color Weight for Album */
2080c2087
< renderer = gtk_cell_renderer_text_new(); /* Album */
---
> renderer = gtk_cell_renderer_text_new(); /* Album Artist */
2081a2089,2097
> "text", SEARCH_RESULT_ALBUM_ARTIST,
> "weight", SEARCH_RESULT_ALBUM_ARTIST_WEIGHT,
> "foreground-gdk", SEARCH_RESULT_ALBUM_ARTIST_FOREGROUND,
> NULL);
> gtk_tree_view_append_column(GTK_TREE_VIEW(SearchResultList), column);
> gtk_tree_view_column_set_sizing(column, GTK_TREE_VIEW_COLUMN_AUTOSIZE);
>
> renderer = gtk_cell_renderer_text_new(); /* Album */
> column = gtk_tree_view_column_new_with_attributes(_(SearchResultList_Titles[4]), renderer,
2090c2106
< column = gtk_tree_view_column_new_with_attributes(_(SearchResultList_Titles[4]), renderer,
---
> column = gtk_tree_view_column_new_with_attributes(_(SearchResultList_Titles[5]), renderer,
2099c2115
< column = gtk_tree_view_column_new_with_attributes(_(SearchResultList_Titles[5]), renderer,
---
> column = gtk_tree_view_column_new_with_attributes(_(SearchResultList_Titles[6]), renderer,
2108c2124
< column = gtk_tree_view_column_new_with_attributes(_(SearchResultList_Titles[6]), renderer,
---
> column = gtk_tree_view_column_new_with_attributes(_(SearchResultList_Titles[7]), renderer,
2117c2133
< column = gtk_tree_view_column_new_with_attributes(_(SearchResultList_Titles[7]), renderer,
---
> column = gtk_tree_view_column_new_with_attributes(_(SearchResultList_Titles[8]), renderer,
2126c2142
< column = gtk_tree_view_column_new_with_attributes(_(SearchResultList_Titles[8]), renderer,
---
> column = gtk_tree_view_column_new_with_attributes(_(SearchResultList_Titles[9]), renderer,
2135c2151
< column = gtk_tree_view_column_new_with_attributes(_(SearchResultList_Titles[9]), renderer,
---
> column = gtk_tree_view_column_new_with_attributes(_(SearchResultList_Titles[10]), renderer,
2144c2160
< column = gtk_tree_view_column_new_with_attributes(_(SearchResultList_Titles[10]), renderer,
---
> column = gtk_tree_view_column_new_with_attributes(_(SearchResultList_Titles[11]), renderer,
2153c2169
< column = gtk_tree_view_column_new_with_attributes(_(SearchResultList_Titles[11]), renderer,
---
> column = gtk_tree_view_column_new_with_attributes(_(SearchResultList_Titles[12]), renderer,
2162c2178
< column = gtk_tree_view_column_new_with_attributes(_(SearchResultList_Titles[12]), renderer,
---
> column = gtk_tree_view_column_new_with_attributes(_(SearchResultList_Titles[13]), renderer,
2171c2187
< column = gtk_tree_view_column_new_with_attributes(_(SearchResultList_Titles[13]), renderer,
---
> column = gtk_tree_view_column_new_with_attributes(_(SearchResultList_Titles[14]), renderer,
2352c2368
< if (FileTag->artist) artist2 = g_utf8_casefold(FileTag->album_artist, -1); else album_artist2= NULL;
---
> if (FileTag->album_artist) album_artist2 = g_utf8_casefold(FileTag->album_artist, -1); else album_artist2= NULL;
2391c2407,2408
< || (album2 && strstr(album2, string_to_search2) )
---
> || (album_artist2 && strstr(album_artist2,string_to_search2) )
> || (album2 && strstr(album2, string_to_search2) )
2408c2425,2426
< g_free(album2);
---
> g_free(album_artist2);
> g_free(album2);
2471c2489,2491
< // Album
---
> // Album Artist
> SearchResultList_Text[SEARCH_RESULT_ALBUM_ARTIST]= g_strdup(((File_Tag *)ETFile->FileTag->data)->album_artist);
> // Album
2555c2575,2576
< SEARCH_RESULT_ALBUM, SearchResultList_Text[SEARCH_RESULT_ALBUM],
---
> SEARCH_RESULT_ALBUM_ARTIST,SearchResultList_Text[SEARCH_RESULT_ALBUM_ARTIST],
> SEARCH_RESULT_ALBUM, SearchResultList_Text[SEARCH_RESULT_ALBUM],
2570c2591,2592
< SEARCH_RESULT_ALBUM_WEIGHT, SearchResultList_Weight[SEARCH_RESULT_ALBUM],
---
> SEARCH_RESULT_ALBUM_ARTIST_WEIGHT, SearchResultList_Weight[SEARCH_RESULT_ALBUM_ARTIST],
> SEARCH_RESULT_ALBUM_WEIGHT, SearchResultList_Weight[SEARCH_RESULT_ALBUM],
2585c2607,2608
< SEARCH_RESULT_ALBUM_FOREGROUND, SearchResultList_Color[SEARCH_RESULT_ALBUM],
---
> SEARCH_RESULT_ALBUM_ARTIST_FOREGROUND, SearchResultList_Color[SEARCH_RESULT_ALBUM_ARTIST],
> SEARCH_RESULT_ALBUM_FOREGROUND, SearchResultList_Color[SEARCH_RESULT_ALBUM],
2604c2627,2628
< g_free(SearchResultList_Text[SEARCH_RESULT_ALBUM]);
---
> g_free(SearchResultList_Text[SEARCH_RESULT_ALBUM_ARTIST]);
> g_free(SearchResultList_Text[SEARCH_RESULT_ALBUM]);
diff -r easytag-2.1.6/src/scan.c easytag-2.1.6_album_artist/src/scan.c
69a70
> GtkWidget *ProcessAlbumArtistField;
1164a1166,1182
> // Album Artist field
> if (st_filetag->album_artist && GTK_TOGGLE_BUTTON(ProcessAlbumArtistField)->active)
> {
> if (!FileTag)
> {
> FileTag = ET_File_Tag_Item_New();
> ET_Copy_File_Tag_Item(ETFile,FileTag);
> }
>
> string = g_strdup(st_filetag->album_artist);
>
> Scan_Process_Fields_Functions(&string);
>
> ET_Set_Field_File_Tag_Item(&FileTag->album_artist,string);
>
> g_free(string);
> }
2555c2573,2576
< // Advice for Translators : set the first letter of album translated
---
> // Advice for Translators : set the first letter of album artist translated
> ProcessAlbumArtistField = gtk_toggle_button_new_with_label( _("AA"));
> gtk_tooltips_set_tip(Tips,ProcessAlbumArtistField, _("Process album artist field"),NULL);
> // Advice for Translators : set the first letter of album translated
2581a2603
> gtk_box_pack_start(GTK_BOX(hbox),ProcessAlbumArtistField,TRUE,TRUE,2);
2593c2615,2616
< gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(ProcessAlbumField), PROCESS_ALBUM_FIELD);
---
> gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(ProcessAlbumArtistField),PROCESS_ALBUM_ARTIST_FIELD);
> gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(ProcessAlbumField), PROCESS_ALBUM_FIELD);
2603a2627
> g_signal_connect(G_OBJECT(ProcessAlbumArtistField),"toggled",G_CALLBACK(Select_Fields_Set_Sensitive),NULL);
2785c2809
< Label = gtk_label_new(_("%b : album"));
---
> Label = gtk_label_new(_("%z : album artist"));
2788c2812
< Label = gtk_label_new(_("%c : comment"));
---
> Label = gtk_label_new(_("%b : album"));
2791c2815
< Label = gtk_label_new(_("%p : composer"));
---
> Label = gtk_label_new(_("%c : comment"));
2794c2818,2821
< Label = gtk_label_new(_("%r : copyright"));
---
> Label = gtk_label_new(_("%p : composer"));
> /* gtk_table_attach_defaults(GTK_TABLE(Table),Label,0,1,3,4);
> gtk_misc_set_alignment(GTK_MISC(Label),0,0.5);
> Label = gtk_label_new(_("%r : copyright")); */
3097c3124,3125
< PROCESS_ALBUM_FIELD = GTK_TOGGLE_BUTTON(ProcessAlbumField)->active;
---
> PROCESS_ALBUM_ARTIST_FIELD= GTK_TOGGLE_BUTTON(ProcessAlbumArtistField)->active;
> PROCESS_ALBUM_FIELD = GTK_TOGGLE_BUTTON(ProcessAlbumField)->active;
3383c3411,3413
< gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(ProcessAlbumField),
---
> gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(ProcessAlbumArtistField),
> !GTK_TOGGLE_BUTTON(ProcessAlbumArtistField)->active);
> gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(ProcessAlbumField),
3407c3437,3438
< gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(ProcessAlbumField), state);
---
> gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(ProcessAlbumArtistField),state);
> gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(ProcessAlbumField), state);
3426c3457,3458
< || GTK_TOGGLE_BUTTON(ProcessAlbumField)->active
---
> || GTK_TOGGLE_BUTTON(ProcessAlbumArtistField)->active
> || GTK_TOGGLE_BUTTON(ProcessAlbumField)->active
diff -r easytag-2.1.6/src/setting.c easytag-2.1.6_album_artist/src/setting.c
207c207,208
< {"process_album_field", CV_TYPE_BOOL, &PROCESS_ALBUM_FIELD },
---
> {"process_album_artist_field", CV_TYPE_BOOL, &PROCESS_ALBUM_ARTIST_FIELD },
> {"process_album_field", CV_TYPE_BOOL, &PROCESS_ALBUM_FIELD },
480c481,482
< PROCESS_ALBUM_FIELD = 1;
---
> PROCESS_ALBUM_ARTIST_FIELD = 1;
> PROCESS_ALBUM_FIELD = 1;
diff -r easytag-2.1.6/src/setting.h easytag-2.1.6_album_artist/src/setting.h
162a163
> gint PROCESS_ALBUM_ARTIST_FIELD;
diff -r easytag-2.1.6/src/ui_manager.h easytag-2.1.6_album_artist/src/ui_manager.h
24a25,27
> " <menuitem action='SortAlbumArtistAsc' />"
> " <menuitem action='SortAlbumArtistDesc' />"
> " <separator />"
233a237,239
> " <menuitem action='SortAlbumArtistAsc' />"
> " <menuitem action='SortAlbumArtistDesc' />"
> " <separator />"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]